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

Assembly not found while using +PrintAssembly #338

Closed awildturtok closed 3 years ago

awildturtok commented 3 years ago

I am using the latest jitwatch master, executed with mvn clean compile test exec:java and it isn't showing me any Assembly in the Assembly pane:

image

Java Version

openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)

Jitwatch Version

$ git describe --tags
1.4.0-6-gbb50980

Comand

 java -XX:+UnlockDiagnosticVMOptions -XX:LogFile=mylogfile.log -XX:+PrintAssembly -XX:+LogCompilation -XX:+TraceClassLoading -Xmx120G -XX:+UseG1GC -jar

I have observed, that none of the Assembly is logged into mylogfile, but instead to stdout, which is why I've also tried concatenating them but to no avail.

I have attached both stdout and the logfile:

dumps.zip

90+% of the relevant source can be built using this Repo: https://github.com/bakdata/conquery/tree/feature/bye-bye-bucket-templates With mvn clean package -pl 'backend' -am -DskipTests

andrew-laird-by commented 3 years ago

FYI I had left a comment on how to enable hsdis, but upon closer reading I see you say that assembly IS being logged to stdout, so nevermind... :-).

awildturtok commented 3 years ago

I will check for hsdis anyway, but I am definetly getting something to stdout:

ImmutableOopMap{}pc offsets: 308 
ImmutableOopMap{rsi=Oop }pc offsets: 352 Compiled method (c1)  735572 19072       3       jetbrains.exodus.env.TransactionSet::add (156 bytes)
 total in heap  [0x00007f0580cd2390,0x00007f0580cd5790] = 13312
 relocation     [0x00007f0580cd2508,0x00007f0580cd2750] = 584
 main code      [0x00007f0580cd2760,0x00007f0580cd4440] = 7392
 stub code      [0x00007f0580cd4440,0x00007f0580cd44f0] = 176
 oops           [0x00007f0580cd44f0,0x00007f0580cd4528] = 56
 metadata       [0x00007f0580cd4528,0x00007f0580cd4620] = 248
 scopes data    [0x00007f0580cd4620,0x00007f0580cd4dd0] = 1968
 scopes pcs     [0x00007f0580cd4dd0,0x00007f0580cd5720] = 2384
 dependencies   [0x00007f0580cd5720,0x00007f0580cd5730] = 16
 nul chk table  [0x00007f0580cd5730,0x00007f0580cd5790] = 96
andrew-laird-by commented 3 years ago

Oh, that doesn't quite look like assembly to me. I actually recently released a blog where I looked at Jitwatch's assembly output so, for convenience, look at https://tech.blueyonder.com/java-giants/ and scroll down a bit to the assembly screenshots. You should have assembly commands like "mov", "add", "test", etc. What you showed looks more like the c1 log of what it did rather than true assembly. So, yes, I am back to thinking your hsdis installation isn't quite right.

awildturtok commented 3 years ago

That explains a lot!

awildturtok commented 3 years ago

It is working now, thanks for taking the time!