aragozin/jvm-tools

cpu profiling accuracy

kingluo opened this issue · 1 comments

Could somebody help to clarify the cpu sampling result?
The question is here:
https://stackoverflow.com/questions/54005401/java-cpu-profiling-accuracy

In short, why the self time of main() is so high? Is it sensible?

You hit a pretty good example for safepoint bias phenomena.

You can find more detail in article below.

https://blog.ragozin.info/2019/03/lies-darn-lies-and-sampling-bias.html