Allowed perf event validation not working when trying to use options to avoid skidding, e.g. ~:p~ option. E.g.
{code}
$ /home/g/1/jdk21u-dev/build/release-linux-x86_64/jdk/bin/java -jar /home/g/1/jmh/jmh-samples/target/benchmarks.jar JMHSample_01 -f 1 -i 1 -r 10 -wi 1 -w 10 -prof perfasm:events=cycles:p -v EXTRA
Profilers failed to initialize, exiting.
Unsupported event: cycles:p
{code}
The issue is that ~:p~ is not valid for aggregated counts and that's what JMH is using for validation:
{code}
perf stat --event cycles:p --log-fd 2 echo 1
1
Performance counter stats for 'echo 1':
<not supported> cycles:p
0.000927932 seconds time elapsed
0.000000000 seconds user
0.000988000 seconds sys
{code}
But ~:p~ is a valid option for ~perf record~, e.g.
{code}
$ perf record -a -e cycles:p sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.158 MB perf.data (260 samples) ]
$ perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 260 of event 'cycles:p'
...
{code}
{code}
$ /home/g/1/jdk21u-dev/build/release-linux-x86_64/jdk/bin/java -jar /home/g/1/jmh/jmh-samples/target/benchmarks.jar JMHSample_01 -f 1 -i 1 -r 10 -wi 1 -w 10 -prof perfasm:events=cycles:p -v EXTRA
Profilers failed to initialize, exiting.
Unsupported event: cycles:p
{code}
The issue is that ~:p~ is not valid for aggregated counts and that's what JMH is using for validation:
{code}
perf stat --event cycles:p --log-fd 2 echo 1
1
Performance counter stats for 'echo 1':
<not supported> cycles:p
0.000927932 seconds time elapsed
0.000000000 seconds user
0.000988000 seconds sys
{code}
But ~:p~ is a valid option for ~perf record~, e.g.
{code}
$ perf record -a -e cycles:p sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.158 MB perf.data (260 samples) ]
$ perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 260 of event 'cycles:p'
...
{code}
- links to
-
Commit(master) openjdk/jmh/7c6da952
-
Review(master) openjdk/jmh/132