From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: James Clark <james.clark@arm.com>
Cc: Ilkka Koskinen <ilkka@os.amperecomputing.com>,
John Garry <john.g.garry@oracle.com>,
Ian Rogers <irogers@google.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Will Deacon <will@kernel.org>, Mike Leach <mike.leach@linaro.org>,
Leo Yan <leo.yan@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Ingo Molnar <mingo@redhat.com>,
Dave Kleikamp <dave.kleikamp@oracle.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2] perf vendor events arm64: Add AmpereOne metrics
Date: Wed, 30 Aug 2023 11:42:47 -0700 (PDT) [thread overview]
Message-ID: <e674954c-dc8-d961-8ff1-ebcde95813b7@os.amperecomputing.com> (raw)
In-Reply-To: <1299e1ff-2543-6ee5-dc32-bc098bd6bfe1@arm.com>
Hi James,
On Tue, 29 Aug 2023, James Clark wrote:
>
>
> On 26/08/2023 20:23, Ilkka Koskinen wrote:
>> This patch adds AmpereOne metrics. The metrics also work around
>> the issue related to some of the events.
>>
>> Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
>> ---
>> .../arch/arm64/ampere/ampereone/metrics.json | 396 ++++++++++++++++++
>> 1 file changed, 396 insertions(+)
>> create mode 100644 tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
>>
>> diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
>> new file mode 100644
>> index 000000000000..b623d8a9e3dc
>> --- /dev/null
>> +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/metrics.json
>> @@ -0,0 +1,396 @@
>
> [...]
>
>> + {
>> + "MetricExpr": "STALL_SLOT_BACKEND / (CPU_CYCLES * 4)",
>> + "BriefDescription": "Fraction of slots backend bound",
>> + "MetricGroup": "Default;TopDownL1",
>> + "MetricName": "backend_bound",
>> + "ScaleUnit": "100%"
>> + },
>
> Hi Ilkaa,
>
> For these topdown metrics, as long as they are the same as the standard
> one you can remove anything that is duplicated. This might make it
> easier to make changes across all the topdown metrics in the future and
> have consistent descriptions across CPUs. For example this backend_bound
> one could look like this:
>
> {
> "ArchStdEvent": "backend_bound",
> }
Nice, basically the same way as architectured events.
>
> This assumes that you have the slots sysfs file available, otherwise you
> could leave only the formula in.
>
> We also decided to make the units for the topdown metrics "percent of
> slots" as we thought more specificity in the units was clearer.
I'll take a look at those and update the patch accordingly.
Cheers, Ilkka
>
> Thanks
> James
>
>> + {
>> + "MetricExpr": "1 - (retired_fraction + slots_lost_misspeculation_fraction + backend_bound)",
>> + "BriefDescription": "Fraction of slots frontend bound",
>> + "MetricGroup": "Default;TopDownL1",
>> + "MetricName": "frontend_bound",
>> + "ScaleUnit": "100%"
>> + },
>> + {
>> + "MetricExpr": "(OP_SPEC - OP_RETIRED) / (CPU_CYCLES * 4)",
>> + "BriefDescription": "Fraction of slots lost due to misspeculation",
>> + "MetricGroup": "Default;TopDownL1",
>> + "MetricName": "slots_lost_misspeculation_fraction",
>> + "ScaleUnit": "100%"
>> + },
>> + {
>> + "MetricExpr": "OP_RETIRED / (CPU_CYCLES * 4)",
>> + "BriefDescription": "Fraction of slots retiring, useful work",
>> + "MetricGroup": "Default;TopDownL1",
>> + "MetricName": "retired_fraction",
>> + "ScaleUnit": "100%"
>> + },
>> + {
>
prev parent reply other threads:[~2023-08-30 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 19:23 [PATCH v2] perf vendor events arm64: Add AmpereOne metrics Ilkka Koskinen
2023-08-29 10:46 ` James Clark
2023-08-30 18:42 ` Ilkka Koskinen [this message]
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=e674954c-dc8-d961-8ff1-ebcde95813b7@os.amperecomputing.com \
--to=ilkka@os.amperecomputing.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dave.kleikamp@oracle.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=leo.yan@linaro.org \
--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).