A similar question was asked here.
I'm profiling an Open JDK 11.0.2 application using JMC 7.1.0 which I've built according to the instructions.
The application is utilizing about 3 cores, there is no excessive gc and only a small portion of the time threads are doing native method calls that actually utilize CPU.
I'm using the default method sampling interval of 10ms. I enabled debug meta data outside of safepoints by using:
-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints
The number of samples taken is much less then I expect. Assuming conservatively that there is 1 on cpu thread running non native code at each sampling point, I would expect 100 samples / second. Yet I'm seeing only 1 sample / second.
The machine itself is usually 50% idle, so the sampling thread is not starved.
What can be causing the number of samples to be that low?