summaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events/jevents.py
diff options
context:
space:
mode:
authorJing Zhang <renyu.zj@linux.alibaba.com>2023-01-17 15:29:26 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-01-19 09:39:09 -0300
commit5b51e47a3f1d7619b424b4b89b5d19569a462b09 (patch)
treea7aa4ec0bc57e3400324c1937989ce8339cbfd5b /tools/perf/pmu-events/jevents.py
parentacef233b7ca749fda153a06bbd2d9feb2bb16857 (diff)
downloadlinux-5b51e47a3f1d7619b424b4b89b5d19569a462b09.tar.gz
linux-5b51e47a3f1d7619b424b4b89b5d19569a462b09.tar.bz2
linux-5b51e47a3f1d7619b424b4b89b5d19569a462b09.zip
perf jevent: Add general metrics support
Add general metrics support, so that some general metrics applicable to multiple architectures can be defined in the public JSON file like general events, and then add general metrics through "arch_std_event" in JSON file of different architecture. Reviewed-by: John Garry <john.g.garry@oracle.com> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andrew Kilroy <andrew.kilroy@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shuai Xue <xueshuai@linux.alibaba.com> Cc: Will Deacon <will@kernel.org> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Cc: Zhuo Song <zhuo.song@linux.alibaba.com> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1673940573-90503-3-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/jevents.py')
-rwxr-xr-xtools/perf/pmu-events/jevents.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index 4c398e0eeb2f..0416b7442171 100755
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
@@ -358,6 +358,8 @@ def preprocess_arch_std_files(archpath: str) -> None:
for event in read_json_events(item.path, topic=''):
if event.name:
_arch_std_events[event.name.lower()] = event
+ if event.metric_name:
+ _arch_std_events[event.metric_name.lower()] = event
def print_events_table_prefix(tblname: str) -> None: