AdoptOpenJDK / jitwatch

Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
Other
3.06k stars 437 forks source link

Total JIT Time in statistics does not match Longest Compilation Times #289

Closed jocull closed 6 years ago

jocull commented 6 years ago

Sorry if this is a duplicate! I noticed these two values do not match. I added some extra code here to sum the difference reported in Longest Compilation Times (dirty hacks, sorry!) just for my own information. I'm not exactly sure what the issue in the stats code is, but it appears all compilation times return zero. Perhaps an issue in the visitor?

chriswhocodes commented 6 years ago

Thanks for reporting, will investigate!

chriswhocodes commented 6 years ago

toplist_slowest_compile_times Hi, this toplist seems to be working for me. Would you mind sharing the log file and letting me know which JDK you used to generate it? Thanks.

jocull commented 6 years ago

Oh yes, that one is just fine! This is the one I was trying to refer to:

image

Where it says "Total JIT Time*"

chriswhocodes commented 6 years ago

stats OK, I'm getting a zero for that field too. Looks like a bug.

chriswhocodes commented 6 years ago

Fixed in https://github.com/AdoptOpenJDK/jitwatch/commit/24f826e15ccbc42f2fcda8480310001eb1ec7140 updateStats() needs to be called when handling the task tag not the nmethod tag otherwise start of compilation timestamp is zero so the duration wasn't being counted. Thanks for reporting :)

jocull commented 6 years ago

Thank you! Glad you were able to find it quickly :smile: