hs_gc profiler not working on JDK 17

Philippe Marschall kustos at gmx.net
Wed Dec 16 18:39:20 UTC 2020


Hello

I am using JMH 1.27 on a local JDK 17 / master build and can not get the
hs_gc profiler to work. Initially I got illegal access warnings, I
assume due to JEP 396 [1]. I managed to get them fixed using

--add-exports java.management/sun.management=ALL-UNNAMED
--add-opens java.management/sun.management=ALL-UNNAMED

However I still get no gc metrics in the results, as if I was running no
profiler. The "gc" profiler works fine.

I am running on a local JDK 17 / master build because I am working on a
JDK pull request and was asked to provide a microbenchmark.

  [1] https://openjdk.java.net/jeps/396

Cheers
Philippe


More information about the jmh-dev mailing list