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

Liang, Kan
2023-09-26T16:25:31Z

On 2023-09-25 2:18 a.m., weilin.wang@intel.com wrote:
> From: Weilin Wang <weilin.wang@intel.com>
>

Description?

Shouldn't the default_core be used when the keyword core is first
introduced?

Thanks,
Kan

> Signed-off-by: Weilin Wang <weilin.wang@intel.com>
> ---
> 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;