diff mbox series

[1/3] perf vendor events arm64: AmpereOne: Add missing DefaultMetricgroupName fields

Message ID 20231201021550.1109196-2-ilkka@os.amperecomputing.com (mailing list archive)
State New, archived
Headers show
Series perf vendor events arm64: Add AmpereOneX events and metrics and fix AmpereOne bugs | expand

Commit Message

Ilkka Koskinen Dec. 1, 2023, 2:15 a.m. UTC
AmpereOne metrics were missing DefaultMetricgroupName from metrics with
"Default" in group name resulting perf to segfault. Add the missing
field to address the issue.

Fixes: 59faeaf80d02 ("perf vendor events arm64: Fix for AmpereOne metrics")
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
---
 tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ian Rogers Dec. 4, 2023, 7:02 p.m. UTC | #1
On Thu, Nov 30, 2023 at 6:16 PM Ilkka Koskinen
<ilkka@os.amperecomputing.com> wrote:
>
> AmpereOne metrics were missing DefaultMetricgroupName from metrics with
> "Default" in group name resulting perf to segfault. Add the missing
> field to address the issue.
>
> Fixes: 59faeaf80d02 ("perf vendor events arm64: Fix for AmpereOne metrics")
> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>

Sorry, I just stumbled across this and sent a fix too.
https://lore.kernel.org/lkml/20231204182330.654255-1-irogers@google.com/
The patches are identical so I'd suggest taking this one and the first
patch in my changes.

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
> index e2848a9d4848..afcdad58ef89 100644
> --- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
> +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
> @@ -231,6 +231,7 @@
>          "MetricName": "slots_lost_misspeculation_fraction",
>          "MetricExpr": "100 * ((OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots))",
>          "BriefDescription": "Fraction of slots lost due to misspeculation",
> +        "DefaultMetricgroupName": "TopdownL1",
>          "MetricGroup": "Default;TopdownL1",
>          "ScaleUnit": "1percent of slots"
>      },
> @@ -238,6 +239,7 @@
>          "MetricName": "retired_fraction",
>          "MetricExpr": "100 * (OP_RETIRED / (CPU_CYCLES * #slots))",
>          "BriefDescription": "Fraction of slots retiring, useful work",
> +        "DefaultMetricgroupName": "TopdownL1",
>          "MetricGroup": "Default;TopdownL1",
>         "ScaleUnit": "1percent of slots"
>      },
> --
> 2.41.0
>
Arnaldo Carvalho de Melo Dec. 4, 2023, 7:41 p.m. UTC | #2
Em Mon, Dec 04, 2023 at 11:02:31AM -0800, Ian Rogers escreveu:
> On Thu, Nov 30, 2023 at 6:16 PM Ilkka Koskinen
> <ilkka@os.amperecomputing.com> wrote:
> >
> > AmpereOne metrics were missing DefaultMetricgroupName from metrics with
> > "Default" in group name resulting perf to segfault. Add the missing
> > field to address the issue.
> >
> > Fixes: 59faeaf80d02 ("perf vendor events arm64: Fix for AmpereOne metrics")
> > Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> 
> Sorry, I just stumbled across this and sent a fix too.
> https://lore.kernel.org/lkml/20231204182330.654255-1-irogers@google.com/
> The patches are identical so I'd suggest taking this one and the first
> patch in my changes.
> 
> Reviewed-by: Ian Rogers <irogers@google.com>

Thanks, applied the series.

- Arnaldo
diff mbox series

Patch

diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
index e2848a9d4848..afcdad58ef89 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
@@ -231,6 +231,7 @@ 
         "MetricName": "slots_lost_misspeculation_fraction",
         "MetricExpr": "100 * ((OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots lost due to misspeculation",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "ScaleUnit": "1percent of slots"
     },
@@ -238,6 +239,7 @@ 
         "MetricName": "retired_fraction",
         "MetricExpr": "100 * (OP_RETIRED / (CPU_CYCLES * #slots))",
         "BriefDescription": "Fraction of slots retiring, useful work",
+        "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
 	"ScaleUnit": "1percent of slots"
     },