From: Robin Murphy <robin.murphy@arm.com>
To: Jing Zhang <renyu.zj@linux.alibaba.com>,
John Garry <john.g.garry@oracle.com>,
Ian Rogers <irogers@google.com>
Cc: Will Deacon <will@kernel.org>, James Clark <james.clark@arm.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
Namhyung Kim <namhyung@kernel.org>,
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>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org,
Zhuo Song <zhuo.song@linux.alibaba.com>,
Shuai Xue <xueshuai@linux.alibaba.com>
Subject: Re: [PATCH v7 7/8] perf jevents: Add support for Arm CMN PMU aliasing
Date: Wed, 23 Aug 2023 10:33:23 +0100 [thread overview]
Message-ID: <46a0917c-e288-7ef9-d72d-cdd53bb52a0a@arm.com> (raw)
In-Reply-To: <1692606977-92009-8-git-send-email-renyu.zj@linux.alibaba.com>
On 2023-08-21 09:36, Jing Zhang wrote:
> Currently just add aliases for part of Arm CMN PMU events which
> are general and compatible for any SoC and CMN-ANY.
>
> "Compat" value "434*;436*;43c*;43a*" means it is compatible with
> all CMN600/CMN650/CMN700/Ci700, which can be obtained from
> commit 7819e05a0dce ("perf/arm-cmn: Revamp model detection").
>
> The arm-cmn PMU events got from:
> [0] https://developer.arm.com/documentation/100180/0302/?lang=en
> [1] https://developer.arm.com/documentation/101408/0100/?lang=en
> [2] https://developer.arm.com/documentation/102308/0302/?lang=en
> [3] https://developer.arm.com/documentation/101569/0300/?lang=en
>
> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
> Reviewed-by: John Garry <john.g.garry@oracle.com>
> ---
> .../pmu-events/arch/arm64/arm/cmn/sys/cmn.json | 266 +++++++++++++++++++++
> tools/perf/pmu-events/jevents.py | 1 +
> 2 files changed, 267 insertions(+)
> create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json
>
> diff --git a/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json
> new file mode 100644
> index 0000000..30435a3
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json
> @@ -0,0 +1,266 @@
> +[
> + {
> + "EventName": "hnf_cache_miss",
> + "EventIdCode": "0x1",
> + "NodeType": "0x5",
Given my other comment, I also think there would be no harm in just
having these as:
"ConfigCode" : "0x10005"
if you'd rather make life easier to begin with, then be able to come
back and improve things later. IMO it doesn't affect the readability of
the important values *all* that much, since it's not like they're tighly
packed together in oddly-aligned bitfields.
Thanks,
Robin.
> + "BriefDescription": "Counts total cache misses in first lookup result (high priority).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_slc_sf_cache_access",
> + "EventIdCode": "0x2",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of cache accesses in first access (high priority).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_cache_fill",
> + "EventIdCode": "0x3",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts total allocations in HN SLC (all cache line allocations to SLC).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_pocq_retry",
> + "EventIdCode": "0x4",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of retried requests.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_pocq_reqs_recvd",
> + "EventIdCode": "0x5",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of requests that HN receives.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_sf_hit",
> + "EventIdCode": "0x6",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of SF hits.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_sf_evictions",
> + "EventIdCode": "0x7",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of SF eviction cache invalidations initiated.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_dir_snoops_sent",
> + "EventIdCode": "0x8",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of directed snoops sent (not including SF back invalidation).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_brd_snoops_sent",
> + "EventIdCode": "0x9",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of multicast snoops sent (not including SF back invalidation).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_slc_eviction",
> + "EventIdCode": "0xa",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of SLC evictions (dirty only).",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_slc_fill_invalid_way",
> + "EventIdCode": "0xb",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of SLC fills to an invalid way.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_mc_retries",
> + "EventIdCode": "0xc",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of retried transactions by the MC.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_mc_reqs",
> + "EventIdCode": "0xd",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of requests that are sent to MC.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hnf_qos_hh_retry",
> + "EventIdCode": "0xe",
> + "NodeType": "0x5",
> + "BriefDescription": "Counts number of times a HighHigh priority request is protocolretried at the HN‑F.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_s0_rdata_beats",
> + "EventIdCode": "0x1",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 0. This event measures the read bandwidth, including CMO responses.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_s1_rdata_beats",
> + "EventIdCode": "0x2",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 1. This event measures the read bandwidth, including CMO responses.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_s2_rdata_beats",
> + "EventIdCode": "0x3",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 2. This event measures the read bandwidth, including CMO responses.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_rxdat_flits",
> + "EventIdCode": "0x4",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of RXDAT flits received. This event measures the true read data bandwidth, excluding CMOs.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_txdat_flits",
> + "EventIdCode": "0x5",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of TXDAT flits dispatched. This event measures the write bandwidth.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_txreq_flits_total",
> + "EventIdCode": "0x6",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of TXREQ flits dispatched. This event measures the total request bandwidth.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "rnid_txreq_flits_retried",
> + "EventIdCode": "0x7",
> + "NodeType": "0xa",
> + "BriefDescription": "Number of retried TXREQ flits dispatched. This event measures the retry rate.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "sbsx_txrsp_retryack",
> + "EventIdCode": "0x4",
> + "NodeType": "0x7",
> + "BriefDescription": "Number of RXREQ flits dispatched. This event is a measure of the retry rate.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "sbsx_txdat_flitv",
> + "EventIdCode": "0x5",
> + "NodeType": "0x7",
> + "BriefDescription": "Number of TXDAT flits dispatched from XP to SBSX. This event is a measure of the write bandwidth.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "sbsx_arvalid_no_arready",
> + "EventIdCode": "0x21",
> + "NodeType": "0x7",
> + "BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on AR channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "sbsx_awvalid_no_awready",
> + "EventIdCode": "0x22",
> + "NodeType": "0x7",
> + "BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on AW channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "sbsx_wvalid_no_wready",
> + "EventIdCode": "0x23",
> + "NodeType": "0x7",
> + "BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on W channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_txrsp_retryack",
> + "EventIdCode": "0x2a",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of RXREQ flits dispatched. This event is a measure of the retry rate.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_arvalid_no_arready",
> + "EventIdCode": "0x2b",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on AR channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_arready_no_arvalid",
> + "EventIdCode": "0x2c",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of cycles the AR channel is waiting for new requests from HN-I bridge.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_awvalid_no_awready",
> + "EventIdCode": "0x2d",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on AW channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_awready_no_awvalid",
> + "EventIdCode": "0x2e",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of cycles the AW channel is waiting for new requests from HN-I bridge.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_wvalid_no_wready",
> + "EventIdCode": "0x2f",
> + "NodeType": "0x4",
> + "BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on W channel.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + },
> + {
> + "EventName": "hni_txdat_stall",
> + "EventIdCode": "0x30",
> + "NodeType": "0x4",
> + "BriefDescription": "TXDAT valid but no link credit available.",
> + "Unit": "arm_cmn",
> + "Compat": "434*;436*;43c*;43a*"
> + }
> +]
> diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> index 369c8bf..935bd4b 100755
> --- a/tools/perf/pmu-events/jevents.py
> +++ b/tools/perf/pmu-events/jevents.py
> @@ -272,6 +272,7 @@ class JsonEvent:
> 'DFPMC': 'amd_df',
> 'cpu_core': 'cpu_core',
> 'cpu_atom': 'cpu_atom',
> + 'arm_cmn': 'arm_cmn',
> }
> return table[unit] if unit in table else f'uncore_{unit.lower()}'
>
next prev parent reply other threads:[~2023-08-23 10:05 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 8:36 [PATCH v7 0/8] perf vendor events: Add JSON metrics for Arm CMN Jing Zhang
2023-08-21 8:36 ` [PATCH v7 1/8] perf pmu: "Compat" supports matching multiple identifiers Jing Zhang
2023-08-24 15:05 ` Robin Murphy
2023-08-25 8:40 ` Jing Zhang
2023-08-25 4:11 ` Ian Rogers
2023-08-25 6:12 ` Jing Zhang
2023-08-21 8:36 ` [PATCH v7 2/8] perf metric: " Jing Zhang
2023-08-25 4:16 ` Ian Rogers
2023-08-21 8:36 ` [PATCH v7 3/8] perf vendor events: Supplement the omitted EventCode Jing Zhang
2023-08-25 4:24 ` Ian Rogers
2023-08-25 6:28 ` Jing Zhang
2023-08-21 8:36 ` [PATCH v7 4/8] perf jevents: Support more event fields Jing Zhang
2023-08-23 9:12 ` Robin Murphy
2023-08-25 4:42 ` Ian Rogers
2023-08-21 8:36 ` [PATCH v7 5/8] perf test: Make matching_pmu effective Jing Zhang
2023-08-25 4:27 ` Ian Rogers
2023-08-25 6:30 ` Jing Zhang
2023-08-21 8:36 ` [PATCH v7 6/8] perf test: Add pmu-event test for "Compat" and new event_field Jing Zhang
2023-08-25 4:30 ` Ian Rogers
2023-08-25 6:30 ` Jing Zhang
2023-08-21 8:36 ` [PATCH v7 7/8] perf jevents: Add support for Arm CMN PMU aliasing Jing Zhang
2023-08-23 9:33 ` Robin Murphy [this message]
2023-08-24 2:12 ` Jing Zhang
2023-08-21 8:36 ` [PATCH v7 8/8] perf vendor events: Add JSON metrics for Arm CMN Jing Zhang
2023-08-25 4:13 ` Ian Rogers
2023-08-25 6:47 ` Jing Zhang
2023-08-23 8:12 ` [PATCH v7 0/8] " John Garry
2023-08-24 2:33 ` Jing Zhang
2023-09-06 16:05 ` Arnaldo Carvalho de Melo
2023-09-07 2:42 ` Jing Zhang
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=46a0917c-e288-7ef9-d72d-cdd53bb52a0a@arm.com \
--to=robin.murphy@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.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-doc@vger.kernel.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=renyu.zj@linux.alibaba.com \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=zhuo.song@linux.alibaba.com \
/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
all inboxes | Powered by JetHome®