Re: [PATCH v1 0/4] Test fixes and debug logging

From: Arnaldo Carvalho de Melo

Date: Fri Sep 19 2025 - 16:45:51 EST


On Sun, Sep 14, 2025 at 11:28:56AM -0700, Ian Rogers wrote:
> Testing in a hypervisor guest showed some issues that these patches
> try to address, or improve the debug situation upon.
>
> Ian Rogers (4):
> perf test: Be tolerant of missing json metric none value
> perf parse-events: Add debug logging to perf_event
> perf test: Don't fail if user rdpmc returns 0 when disabled
> perf stat-shadow: Display metric-only for 0 counters

Applied, but while checking before/after on a host, I see that these are
quite unstable:

root@x1:~# perf test -r10 linter
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : FAILED!
99: perf stat STD output linter : FAILED!
99: perf stat STD output linter : Ok
99: perf stat STD output linter : FAILED!
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : FAILED!
root@x1:~#

root@x1:~# for a in $(seq 20) ; do perf test linter ; echo "------" ; done
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : FAILED!
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : FAILED!
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
94: perf stat CSV output linter : FAILED!
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
------
root@x1:~#

root@x1:~# uname -a
Linux x1 6.16.5-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 4 16:37:21 UTC 2025 x86_64 GNU/Linux
root@x1:~# grep -m1 "model name" /proc/cpuinfo
model name : 13th Gen Intel(R) Core(TM) i7-1365U
root@x1:~#

All is well on AMD land:

root@number:~# perf test linter
94: perf stat CSV output linter : Ok
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
root@number:~# perf test -r 5 linter
94: perf stat CSV output linter : Ok
94: perf stat CSV output linter : Ok
94: perf stat CSV output linter : Ok
94: perf stat CSV output linter : Ok
94: perf stat CSV output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
97: perf stat JSON output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
99: perf stat STD output linter : Ok
root@number:~# uname -a
Linux number 6.16.7-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 11 17:46:54 UTC 2025 x86_64 GNU/Linux
root@number:~# grep -m1 "model name" /proc/cpuinfo
model name : AMD Ryzen 9 9950X3D 16-Core Processor
root@number:~#

acme@number:~/git/perf-tools-next$ git log --oneline -5
58c26aeac5132152 (HEAD -> perf-tools-next, perf-tools-next/tmp.perf-tools-next) perf stat-shadow: Display metric-only for 0 counters
f46533cc149e39bd perf test: Don't fail if user rdpmc returns 0 when disabled
9bb146fd8a342ae1 perf parse-events: Add debug logging to perf_event
64b3eae288bb4370 perf test: Be tolerant of missing json metric none value
0dc96cae063cbf9e perf build-id: Ensure snprintf string is empty when size is 0
acme@number:~/git/perf-tools-next$ sudo su -
root@number:~# perf -v
perf version 6.17.rc6.g58c26aeac513
root@number:~#

- Arnaldo