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

Aleksey Shipilev shade at openjdk.java.net
Tue Nov 3 12:20:15 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

Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Rewrite the block to hide flags under major check
 - Merge branch 'master' into JDK-8255737-zero-do-update-flags
 - 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/997/files
  - new: https://git.openjdk.java.net/jdk/pull/997/files/e2aaf25a..d75d182f

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=997&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=997&range=00-01

  Stats: 6104 lines in 271 files changed: 3549 ins; 1109 del; 1446 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