Re: [PATCH v1] perf: Make more global variables static

From: Arnaldo Carvalho de Melo

Date: Tue Jan 13 2026 - 16:40:55 EST


On Fri, Jan 09, 2026 at 05:36:54PM -0800, Namhyung Kim wrote:
> On Thu, Dec 04, 2025 at 01:42:35PM -0800, Ian Rogers wrote:
> > `make check` will run sparse on the perf code base. A frequent warning
> > is "warning: symbol '...' was not declared. Should it be static?" Go
> > through and make global definitions without declarations static. In
> > some cases it is deliberate due to dlsym accessing the symbol, this
> > change doesn't clean up the missing declarations for perf test
> > suites. Sometimes things can opportunistically be made const. Making
> > somethings static exposed unused functions warnings, so restructuring
> > of ifdefs was necessary for that. These changes reduce the size of the
> > perf binary by 3,264 bytes.
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks, applied to perf-tools-next,

- Arnaldo