aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJing Zhang <[email protected]>2023-01-17 07:29:26 +0000
committerArnaldo Carvalho de Melo <[email protected]>2023-01-19 12:39:09 +0000
commit5b51e47a3f1d7619b424b4b89b5d19569a462b09 (patch)
treea7aa4ec0bc57e3400324c1937989ce8339cbfd5b
parentperf pmu: Add #slots literal support for arm64 (diff)
downloadkernel-5b51e47a3f1d7619b424b4b89b5d19569a462b09.tar.gz
kernel-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 <[email protected]> Signed-off-by: Jing Zhang <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andrew Kilroy <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Shuai Xue <[email protected]> Cc: Will Deacon <[email protected]> Cc: Xing Zhengjun <[email protected]> Cc: Zhuo Song <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-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: