summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-10-25 23:50:44 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-10-27 16:59:18 -0300
commit2fb45894e80d246ac6a9f0343343d581921cc3f2 (patch)
treebc64d8d6d0ec1313e4e0fd2bf8a147552112fccb /scripts/Makefile.thinlto
parent62d7cdc8d58702feb31b320f1713642e3977d7f3 (diff)
downloadlinux-2fb45894e80d246ac6a9f0343343d581921cc3f2.tar.gz
linux-2fb45894e80d246ac6a9f0343343d581921cc3f2.zip
perf debug: Avoid calling eprintf() in pr_debugN() when verbose < n
pr_debugN() unconditionally evaluated its arguments and called eprintf() -> veprintf() before checking if verbose >= n. In hot paths such as dso__load_sym_internal(), two pr_debug4() calls per symbol accounted for ~15% of total CPU time in 'perf top' even at the default verbose == 0. Guard eprintf() in pr_debugN() with unlikely(verbose >= (n)) and define pr_debug() in terms of pr_debugN(1, ...). In test__parsing_callback() (tools/perf/tests/pmu-events.c), move the test_generic_metric(mexp, 0) call out of the pr_debug() argument list so the metric evaluation continues to run during 'perf test' when verbose == 0. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alessio Podda <aleph.pi.gh@gmail.com> Cc: Alireza Haghdoost <haghdoost@uber.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Michael Liang <mliang@purestorage.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shimin Guo <shimin.guo@skydio.com> Cc: Tanushree Shah <tshah@linux.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions