RFR: 8204680: Disassembly does not display code strings in stubs

Andrew Haley aph at redhat.com
Mon Jun 11 14:37:39 UTC 2018

So last Friday I was looking at the code we generate for the runtime
stubs and I noticed that there were no comments in the disassembly.
Which is odd, because I'm sure it used to work.  I found a bug which
prevented it from working, fixed it, but there was still no output.
What??!  This led me down a rabbit hole from which I was to emerge
several hours later.

It turns out there are two separate bugs.

When we disassemble, the code strings are found in the CodeBlob that
contains the code.  Unfortunately, when we use -XX:+PrintStubCode the
disassembly is done from a CodeBuffer before the code strings have
actually been copied to the code blob, so the disassembler finds no
code strings.

Also, the code strings are only copied into the CodeBlob if
PrintStubCode is true, so "call disnm()" in the debugger doesn't print
any code strings because they were lost when the CodeBlob was created.

With both of these fixed, we have fully-commented disassembly in the
stubs again.



Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-dev mailing list