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.04k stars 435 forks source link

Unable to see source code for project classes as well as java lang classes #374

Closed tomerr90 closed 1 year ago

tomerr90 commented 1 year ago

I have a project Im build and compiling using maven with the compiler and assembly plugins. Running on MacOS. I added the following to source locations:

But whatever I try it just wont read the source. Tried adding the relevant class file and java file directly (after changing the code to have the class in the default package) - Didnt work. Tried adding target/myPackage which contains the class files, also didnt work. Weird thing is that I cant see the source for java/jdk/sun classes either.

Running with: java --enable-preview --add-modules=jdk.incubator.vector -jar ui/target/jitwatch-ui-shaded.jar

chriswhocodes commented 1 year ago

Hi, please can you tell me your OS and JDK versions? Thanks.

tomerr90 commented 1 year ago

Ah, sorry, I was sure I added the Java version. JDK 17, MacOS Ventura 13.4. The sandbox seems to work properly for some reason.

chriswhocodes commented 1 year ago

Please can you try running one of the sandbox examples and see if that works for you? Could you upload the jitwatch.out logfile (or email to me chris@chrisnewland.com) ? Thanks.

tomerr90 commented 1 year ago

Sent. Yeah, like I wrote above, the sandbox example does work for some reason.

chriswhocodes commented 1 year ago

Hmm, nothing helpful in the log. Please can you show me your config window?

tomerr90 commented 1 year ago
image
chriswhocodes commented 1 year ago

Hi are you sure your source files are in target/classes?

tomerr90 commented 1 year ago
image
chriswhocodes commented 1 year ago

Hi, the source pane is for mounting .java files. Class files and jars are mounted in the lower section of the config pane.

tomerr90 commented 1 year ago

I tried that as well but added the wrong "level", should have added src/main/java. It works now, thank you so much!

chriswhocodes commented 1 year ago

Glad I could help 😀