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

weilin.wang@intel.com posted 25 patches 2 years, 4 months ago
There is a newer version of this series
[RFC PATCH 16/25] perf stat: Update keyword core to default_core to adjust to the changes for events with no unit
Posted by weilin.wang@intel.com 2 years, 4 months ago
From: Weilin Wang <weilin.wang@intel.com>

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;
-- 
2.39.3
Re: [RFC PATCH 16/25] perf stat: Update keyword core to default_core to adjust to the changes for events with no unit
Posted by Liang, Kan 2 years, 4 months ago

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;