linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Ilkka Koskinen <ilkka@os.amperecomputing.com>,
	Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Will Deacon <will@kernel.org>, James Clark <james.clark@arm.com>,
	Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	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>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org,
	Dave Kleikamp <dave.kleikamp@oracle.com>
Subject: Re: [PATCH 3/4] perf vendor events arm64: Add AmpereOne metrics
Date: Mon, 7 Aug 2023 13:07:49 +0100	[thread overview]
Message-ID: <90c18a64-4de6-a251-13d2-e6671a04c398@oracle.com> (raw)
In-Reply-To: <e5879193-515b-662c-8597-ca8ea8e3fb4@os.amperecomputing.com>

On 04/08/2023 20:59, Ilkka Koskinen wrote:
> 
> Hi John
> 
> On Fri, 4 Aug 2023, John Garry wrote:
>> On 03/08/2023 22:13, Ilkka Koskinen wrote:
>>> This patch adds AmpereOne metrics. The metrics also work around
>>> the issue related to some of the events.

Would these events be any metrics added which are not a "Topdown"? I 
guess no, since there are many, but I just don't know.

>>
>> Just curious, are these events/metrics described in some 
>> publically-available document?
> 
> I quickly checked that and there are a spreadsheet and a document 
> available, which list the supported PMUs, their events and metrics in 
> the customer connect website but that requires registering.
> 

OK, thanks for the info. I ask is it always worthwhile mentioning a link 
in the changelog if publicly available.


Just a few minor comments:

On 03/08/2023 22:13, 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  | 362 ++++++++++++++++++
 >   1 file changed, 362 insertions(+)
 >

...

 > +    {
 > +	"MetricExpr": "CRYPTO_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of crypto data processing operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "Crypto mix"
 > +    },
 > +    {
 > +	"MetricExpr": "VFP_SPEC / (duration_time *1000000000)",
 > +	"BriefDescription": "Giga-floating point operations per second",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "GFLOPS_ISSUED"
 > +    },
 > +    {
 > +	"MetricExpr": "DP_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of integer data processing operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "Integer mix"
 > +    },
 > +    {
 > +	"MetricExpr": "INST_RETIRED / CPU_CYCLES",
 > +	"BriefDescription": "Instructions per cycle",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "IPC"
 > +    },
 > +    {
 > +	"MetricExpr": "LD_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of load operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "Load mix"
 > +    },
 > +    {
 > +	"MetricExpr": "LDST_SPEC/ OP_SPEC",

mega nit: missing whitespace before '/'

 > +	"BriefDescription": "Proportion of load & store operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "Load-store mix"
 > +    },
 > +    {
 > +	"MetricExpr": "INST_RETIRED / (duration_time * 1000000)",

I think that we may use 1e6 here for shorthand - it helps avoid mistakes 
with too few or many '0's :)

 > +	"BriefDescription": "Millions of instructions per second",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "MIPS_RETIRED"
 > +    },
 > +    {
 > +	"MetricExpr": "INST_SPEC / (duration_time * 1000000)",
 > +	"BriefDescription": "Millions of instructions per second",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "MIPS_UTILIZATION"
 > +    },
 > +    {
 > +	"MetricExpr": "PC_WRITE_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of software change of PC operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "PC write mix"
 > +    },
 > +    {
 > +	"MetricExpr": "ST_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of store operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "Store mix"
 > +    },
 > +    {
 > +	"MetricExpr": "VFP_SPEC / OP_SPEC",
 > +	"BriefDescription": "Proportion of FP operations",
 > +	"MetricGroup": "Instruction",
 > +	"MetricName": "VFP mix"
 > +    },
 > +    {
 > +	"MetricExpr": "1 - (OP_RETIRED/ (CPU_CYCLES * 4))",
 > +	"BriefDescription": "Proportion of slots lost",
 > +	"MetricGroup": "Speculation / TDA",
 > +	"MetricName": "CPU lost"
 > +    },
 > +    {
 > +	"MetricExpr": "OP_RETIRED/ (CPU_CYCLES * 4)",
 > +	"BriefDescription": "Proportion of slots retiring",
 > +	"MetricGroup": "Speculation / TDA",
 > +	"MetricName": "CPU utilization"
 > +    },
 > +    {
 > +	"MetricExpr": "OP_RETIRED - OP_SPEC",
 > +	"BriefDescription": "Operations lost due to misspeculation",
 > +	"MetricGroup": "Speculation / TDA",
 > +	"MetricName": "Operations lost"
 > +    },
 > +    {
 > +	"MetricExpr": "1 - (OP_RETIRED / OP_SPEC)",
 > +	"BriefDescription": "Proportion of operations lost",
 > +	"MetricGroup": "Speculation / TDA",
 > +	"MetricName": "Operations lost (ratio)"
 > +    },
 > +    {
 > +	"MetricExpr": "OP_RETIRED / OP_SPEC",
 > +	"BriefDescription": "Proportion of operations retired",
 > +	"MetricGroup": "Speculation / TDA",
 > +	"MetricName": "Operations retired"
 > +    },
 > +    {
 > +	"MetricExpr": "STALL_BACKEND_CACHE / CPU_CYCLES",
 > +	"BriefDescription": "Proportion of cycles stalled and no operations 
issued to backend and cache miss",
 > +	"MetricGroup": "Stall",
 > +	"MetricName": "Stall backend cache cycles"
 > +    },
 > +    {
 > +	"MetricExpr": "STALL_BACKEND_RESOURCE / CPU_CYCLES",
 > +	"BriefDescription": "Proportion of cycles stalled and no operations 
issued to backend and resource full",
 > +	"MetricGroup": "Stall",
 > +	"MetricName": "Stall backend resource cycles"
 > +    },
 > +    {
 > +	"MetricExpr": "STALL_BACKEND_TLB / CPU_CYCLES",
 > +	"BriefDescription": "Proportion of cycles stalled and no operations 
issued to backend and TLB miss",
 > +	"MetricGroup": "Stall",
 > +	"MetricName": "Stall backend tlb cycles"
 > +    },
 > +    {
 > +	"MetricExpr": "STALL_FRONTEND_CACHE / CPU_CYCLES",
 > +	"BriefDescription": "Proportion of cycles stalled and no ops 
delivered from frontend and cache miss",
 > +	"MetricGroup": "Stall",
 > +	"MetricName": "Stall frontend cache cycles"
 > +    },
 > +    {
 > +	"MetricExpr": "STALL_FRONTEND_TLB / CPU_CYCLES",
 > +	"BriefDescription": "Proportion of cycles stalled and no ops 
delivered from frontend and TLB miss",
 > +	"MetricGroup": "Stall",
 > +	"MetricName": "Stall frontend tlb cycles"
 > +    },
 > +    {
 > +	"MetricExpr": "DTLB_WALK / L1D_TLB",
 > +	"BriefDescription": "D-side walk per d-side translation request",
 > +	"MetricGroup": "TLB",
 > +	"MetricName": "DTLB walks"
 > +    },
 > +    {
 > +	"MetricExpr": "ITLB_WALK / L1I_TLB",
 > +	"BriefDescription": "I-side walk per i-side translation request",
 > +	"MetricGroup": "TLB",
 > +	"MetricName": "ITLB walks"
 > +    },
 > +    {
 > +        "MetricExpr": "STALL_SLOT_BACKEND / (CPU_CYCLES * 4)",
 > +        "BriefDescription": "Fraction of slots backend bound",
 > +        "MetricGroup": "TopDownL1",

@Ian, should this be "Default;TopDownL1"?

 > +        "MetricName": "backend"

How about use consistent names with other other archs and arm64 
platforms, like "backend_bound"? I did not check all names, but please 
consider this.

If 'perf topdown' is ever supported for arm64, we would prob rely on 
metricgroups, so would need use a fixed standard name here. Note that 
x86 uses custom kernel events for this instead.

 > +    },
 > +    {
 > +        "MetricExpr": "1 - (retiring + lost + backend)",
 > +        "BriefDescription": "Fraction of slots frontend bound",
 > +        "MetricGroup": "TopDownL1",
 > +        "MetricName": "frontend"

As above, it would be "frontend_bound"

 > +    },
 > +    {
 > +        "MetricExpr": "((OP_SPEC - OP_RETIRED) / (CPU_CYCLES * 4))",
 > +        "BriefDescription": "Fraction of slots lost due to 
misspeculation",
 > +        "MetricGroup": "TopDownL1",
 > +        "MetricName": "lost"
 > +    },
 > +    {


  reply	other threads:[~2023-08-07 12:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 21:13 [PATCH 0/4] perf vendor events arm64: AmpereOne: Core PMU event update and metrics Ilkka Koskinen
2023-08-03 21:13 ` [PATCH 1/4] perf vendor events arm64: Remove L1D_CACHE_LMISS from AmpereOne list Ilkka Koskinen
2023-08-04 11:02   ` John Garry
2023-08-14 17:36     ` Ian Rogers
2023-08-03 21:13 ` [PATCH 2/4] perf vendor events arm64: AmpereOne: Mark affected STALL_* events impacted by errata Ilkka Koskinen
2023-08-04 11:05   ` John Garry
2023-08-04 19:40     ` Ilkka Koskinen
2023-08-10 22:38       ` Ilkka Koskinen
2023-08-11 10:08         ` John Garry
2023-08-03 21:13 ` [PATCH 3/4] perf vendor events arm64: Add AmpereOne metrics Ilkka Koskinen
2023-08-04 11:09   ` John Garry
2023-08-04 19:59     ` Ilkka Koskinen
2023-08-07 12:07       ` John Garry [this message]
2023-08-09  0:00         ` Ilkka Koskinen
2023-08-14 17:47   ` Ian Rogers
2023-08-14 18:49     ` Ilkka Koskinen
2023-08-03 21:13 ` [PATCH 4/4] perf vendor events arm64: AmpereOne: Remove unsupported events 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=90c18a64-4de6-a251-13d2-e6671a04c398@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=acme@kernel.org \
    --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=james.clark@arm.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).