RFR: 7903740: JMH: Perf event validation not working with skid options [v2]

Galder Zamarreño galder at openjdk.org
Fri Aug 16 08:52:04 UTC 2024


On Wed, 14 Aug 2024 08:51:13 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

>> Fixes https://bugs.openjdk.org/browse/CODETOOLS-7903740
>
> Galder Zamarreño has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - --log-fd not valid for perf record
>  - Switch to testing with perf record

I think my idea works.

On my linux box, for `cycles`, I get:

$ perf record --event cycles echo 1
1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.016 MB perf.data (7 samples) ]

$ perf report --stdio | grep 'cycles' | wc -l
1


For `cycles:p` I get:


❯ perf record --event cycles:p echo 1
1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.016 MB perf.data (8 samples) ]

$ perf report --stdio | grep 'cycles:p' | wc -l
1


Then on CI (see [test](https://github.com/galderz/github-actions/actions/runs/10417234664/job/28851057186)) I see:


$ perf record --event cycles echo 1
...
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.000 MB (null) ]

$ perf report --stdio | grep 'cycles' | wc -l
incompatible file format (rerun with -v to learn more)
0

-------------

PR Comment: https://git.openjdk.org/jmh/pull/132#issuecomment-2293103485


More information about the jmh-dev mailing list