RFR: 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set

Aleksey Shipilev shade at openjdk.java.net
Mon Nov 2 09:06:07 UTC 2020


Everywhere else in VM code we effectively do:

  if (CountBytecodes || TraceBytecodes || StopInterpreterAt) BytecodeCounter::...
  if (PrintBytecodeHistogram) BytecodeHistogram::...

But not in `DO_UPDATE_INSTRUCTION_COUNT` macro.
Adding these flags avoid the writes to statistics what would never be used (and those writes can even contend, afaics).
This change drops the Linux x86_64 Zero fastdebug build time from ~18m to ~17.5m.

Testing:
 - [x] Ad-hoc runs with Zero and affected flags

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

Commit messages:
 - 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set

Changes: https://git.openjdk.java.net/jdk/pull/997/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=997&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255737
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/997.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/997/head:pull/997

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


More information about the hotspot-runtime-dev mailing list