perf jevents: If the long_desc and desc are identical then drop the long_desc
authorIan Rogers <irogers@google.com>
Thu, 10 Jul 2025 23:51:21 +0000 (16:51 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 11 Jul 2025 19:36:40 +0000 (12:36 -0700)
commit5c255832deaf34d74c0adf2200eb50a8bba0fc00
tree35b60f7177fda7c076230c594e9d2677c80558dc
parent3787cdaf387cdc14a9a000624742b4ee0a509244
perf jevents: If the long_desc and desc are identical then drop the long_desc

If the short and long descriptions are the same then save space and
don't store both of them. When storing the desc in the perf_pmu_alias,
don't duplicate the desc into the long_desc.

By avoiding storing the duplicate the size of the events string in the
binary on x86 is reduced by 29,840 bytes.

Fix tests that expect a duplicated description.

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250710235126.1086011-9-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/pmu-events/empty-pmu-events.c
tools/perf/pmu-events/jevents.py
tools/perf/tests/pmu-events.c
tools/perf/util/pmu.c