diff options
author | Ian Rogers <irogers@google.com> | 2023-08-24 21:32:12 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-08-25 01:21:27 +0300 |
commit | eeb6b12992c4a348af6773e50084f981dc3dda76 (patch) | |
tree | 39e92f21b8b24684f969dd00c9ca2ddee07587ac /tools/perf/pmu-events/jevents.py | |
parent | f208b2c6f984f9c8086205e826985ab4441ce2da (diff) | |
download | linux-eeb6b12992c4a348af6773e50084f981dc3dda76.tar.xz |
perf jevents: Don't append Unit to desc
Unit with the PMU name is appended to desc in jevents.py, but on
hybrid platforms it causes the desc to differ from the regular
non-hybrid system with a PMU of 'cpu'. Having differing descs means
the events don't deduplicate. To make the perf list output not differ,
append the Unit on again in the perf list printing code.
On x86 reduces the binary size by 409,600 bytes or about 4%. Update
pmu-events test expectations to match the differently generated
pmu-events.c code.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230824183212.374787-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/jevents.py')
-rwxr-xr-x | tools/perf/pmu-events/jevents.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index e5bce57f5688..712f80d7d071 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -357,13 +357,6 @@ class JsonEvent: self.desc += extra_desc if self.long_desc and extra_desc: self.long_desc += extra_desc - if self.pmu and self.pmu != 'cpu': - if not self.desc: - self.desc = 'Unit: ' + self.pmu - else: - if not self.desc.endswith('. '): - self.desc += '. ' - self.desc += 'Unit: ' + self.pmu if arch_std: if arch_std.lower() in _arch_std_events: event = _arch_std_events[arch_std.lower()].event |