public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] perf arm_spe: Dump IMPDEF events
@ 2026-04-07 14:05 James Clark
  2026-04-07 14:05 ` [PATCH v2 1/6] perf arm_spe: Make a function to get the MIDR James Clark
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: James Clark @ 2026-04-07 14:05 UTC (permalink / raw)
  To: John Garry, Will Deacon, Mike Leach, Leo Yan, Peter Zijlstra,
	Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	Al Grant
  Cc: linux-arm-kernel, linux-perf-users, linux-kernel, James Clark,
	Leo Yan

In the Arm SPE raw data dump, IMPDEF events aren't printed. Add the
ability to add names for some known events or print the raw event number
for unknown events.

For example:

  $ perf report -D

  ... ARM SPE data: size 0xd000 bytes
  00000000: b0 18 c6 32 80 00 80 ff a0  PC 0xff80008032c618 el1 ns=1
  00000009: 64 e7 42 00 00              CONTEXT 0x42e7 el1
  0000000e: 00 00 00 00 00              PAD
  00000013: 49 00                       LD GP-REG
  00000015: 52 16 10               	EV RETIRED L1D-ACCESS TLB-ACCESS

On N1 the event line becomes:

  00000015: 52 16 10                    EV RETIRED L1D-ACCESS TLB-ACCESS LATE-PREFETCH

Or on other cores it becomes:

  00000015: 52 16 10                    EV RETIRED L1D-ACCESS TLB-ACCESS IMPDEF:12

Signed-off-by: James Clark <james.clark@linaro.org>
---
Changes in v2:
- Put MIDR in arm_spe_pkt (Leo)
- Use for_each_set_bit() (Leo)
- Use BIT_ULL() to fix 32bit builds (Ian)
- Don't call strtol() with NULL (Ian)
- Link to v1: https://lore.kernel.org/r/20260401-james-spe-impdef-decode-v1-0-ad0d372c220c@linaro.org

---
James Clark (6):
      perf arm_spe: Make a function to get the MIDR
      perf arm_spe: Handle missing CPU IDs
      perf arm_spe: Store MIDR in arm_spe_pkt
      perf arm_spe: Turn event name mappings into an array
      perf arm_spe: Decode Arm N1 IMPDEF events
      perf arm_spe: Print remaining IMPDEF event numbers

 tools/perf/util/arm-spe-decoder/Build              |   2 +
 tools/perf/util/arm-spe-decoder/arm-spe-decoder.c  |  17 ++-
 tools/perf/util/arm-spe-decoder/arm-spe-decoder.h  |   3 +-
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.c     | 144 ++++++++++++++-------
 .../util/arm-spe-decoder/arm-spe-pkt-decoder.h     |   5 +-
 tools/perf/util/arm-spe.c                          |  62 ++++++---
 6 files changed, 158 insertions(+), 75 deletions(-)
---
base-commit: 74e2dbe7be5037a5e5eed6bc1ad562747ac88566
change-id: 20260331-james-spe-impdef-decode-d944f4fdcff7

Best regards,
-- 
James Clark <james.clark@linaro.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-04-07 15:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 14:05 [PATCH v2 0/6] perf arm_spe: Dump IMPDEF events James Clark
2026-04-07 14:05 ` [PATCH v2 1/6] perf arm_spe: Make a function to get the MIDR James Clark
2026-04-07 14:05 ` [PATCH v2 2/6] perf arm_spe: Handle missing CPU IDs James Clark
2026-04-07 15:30   ` Leo Yan
2026-04-07 14:05 ` [PATCH v2 3/6] perf arm_spe: Store MIDR in arm_spe_pkt James Clark
2026-04-07 15:41   ` Leo Yan
2026-04-07 14:05 ` [PATCH v2 4/6] perf arm_spe: Turn event name mappings into an array James Clark
2026-04-07 14:05 ` [PATCH v2 5/6] perf arm_spe: Decode Arm N1 IMPDEF events James Clark
2026-04-07 15:44   ` Leo Yan
2026-04-07 14:05 ` [PATCH v2 6/6] perf arm_spe: Print remaining IMPDEF event numbers James Clark
2026-04-07 15:46   ` Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox