Skip to content

Commit b955ba2

Browse files
Jing Zhangopsiff
authored andcommitted
perf jevents: Add support for Arm CMN PMU aliasing
ANBZ: #8601 commit 0b4de7b upstream. 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 7819e05 ("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> Reviewed-by: Ian Rogers <irogers@google.com> Tested-by: Ian Rogers <irogers@google.com> Cc: James Clark <james.clark@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mike Leach <mike.leach@linaro.org> Cc: Shuai Xue <xueshuai@linux.alibaba.com> Cc: Zhuo Song <zhuo.song@linux.alibaba.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/1695794391-34817-7-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Jing Zhang <renyu.zj@linux.alibaba.com>
1 parent 06056ae commit b955ba2

2 files changed

Lines changed: 267 additions & 0 deletions

File tree

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
[
2+
{
3+
"EventName": "hnf_cache_miss",
4+
"EventidCode": "0x1",
5+
"NodeType": "0x5",
6+
"BriefDescription": "Counts total cache misses in first lookup result (high priority).",
7+
"Unit": "arm_cmn",
8+
"Compat": "(434|436|43c|43a).*"
9+
},
10+
{
11+
"EventName": "hnf_slc_sf_cache_access",
12+
"EventidCode": "0x2",
13+
"NodeType": "0x5",
14+
"BriefDescription": "Counts number of cache accesses in first access (high priority).",
15+
"Unit": "arm_cmn",
16+
"Compat": "(434|436|43c|43a).*"
17+
},
18+
{
19+
"EventName": "hnf_cache_fill",
20+
"EventidCode": "0x3",
21+
"NodeType": "0x5",
22+
"BriefDescription": "Counts total allocations in HN SLC (all cache line allocations to SLC).",
23+
"Unit": "arm_cmn",
24+
"Compat": "(434|436|43c|43a).*"
25+
},
26+
{
27+
"EventName": "hnf_pocq_retry",
28+
"EventidCode": "0x4",
29+
"NodeType": "0x5",
30+
"BriefDescription": "Counts number of retried requests.",
31+
"Unit": "arm_cmn",
32+
"Compat": "(434|436|43c|43a).*"
33+
},
34+
{
35+
"EventName": "hnf_pocq_reqs_recvd",
36+
"EventidCode": "0x5",
37+
"NodeType": "0x5",
38+
"BriefDescription": "Counts number of requests that HN receives.",
39+
"Unit": "arm_cmn",
40+
"Compat": "(434|436|43c|43a).*"
41+
},
42+
{
43+
"EventName": "hnf_sf_hit",
44+
"EventidCode": "0x6",
45+
"NodeType": "0x5",
46+
"BriefDescription": "Counts number of SF hits.",
47+
"Unit": "arm_cmn",
48+
"Compat": "(434|436|43c|43a).*"
49+
},
50+
{
51+
"EventName": "hnf_sf_evictions",
52+
"EventidCode": "0x7",
53+
"NodeType": "0x5",
54+
"BriefDescription": "Counts number of SF eviction cache invalidations initiated.",
55+
"Unit": "arm_cmn",
56+
"Compat": "(434|436|43c|43a).*"
57+
},
58+
{
59+
"EventName": "hnf_dir_snoops_sent",
60+
"EventidCode": "0x8",
61+
"NodeType": "0x5",
62+
"BriefDescription": "Counts number of directed snoops sent (not including SF back invalidation).",
63+
"Unit": "arm_cmn",
64+
"Compat": "(434|436|43c|43a).*"
65+
},
66+
{
67+
"EventName": "hnf_brd_snoops_sent",
68+
"EventidCode": "0x9",
69+
"NodeType": "0x5",
70+
"BriefDescription": "Counts number of multicast snoops sent (not including SF back invalidation).",
71+
"Unit": "arm_cmn",
72+
"Compat": "(434|436|43c|43a).*"
73+
},
74+
{
75+
"EventName": "hnf_slc_eviction",
76+
"EventidCode": "0xa",
77+
"NodeType": "0x5",
78+
"BriefDescription": "Counts number of SLC evictions (dirty only).",
79+
"Unit": "arm_cmn",
80+
"Compat": "(434|436|43c|43a).*"
81+
},
82+
{
83+
"EventName": "hnf_slc_fill_invalid_way",
84+
"EventidCode": "0xb",
85+
"NodeType": "0x5",
86+
"BriefDescription": "Counts number of SLC fills to an invalid way.",
87+
"Unit": "arm_cmn",
88+
"Compat": "(434|436|43c|43a).*"
89+
},
90+
{
91+
"EventName": "hnf_mc_retries",
92+
"EventidCode": "0xc",
93+
"NodeType": "0x5",
94+
"BriefDescription": "Counts number of retried transactions by the MC.",
95+
"Unit": "arm_cmn",
96+
"Compat": "(434|436|43c|43a).*"
97+
},
98+
{
99+
"EventName": "hnf_mc_reqs",
100+
"EventidCode": "0xd",
101+
"NodeType": "0x5",
102+
"BriefDescription": "Counts number of requests that are sent to MC.",
103+
"Unit": "arm_cmn",
104+
"Compat": "(434|436|43c|43a).*"
105+
},
106+
{
107+
"EventName": "hnf_qos_hh_retry",
108+
"EventidCode": "0xe",
109+
"NodeType": "0x5",
110+
"BriefDescription": "Counts number of times a HighHigh priority request is protocolretried at the HN‑F.",
111+
"Unit": "arm_cmn",
112+
"Compat": "(434|436|43c|43a).*"
113+
},
114+
{
115+
"EventName": "rnid_s0_rdata_beats",
116+
"EventidCode": "0x1",
117+
"NodeType": "0xa",
118+
"BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 0. This event measures the read bandwidth, including CMO responses.",
119+
"Unit": "arm_cmn",
120+
"Compat": "(434|436|43c|43a).*"
121+
},
122+
{
123+
"EventName": "rnid_s1_rdata_beats",
124+
"EventidCode": "0x2",
125+
"NodeType": "0xa",
126+
"BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 1. This event measures the read bandwidth, including CMO responses.",
127+
"Unit": "arm_cmn",
128+
"Compat": "(434|436|43c|43a).*"
129+
},
130+
{
131+
"EventName": "rnid_s2_rdata_beats",
132+
"EventidCode": "0x3",
133+
"NodeType": "0xa",
134+
"BriefDescription": "Number of RData beats (RVALID and RREADY) dispatched on port 2. This event measures the read bandwidth, including CMO responses.",
135+
"Unit": "arm_cmn",
136+
"Compat": "(434|436|43c|43a).*"
137+
},
138+
{
139+
"EventName": "rnid_rxdat_flits",
140+
"EventidCode": "0x4",
141+
"NodeType": "0xa",
142+
"BriefDescription": "Number of RXDAT flits received. This event measures the true read data bandwidth, excluding CMOs.",
143+
"Unit": "arm_cmn",
144+
"Compat": "(434|436|43c|43a).*"
145+
},
146+
{
147+
"EventName": "rnid_txdat_flits",
148+
"EventidCode": "0x5",
149+
"NodeType": "0xa",
150+
"BriefDescription": "Number of TXDAT flits dispatched. This event measures the write bandwidth.",
151+
"Unit": "arm_cmn",
152+
"Compat": "(434|436|43c|43a).*"
153+
},
154+
{
155+
"EventName": "rnid_txreq_flits_total",
156+
"EventidCode": "0x6",
157+
"NodeType": "0xa",
158+
"BriefDescription": "Number of TXREQ flits dispatched. This event measures the total request bandwidth.",
159+
"Unit": "arm_cmn",
160+
"Compat": "(434|436|43c|43a).*"
161+
},
162+
{
163+
"EventName": "rnid_txreq_flits_retried",
164+
"EventidCode": "0x7",
165+
"NodeType": "0xa",
166+
"BriefDescription": "Number of retried TXREQ flits dispatched. This event measures the retry rate.",
167+
"Unit": "arm_cmn",
168+
"Compat": "(434|436|43c|43a).*"
169+
},
170+
{
171+
"EventName": "sbsx_txrsp_retryack",
172+
"EventidCode": "0x4",
173+
"NodeType": "0x7",
174+
"BriefDescription": "Number of RXREQ flits dispatched. This event is a measure of the retry rate.",
175+
"Unit": "arm_cmn",
176+
"Compat": "(434|436|43c|43a).*"
177+
},
178+
{
179+
"EventName": "sbsx_txdat_flitv",
180+
"EventidCode": "0x5",
181+
"NodeType": "0x7",
182+
"BriefDescription": "Number of TXDAT flits dispatched from XP to SBSX. This event is a measure of the write bandwidth.",
183+
"Unit": "arm_cmn",
184+
"Compat": "(434|436|43c|43a).*"
185+
},
186+
{
187+
"EventName": "sbsx_arvalid_no_arready",
188+
"EventidCode": "0x21",
189+
"NodeType": "0x7",
190+
"BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on AR channel.",
191+
"Unit": "arm_cmn",
192+
"Compat": "(434|436|43c|43a).*"
193+
},
194+
{
195+
"EventName": "sbsx_awvalid_no_awready",
196+
"EventidCode": "0x22",
197+
"NodeType": "0x7",
198+
"BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on AW channel.",
199+
"Unit": "arm_cmn",
200+
"Compat": "(434|436|43c|43a).*"
201+
},
202+
{
203+
"EventName": "sbsx_wvalid_no_wready",
204+
"EventidCode": "0x23",
205+
"NodeType": "0x7",
206+
"BriefDescription": "Number of cycles the SBSX bridge is stalled because of backpressure on W channel.",
207+
"Unit": "arm_cmn",
208+
"Compat": "(434|436|43c|43a).*"
209+
},
210+
{
211+
"EventName": "hni_txrsp_retryack",
212+
"EventidCode": "0x2a",
213+
"NodeType": "0x4",
214+
"BriefDescription": "Number of RXREQ flits dispatched. This event is a measure of the retry rate.",
215+
"Unit": "arm_cmn",
216+
"Compat": "(434|436|43c|43a).*"
217+
},
218+
{
219+
"EventName": "hni_arvalid_no_arready",
220+
"EventidCode": "0x2b",
221+
"NodeType": "0x4",
222+
"BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on AR channel.",
223+
"Unit": "arm_cmn",
224+
"Compat": "(434|436|43c|43a).*"
225+
},
226+
{
227+
"EventName": "hni_arready_no_arvalid",
228+
"EventidCode": "0x2c",
229+
"NodeType": "0x4",
230+
"BriefDescription": "Number of cycles the AR channel is waiting for new requests from HN-I bridge.",
231+
"Unit": "arm_cmn",
232+
"Compat": "(434|436|43c|43a).*"
233+
},
234+
{
235+
"EventName": "hni_awvalid_no_awready",
236+
"EventidCode": "0x2d",
237+
"NodeType": "0x4",
238+
"BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on AW channel.",
239+
"Unit": "arm_cmn",
240+
"Compat": "(434|436|43c|43a).*"
241+
},
242+
{
243+
"EventName": "hni_awready_no_awvalid",
244+
"EventidCode": "0x2e",
245+
"NodeType": "0x4",
246+
"BriefDescription": "Number of cycles the AW channel is waiting for new requests from HN-I bridge.",
247+
"Unit": "arm_cmn",
248+
"Compat": "(434|436|43c|43a).*"
249+
},
250+
{
251+
"EventName": "hni_wvalid_no_wready",
252+
"EventidCode": "0x2f",
253+
"NodeType": "0x4",
254+
"BriefDescription": "Number of cycles the HN-I bridge is stalled because of backpressure on W channel.",
255+
"Unit": "arm_cmn",
256+
"Compat": "(434|436|43c|43a).*"
257+
},
258+
{
259+
"EventName": "hni_txdat_stall",
260+
"EventidCode": "0x30",
261+
"NodeType": "0x4",
262+
"BriefDescription": "TXDAT valid but no link credit available.",
263+
"Unit": "arm_cmn",
264+
"Compat": "(434|436|43c|43a).*"
265+
}
266+
]

tools/perf/pmu-events/jevents.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ def unit_to_pmu(unit: str) -> Optional[str]:
289289
'cpu_core': 'cpu_core',
290290
'cpu_atom': 'cpu_atom',
291291
'ali_drw': 'ali_drw',
292+
'arm_cmn': 'arm_cmn',
292293
}
293294
return table[unit] if unit in table else f'uncore_{unit.lower()}'
294295

0 commit comments

Comments
 (0)