jvm-profiling-tools / honest-profiler

A sampling JVM profiler without the safepoint sample bias
https://github.com/RichardWarburton/honest-profiler/wiki
MIT License
1.25k stars 146 forks source link

AGCT.UnknownJavaErr5 dominates CPU time #234

Closed ghost closed 6 years ago

ghost commented 6 years ago

a

sim.hpl.zip

nitsanw commented 6 years ago

hi @crowlogic This is not a HP issue so much as an AsyncGetCallTrace issue. Please see this page for details on how the samples are collected: https://github.com/jvm-profiling-tools/honest-profiler/wiki/How-are-samples-collected-by-honest-profiler Typically UnknownJava errors are the result of a runtime generated stub (such as arraycopy, array fill, itable/vtable lookups, some string related methods etc) sample which the AsyncGetCallTrace cannot walk the stack out of (but knows it's Java because it's compiled code in the code cache). If you were using JMC the profiler would simply ignore those samples. THAT IS THE WRONG THING TO DO. You can try Async Profiler, which works around this issue to some extent, or use perf combined with perf-map-agent. Thanks.

ghost commented 6 years ago

I see, thank you very much, that is good to know, I am indeed using System.arrayCopy quite a bit in that loop