]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf tools: Cache counter names for raw samples on s390
authorIan Rogers <irogers@google.com>
Fri, 31 Oct 2025 19:42:16 +0000 (12:42 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 31 Oct 2025 19:46:19 +0000 (12:46 -0700)
commit01bc5d2f0d7db895739fccfbdf69cf68dddb9072
tree8deb6b5e8145481b9121931b0234a446efc268cf
parent915c31f0e69255897225d244e04374082d36de7f
perf tools: Cache counter names for raw samples on s390

Searching all event names is slower now that legacy names are
included. Add a cache to avoid long iterative searches. Note, the
cache isn't cleaned up and is as such a memory leak, however, globally
reachable leaks like this aren't treated as leaks by leak sanitizer.

Reported-by: Thomas Richter <tmricht@linux.ibm.com>
Closes: https://lore.kernel.org/linux-perf-users/09943f4f-516c-4b93-877c-e4a64ed61d38@linux.ibm.com/
Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/s390-sample-raw.c