From: James Clark <james.clark@linaro.org>
To: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
John Garry <john.g.garry@oracle.com>,
Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>,
Leo Yan <leo.yan@linux.dev>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 2/2] perf vendor events arm64 AmpereOneX: Fix frontend_bound calculation
Date: Tue, 18 Mar 2025 10:47:02 +0000 [thread overview]
Message-ID: <880bebc4-5a59-451e-beb2-60cee9a3efd5@linaro.org> (raw)
In-Reply-To: <20250313201559.11332-3-ilkka@os.amperecomputing.com>
On 13/03/2025 8:15 pm, Ilkka Koskinen wrote:
> frontend_bound metrics was miscalculated due to different scaling in
> a couple of metrics it depends on. Change the scaling to match with
> AmpereOne.
>
> Fixes: 16438b652b46 ("perf vendor events arm64 AmpereOneX: Add core PMU events and metrics")
> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> ---
> .../arch/arm64/ampere/ampereonex/metrics.json | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json
> index c5d1d22bd034..5228f94a793f 100644
> --- a/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json
> +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereonex/metrics.json
> @@ -229,19 +229,19 @@
> },
> {
> "MetricName": "slots_lost_misspeculation_fraction",
> - "MetricExpr": "(OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)",
> + "MetricExpr": "100 * (OP_SPEC - OP_RETIRED) / (CPU_CYCLES * #slots)",
> "BriefDescription": "Fraction of slots lost due to misspeculation",
> "DefaultMetricgroupName": "TopdownL1",
> "MetricGroup": "Default;TopdownL1",
> - "ScaleUnit": "100percent of slots"
> + "ScaleUnit": "1percent of slots"
> },
> {
> "MetricName": "retired_fraction",
> - "MetricExpr": "OP_RETIRED / (CPU_CYCLES * #slots)",
> + "MetricExpr": "100 * OP_RETIRED / (CPU_CYCLES * #slots)",
> "BriefDescription": "Fraction of slots retiring, useful work",
> "DefaultMetricgroupName": "TopdownL1",
> "MetricGroup": "Default;TopdownL1",
> - "ScaleUnit": "100percent of slots"
> + "ScaleUnit": "1percent of slots"
I never considered that ScaleUnit could be an issue when the metric was
included in other metrics with different scales. Seems like an easy trap.
Reviewed-by: James Clark <james.clark@linaro.org>
next prev parent reply other threads:[~2025-03-18 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 20:15 [PATCH 0/2] perf vendor events arm64: AmpereOne/AmpereOneX: Add a new errata and fix metrics calculations Ilkka Koskinen
2025-03-13 20:15 ` [PATCH 1/2] perf vendor events arm64: AmpereOne/AmpereOneX: Mark LD_RETIRED impacted by errata Ilkka Koskinen
2025-03-18 10:48 ` James Clark
2025-03-20 20:10 ` Ilkka Koskinen
2025-03-13 20:15 ` [PATCH 2/2] perf vendor events arm64 AmpereOneX: Fix frontend_bound calculation Ilkka Koskinen
2025-03-18 10:47 ` James Clark [this message]
2025-03-21 18:30 ` [PATCH 0/2] perf vendor events arm64: AmpereOne/AmpereOneX: Add a new errata and fix metrics calculations Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=880bebc4-5a59-451e-beb2-60cee9a3efd5@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ilkka@os.amperecomputing.com \
--cc=irogers@google.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).