AdoptOpenJDK/jitwatch

Assembly not found when VM flag is enabled

LlamaLad7 opened this issue · 4 comments

VM Flags: -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation -XX:LogFile=D:\Documents\Programming\Java\jitwatch\sandbox\sandbox.log -XX:+PrintAssembly -XX:-BackgroundCompilation

sandbox.log

The hsdis DLL is definitely detected

Hi @LlamaLad7 I've built hsdis-amd64.dll on Windows 10 and copied it into zulu8/jre/bin/server/ (I use Azul's ZuluFX OpenJDK8 which includes JavaFX).

I've patched the disassembly search path to look in jre/bin/server and now it finds the hsdis binary and disassembly is working in JITWatch.

Please can you update to the latest code and try it (I also fixed the unit test that failed on Windows).

Thanks,

Chris

Hi, Chris. As you said, the unit test no longer fails, and I can now build successfully. I am still, however, getting the "Assembly not found" issue. Tomorrow I'll try building the dll again, and see if that helps anything. If you need anymore info / logs then let me know.

Thanks,

Llama

Hi, sorry I should have checked this earlier, I just spotted this in your sandbox log:
Could not load hsdis-amd64.dll; library not loadable; PrintAssembly is disabled
and there is no assembly in the log.

Can you tell me what happens when you run

java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly

Do you see assembly output to your console (you should if your hsdis is set up correctly) ?

According to the log file your VM is

java.vm.version=25.172-b11
java.vm.name=Java HotSpot(TM) 64-Bit Server VM

To get hsdis working on 64-bit Java8 I used the instructions here https://dropzone.nfshost.com/hsdis/ and followed them exactly, putting the DLL in zulu8/jre/bin/server/

Thanks,

Chris

Ah it appears I had the DLL in the wrong directory. Moving it to jdk/jre/bin/server has fixed the issue. Thanks!