Skip to content

powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names

Matt Turner linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20261106-ppc32-perf-bfa132a142db

Versions newest first

  1. v2 Latest8 patches 2 repliesIn review
  2. v18 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- Patch 7: Use SIAR only when it is in the same mode (user or kernel) as the interrupted context, and take the user/kernel flags from regs again. This keeps the callchain consistent with its first entry.
- Collected Reviewed-by tags.
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8powerpc/perf: mpc7450: Event 0x30d does not use the thresholdarch/powerpc/perf/mpc7450-pmu.c+1 -20 replies
2/8powerpc/perf: mpc7450: Event 0x634 counts L2 prefetches, not L1Iarch/powerpc/perf/mpc7450-pmu.c+2 -20 replies
3/8powerpc/perf: mpc7450: Remove the snoop retry alternativesarch/powerpc/perf/mpc7450-pmu.c+0 -10 replies
4/8powerpc/perf: mpc7450: Fill in the L1 data cache eventsarch/powerpc/perf/mpc7450-pmu.c+3 -30 replies
5/8powerpc/perf: mpc7450: Add the PMC6 L3 events to the alternatives tablearch/powerpc/perf/mpc7450-pmu.c+5 -50 replies
6/8powerpc/perf: mpc7450: Export the event format in sysfsarch/powerpc/perf/mpc7450-pmu.c+26 -00 replies
7/8powerpc/perf: Use SIAR for sample addresses on 32-bitarch/powerpc/perf/core-book3s.c+17 -14 replies
8/8powerpc/perf: mpc7450: Export event names in sysfsarch/powerpc/perf/mpc7450-events-list.h arch/powerpc/perf/mpc7450-pmu.c+315 -30 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchTanushree Shah
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/8] powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names

Patches 1-3 fix the MPC7450 perf driver's event tables against the manual (MPC7450UM Rev. 5, chapter 11). The worst is patch 3: an alternatives row joins three different events, so perf can report the count of a different event. In one test it was 374 times the real count.

Patch 4 fills in the L1 data cache events, patch 5 adds the PMC6 copies of five L3 events to the alternatives table, and patch 6 adds a format/ directory.

Patch 7 takes sample addresses from SIAR on 32-bit. When a counter overflows with interrupts disabled, the interrupted PC is where they are re-enabled; SIAR is not. It falls back to the interrupted PC when SIAR is on the other side of a user/kernel transition.

Patch 8 names the events in sysfs.

Tested on an iMac G4 (MPC7448). The 7448 has no L3, so patch 5 and the L3 half of patch 8 are untested.

---
Changes in v2:
- Patch 7: Use SIAR only when it is in the same mode (user or kernel) as the interrupted context, and take the user/kernel flags from regs again. This keeps the callchain consistent with its first entry.
- Collected Reviewed-by tags.
- Link to v1: https://patch.msgid.link/[email protected]

---
Matt Turner (8):
powerpc/perf: mpc7450: Event 0x30d does not use the threshold powerpc/perf: mpc7450: Event 0x634 counts L2 prefetches, not L1I powerpc/perf: mpc7450: Remove the snoop retry alternatives powerpc/perf: mpc7450: Fill in the L1 data cache events powerpc/perf: mpc7450: Add the PMC6 L3 events to the alternatives table powerpc/perf: mpc7450: Export the event format in sysfs powerpc/perf: Use SIAR for sample addresses on 32-bit powerpc/perf: mpc7450: Export event names in sysfs

 arch/powerpc/perf/core-book3s.c         |  18 ++-
 arch/powerpc/perf/mpc7450-events-list.h | 250 ++++++++++++++++++++++++++++++++
 arch/powerpc/perf/mpc7450-pmu.c         | 118 +++++++++++++--
 3 files changed, 369 insertions(+), 17 deletions(-)

---
base-commit: d68ce4e71248e1ff5af9654b407541d9260b3ba5
change-id: 20261106-ppc32-perf-bfa132a142db

Best regards,

Signature · 1 line
Matt Turner <[email protected]>