RFR: 8309472: IGV: Add dump_igv(custom_name) for improved debugging

Christian Hagedorn chagedorn at openjdk.org
Mon Jun 5 14:23:08 UTC 2023


When debugging, I often add multiple IR dumps throughout the code to capture different states. To do that, I'm just re-using various `PHASE_XYZ` `CompilerPhaseType` enum values:

Compile::current()->print_method(PHASE_END, 3);

But this becomes confusing when using multiple such enum values and trying to remember what they actually mean. To overcome that (and to avoid creating new enum values each time), I suggest to introduce a new `dump_igv(custom_name)` method where `custom_name` can be an arbitrary string. Then we can use the following when debugging:

Compile::current()->dump_igv("foo");
Compile::current()->dump_igv("bar");

Thanks,
Christian

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

Commit messages:
 - 8309472: IGV: Add dump_igv(custom_name) for improved debugging

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

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


More information about the hotspot-compiler-dev mailing list