Skip to contentSkip to conversation

perf/dwc_pcie: Support counting multiple lane events in parallel

PATCH Applied Ilkka Koskinen 2 participants 2 messages Aug 28, 2025 – Sep 18, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/dwc_pcie: Support counting multiple lane events in parallel

While Designware PCIe PMU allows to count only one time based event at a time, it allows to count all the lane events simultaneously. After the patch one is able to count a group of lane events:

  $  perf stat -e '{dwc_rootport/tx_memory_write,lane=1/,dwc_rootport/rx_memory_read,lane=0/}' dd if=/dev/nvme0n1 of=/dev/null bs=1M count=1

Earlier the events wouldn't have been counted successfully.

---
 .../admin-guide/perf/dwc_pcie_pmu.rst         |   4 +-
 drivers/perf/dwc_pcie_pmu.c                   | 161 ++++++++++++++----
 2 files changed, 132 insertions(+), 33 deletions(-)
Documentation/admin-guide/perf/dwc_pcie_pmu.rst +2 -2
index cb376f335f40..167f9281fbf5 100644
@@ -16,8 +16,8 @@ provides the following two features:
 
 - one 64-bit counter for Time Based Analysis (RX/TX data throughput and
   time spent in each low-power LTSSM state) and
-- one 32-bit counter for Event Counting (error and non-error events for
-  a specified lane)
+- one 32-bit counter per event for Event Counting (error and non-error
+  events for a specified lane)
 
 Note: There is no interrupt for counter overflow.
 
drivers/perf/dwc_pcie_pmu.c +130 -31

268 lines not on this page · raw message

Signature · 1 line
2.50.0
maintainer Applied
#1 lore raw
Quoted 9 lines · Ilkka Koskinen

While Designware PCIe PMU allows to count only one time based event at a time, it allows to count all the lane events simultaneously. After the patch one is able to count a group of lane events:

  $  perf stat -e '{dwc_rootport/tx_memory_write,lane=1/,dwc_rootport/rx_memory_read,lane=0/}' dd if=/dev/nvme0n1 of=/dev/null bs=1M count=1

Earlier the events wouldn't have been counted successfully.

[...]

Applied to will (for-next/perf), thanks!

[1/1] perf/dwc_pcie: Support counting multiple lane events in parallel

      https://git.kernel.org/will/c/71396cfac97d

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev