hs_gc profiler not working on JDK 17

Aleksey Shipilev shade at redhat.com
Thu Jan 7 11:10:31 UTC 2021


Hi,

On 12/16/20 7:39 PM, Philippe Marschall wrote:
> 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

Yeah, those look hard to salvage, to be honest. So it seems better to remove them:
   https://bugs.openjdk.java.net/browse/CODETOOLS-7902818

Use -prof jfr, if you need advanced VM data.

> 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.

Right. What metrics exactly were you looking for in hs_gc profiler?

-- 
Thanks,
-Aleksey



More information about the jmh-dev mailing list