3 ms·
I just read this: http://psy-lob-saw.blogspot.com/2015/12/safepoints.html http://psy-lob-saw.blogspot.com/2015/12/safepoints.html Wow, I had no idea how bad sa
by vardump 10y ago
I just read this: http://psy-lob-saw.blogspot.com/2015/12/safepoints.html http://psy-lob-saw.blogspot.com/2015/12/safepoints.html
Wow, I had no idea how bad sampling profilers are on JVM. And apparently JVM profiling in general. So collecting a stack trace sample requires a thread being suspended at a safepoint. And a global safepoint requires suspending all threads? Sampler that needs to do that will surely not only miss real CPU time consumer but also significantly alter performance behavior.
Instrumentation is indeed often a pretty bad option as well.
Is it possible to resolve JVM stack traces captured from kernel side (Windows and Linux have mechanisms for this)? That would certainly get around any safepoint restrictions, right?
- hyperpape 10y agoYeah, I think there are ways to get around it, though I'm not super familiar with all of the details. I think that Java Mission Control from Oracle might not have the safepoint bias, and in open source there are also some attempts: https://github.com/RichardWarburton/honest-profiler/wiki https://github.com/RichardWarburton/honest-profiler/wiki.