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

JITWatch complains of missing -XX:+TraceClassLoading even when it's specified #330

Closed ssilverman closed 3 years ago

ssilverman commented 3 years ago

I built my program and produced logs using both jdk 11 and 14. My VM options are: -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation -XX:+PrintAssembly

However, when I try to examine the logs, I see this error in a dialog box:

JITWatch requires the -XX:TraceClassLoading VM switch to be used.

Please recreate your log file with this switch enabled."

I also see this in the console: ERROR o.a.j.u.JITWatchUI - Missing VM Switch -XX:+TraceClassLoading

ssilverman commented 3 years ago

Update: I discovered that the example uses v1.0.0 but there's a v1.1.5, so I tried that, and it appears that there's no org.adoptopenjdk.jitwatch.launch.LaunchUI class that exists in that Maven download, even though that's what's specified in the manifest.

ssilverman commented 3 years ago

Well, I added this repository:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

And used this dependency:

        <dependency>
            <groupId>com.github.AdoptOpenJDK</groupId>
            <artifactId>jitwatch</artifactId>
            <version>1.3.0</version>
        </dependency>

and now things are working. (I like Jitpack a lot.)

chriswhocodes commented 3 years ago

Hi, thanks for reporting.

The version(s) of JITWatch available in maven central are very old and missing a lot of features and bug fixes. I've tried and failed to get up the maven release learning curve a few times :(

For now I strongly recommend you clone and build JITWatch but I will try and find time to create a modern maven release.