linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: 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>
Cc: 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: Tue, 29 Aug 2023 11:46:12 +0100	[thread overview]
Message-ID: <1299e1ff-2543-6ee5-dc32-bc098bd6bfe1@arm.com> (raw)
In-Reply-To: <20230826192352.3043220-1-ilkka@os.amperecomputing.com>



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",
    }

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.

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%"
> +    },
> +    {

  reply	other threads:[~2023-08-29 10:47 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 [this message]
2023-08-30 18:42   ` Ilkka Koskinen

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=1299e1ff-2543-6ee5-dc32-bc098bd6bfe1@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dave.kleikamp@oracle.com \
    --cc=ilkka@os.amperecomputing.com \
    --cc=irogers@google.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).