RFR: 8255208: CodeStrings passed to Disassembler::decode are ignored

Claes Redestad redestad at openjdk.java.net
Thu Oct 22 08:20:18 UTC 2020


CodeStrings passed directly to Disassembler::decode are wrongly ignored.

This patch started out as a cleanup to clean out CodeStrings, but I realized as I was about to remove the suspiciously unused CodeStrings in the disassembler that them being unused was likely a bug.

For example, -XX:+PrintInterpreter (on debug builds) included messages which can help digesting the output (if not else by emitting text hooks to the place in the source code where the asm is generated):

  0x00007f1f7093becb: je 0x00007f1f7093bee5
 ;; call_VM_base: heap base corrupted?                                <<< omitted
  0x00007f1f7093bed1: mov $0x7f1f90c7ecb8,%rdi
  0x00007f1f7093bedb: and $0xfffffffffffffff0,%rsp
  0x00007f1f7093bedf: callq 0x00007f1f9046c0a0 = MacroAssembler::debug64(char*, long, long*) 

While PrintInterpreter is the only case that appears directly affected, restoring this capability seems useful in general.

The cleaning up of the code also has some nice side-effects such as reducing the size of a CodeBuffer from 432 to 408 bytes and marginally improving the static size of the JVM (as measured on linux-x64)

-------------

Commit messages:
 - Coalesce non-product fields in CodeBuffer
 - Merge branch 'master' into less_CodeStrings
 - Remove unnecessary args, minor cleanups, pass strings when decoding a CodeBuffer
 - Issue with printing codeStrings via InterpreterCodelet due using assign and strings getting freed. Restructure and add tracing code to allow verifying we still don't leak CodeStrings
 - Minor fixes
 - Minor fixes
 - Clean-up decode_env _strings initialization
 - Fix copy
 - Revert CodeStrings removal from disassemble - the fact this code was unused appears to be a regression
 - Remove _strings from InterpreterCodelet
 - ... and 11 more: https://git.openjdk.java.net/jdk/compare/1191a633...93c688ca

Changes: https://git.openjdk.java.net/jdk/pull/788/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=788&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255208
  Stats: 264 lines in 11 files changed: 60 ins; 146 del; 58 mod
  Patch: https://git.openjdk.java.net/jdk/pull/788.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/788/head:pull/788

PR: https://git.openjdk.java.net/jdk/pull/788


More information about the hotspot-dev mailing list