Skip to contentSkip to conversation

libperf mmap: Arm64: fix transposed reads of counters 12 and 13

PATCH Applied Ian Rogers 4 participants 4 messages Nov 18 – Nov 24 perf events

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 libperf mmap: Arm64: fix transposed reads of counters 12 and 13

Reported in Sashiko bug linux-3291a858-209c-483a-b4dc-eeb57abdaee6, the 2 counter read functions for counters 12 and 13 are transposed.

Fixes 407eb43ae87c ("libperf: Add arm64 support to perf_mmap__read_self()")
---
 tools/lib/perf/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/perf/mmap.c +1 -1
index ab3adf1d8baf..92acb0e911f7 100644
@@ -376,8 +376,8 @@ static u64 read_perf_counter(unsigned int counter)
 		read_pmevcntr_9,
 		read_pmevcntr_10,
 		read_pmevcntr_11,
-		read_pmevcntr_13,
 		read_pmevcntr_12,
+		read_pmevcntr_13,
 		read_pmevcntr_14,
 		read_pmevcntr_15,
 		read_pmevcntr_16,
Signature · 1 line
2.56.1.708.g77570a6a1d-goog
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines

Reported in Sashiko bug linux-3291a858-209c-483a-b4dc-eeb57abdaee6, the 2 counter read functions for counters 12 and 13 are transposed.

Fixes 407eb43ae87c ("libperf: Add arm64 support to perf_mmap__read_self()")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Ian Rogers
Quoted 14 lines · Ian Rogers

Reported in Sashiko bug linux-3291a858-209c-483a-b4dc-eeb57abdaee6, the 2 counter read functions for counters 12 and 13 are transposed.

Fixes 407eb43ae87c ("libperf: Add arm64 support to perf_mmap__read_self()")
---
  tools/lib/perf/mmap.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/perf/mmap.c +0 -0
index ab3adf1d8baf..92acb0e911f7 100644

tools/lib/perf/mmap.c static u64 read_perf_counter(unsigned int counter) · line 383

Quoted 9 lines
tools/lib/perf/mmap.c +1 -1
@@ -376,8 +376,8 @@ static u64 read_perf_counter(unsigned int counter)
  		read_pmevcntr_9,
  		read_pmevcntr_10,
  		read_pmevcntr_11,
-		read_pmevcntr_13,
  		read_pmevcntr_12,
+		read_pmevcntr_13,
  		read_pmevcntr_14,
  		read_pmevcntr_15,
  		read_pmevcntr_16,

Interesting mistake. Doesn't seem to have been copied from any of the other enumerations of PMEVCNTR either.

maintainer Applied
#3 lore raw
In reply to Ian Rogers
Quoted 2 lines · Ian Rogers

Reported in Sashiko bug linux-3291a858-209c-483a-b4dc-eeb57abdaee6, the 2 counter read functions for counters 12 and 13 are transposed.

Applied to perf-tools-next, thanks!

Best regards
Namhyung