RFR: 8316702: Only evaluate buffer when IGVPrintLevelOption >= 5

Xin Liu xliu at openjdk.org
Fri Sep 22 02:01:56 UTC 2023


This is a follow-up of JDK-8310220. hotspot C2 only emit IR per bytecode to IGV when level = 5. 

Currently, we conservatively check C->should_print_igv(1) in Parse::do_one_bytecode(). It's wasteful when level>=1 and <= 4. We evaluate `jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s", bci(), Bytecodes::name(bc()))` for each bytecode but emit nothing.

We should use the same level(5) in those 2 places.

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

Commit messages:
 - 8316702: Only evaluate buffer when IGVPrintLevelOption >= 5

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

PR: https://git.openjdk.org/jdk/pull/15878


More information about the hotspot-compiler-dev mailing list