Skip to content
Andrew Laird edited this page Aug 8, 2019 · 9 revisions

JITWatch fails to parse timestamps in my locale

If you run JITWatch on a system with a different Locale to the one on which the logs were taken then you may find the different LogCompilation timestamp decimals are wrongly interpreted:

stamp="1,234" is interpreted as 1234 seconds and not the decimal 1 and 234/1000ths.

To work around this, start JITWatch with system properties that override the country and language to those of the system where the log was taken:

-Duser.country=DE -Duser.language=de

Compile chains missing in JITWatch

(Hotspot log does not contain any task tags)

The HotSpot VM writes LogCompilation information to a temporary file per JIT compiler thread and these temporary files are combined into hotspot.log when the VM shuts down.

If you stop the VM with SIGQUIT (kill -9) the VM does not combine the logs. Stopping the program with a System.exit() or using a SIGTERM (kill) signal will ensure the logs are combined.

OpenJDK does not include JavaFX, build of JITWatch fails.

At this time, OpenJDK builds from AdoptOpenJDK do not include JavaFX libraries. As a workaround, you can pull OpenJDK builds from other sources that do include this. One suggestion is https://www.azul.com/downloads/zulu-community/. Note that this site contains builds both with and without JavaFX so make sure you choose "JDK FX" and not just "JDK".

Scrolling painfully slow in TriView in OpenJDK 8

The combination of both recommendations below turned JITWatch from unusable to awesome for one user's experience. Your mileage may vary but the tricks are worth noting.

JavaFX and unsupported GPU

If scrolling is painfully slow in TriView, particularly on an older system, try "-Dprism.order=sw" in JVM arguments.

Large Heap Sizes

If loading a log file of several hundred megabytes or more and using a larger heap size (e.g. 10G+), try "-XX:+UseG1GC" in JVM arguments

Inconsistent/corrupted logs on Windows

Failure to gracefully shutdown java

On Windows, there is no way on the command line to gracefully shutdown a JVM. A graceful shutdown is required for the JVM to fully flush the JIT logs for JITWatch to parse. The workaround is to ask the JVM to load an agent jar where the agent jar requests that the loading JVM execute a graceful shutdown. Two open source tools can assist here:

Log not fully read by JITWatch

For large log files (e.g. 300MB+), JITWatch may fail to fully load the log file the first time. The symptom is that classes known to be JIT compiled are not listed as JIT compiled. The workaround is simply to hit Reset and Start. The second attempt will consistently load the entire log file.