diff mbox series

[v4,4/6] perf vendor events arm64: Update scale units and descriptions of common topdown metrics

Message ID 20230807142138.288713-5-james.clark@arm.com (mailing list archive)
State New, archived
Headers show
Series perf vendor events arm64: Update N2 and V2 metrics and events using Arm telemetry repo | expand

Commit Message

James Clark Aug. 7, 2023, 2:20 p.m. UTC
Metrics will be published here [1] going forwards, but they have
slightly different scale units. To allow autogenerated metrics to be
added more easily, update the scale units to match.

The more detailed descriptions have also been taken and added to the
common file.

[1]: https://gitlab.arm.com/telemetry-solution/telemetry-solution/-/tree/main/data/pmu/cpu/

Acked-by: Ian Rogers <irogers@google.com>
Signed-off-by: James Clark <james.clark@arm.com>
---
 tools/perf/pmu-events/arch/arm64/sbsa.json | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

John Garry Aug. 8, 2023, 8:46 a.m. UTC | #1
On 07/08/2023 15:20, James Clark wrote:
> Metrics will be published here [1] going forwards, but they have
> slightly different scale units. To allow autogenerated metrics to be
> added more easily, update the scale units to match.
> 
> The more detailed descriptions have also been taken and added to the
> common file.

It's unfortunate that we can't have a concise description - like which 
we have now - and a full description.

> 

Anyway,
Reviewed-by: John Garry <john.g.garry@oracle.com>
James Clark Aug. 9, 2023, 12:59 p.m. UTC | #2
On 08/08/2023 09:46, John Garry wrote:
> On 07/08/2023 15:20, James Clark wrote:
>> Metrics will be published here [1] going forwards, but they have
>> slightly different scale units. To allow autogenerated metrics to be
>> added more easily, update the scale units to match.
>>
>> The more detailed descriptions have also been taken and added to the
>> common file.
> 
> It's unfortunate that we can't have a concise description - like which
> we have now - and a full description.
> 
>>
> 
> Anyway,
> Reviewed-by: John Garry <john.g.garry@oracle.com>
> 

Yes unfortunately in the source data the metric short description
("title") pretty much just matches the metric name but without
underscores. For that reason we chose not to use it for Perf's short
description otherwise the list command showed a lot of duplication.

  "frontend_bound": {
    "title": "Frontend Bound",
    "description": "This metric is the percentage of...

The PMU events on the other hand do have a short description in the
title field rather than just repeating the name:

  ITLB_WALK": {
    "code": "0x0035",
    "title": "Instruction TLB access with at least one translation table
walk",
    "description": "Counts instruction memory translation table walks
caused by a miss in the L2...

I can raise this internally as it does seem to be a bit of an inconsistency.

James
diff mbox series

Patch

diff --git a/tools/perf/pmu-events/arch/arm64/sbsa.json b/tools/perf/pmu-events/arch/arm64/sbsa.json
index f90b338261ac..4eed79a28f6e 100644
--- a/tools/perf/pmu-events/arch/arm64/sbsa.json
+++ b/tools/perf/pmu-events/arch/arm64/sbsa.json
@@ -1,34 +1,34 @@ 
 [
     {
-        "MetricExpr": "stall_slot_frontend / (#slots * cpu_cycles)",
-        "BriefDescription": "Frontend bound L1 topdown metric",
+        "MetricExpr": "100 * (stall_slot_frontend / (#slots * cpu_cycles))",
+        "BriefDescription": "This metric is the percentage of total slots that were stalled due to resource constraints in the frontend of the processor.",
         "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "MetricName": "frontend_bound",
-        "ScaleUnit": "100%"
+        "ScaleUnit": "1percent of slots"
     },
     {
-        "MetricExpr": "(1 - op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles))",
-        "BriefDescription": "Bad speculation L1 topdown metric",
+        "MetricExpr": "100 * ((1 - op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles)))",
+        "BriefDescription": "This metric is the percentage of total slots that executed operations and didn't retire due to a pipeline flush.\nThis indicates cycles that were utilized but inefficiently.",
         "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "MetricName": "bad_speculation",
-        "ScaleUnit": "100%"
+        "ScaleUnit": "1percent of slots"
     },
     {
-        "MetricExpr": "(op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles))",
-        "BriefDescription": "Retiring L1 topdown metric",
+        "MetricExpr": "100 * ((op_retired / op_spec) * (1 - stall_slot / (#slots * cpu_cycles)))",
+        "BriefDescription": "This metric is the percentage of total slots that retired operations, which indicates cycles that were utilized efficiently.",
         "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "MetricName": "retiring",
-        "ScaleUnit": "100%"
+        "ScaleUnit": "1percent of slots"
     },
     {
-        "MetricExpr": "stall_slot_backend / (#slots * cpu_cycles)",
-        "BriefDescription": "Backend Bound L1 topdown metric",
+        "MetricExpr": "100 * (stall_slot_backend / (#slots * cpu_cycles))",
+        "BriefDescription": "This metric is the percentage of total slots that were stalled due to resource constraints in the backend of the processor.",
         "DefaultMetricgroupName": "TopdownL1",
         "MetricGroup": "Default;TopdownL1",
         "MetricName": "backend_bound",
-        "ScaleUnit": "100%"
+        "ScaleUnit": "1percent of slots"
     }
 ]