[RFC PATCH 16/25] perf stat: Update keyword core to default_core to adjust to the changes for events with no unit

weilin.wang
2023-09-25T06:20:51Z

tools/perf/pmu-events/jevents.py | 2 +-
tools/perf/util/metricgroup.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index 5614bc203..d8c2fd258 100755
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
@@ -303,7 +303,7 @@ class JsonEvent:
'cpu_core': 'cpu_core',
'cpu_atom': 'cpu_atom',
'ali_drw': 'ali_drw',
- 'Core': 'core',
+ 'Core': 'default_core',
}
return table[unit] if unit in table else f'uncore_{unit.lower()}'

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 2e7a8e315..7884cb036 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -2085,7 +2085,7 @@ static int hw_aware_build_grouping(struct expr_parse_ctx *ctx __maybe_unused,
pr_debug("found event %s\n", id);
if (!strncmp(id, special_pattern, strlen(special_pattern))) {
struct metricgroup__event_info *event;
- event = event_info__new(id, "core", "0", true);
+ event = event_info__new(id, "default_core", "0", true);
if (!event) {
ret = -ENOMEM;
goto err_out;
--
2.39.3