RFR: 8370569: IGV: dump more graph properties at bytecode parsing

Christian Hagedorn chagedorn at openjdk.org
Mon Oct 27 08:30:03 UTC 2025


On Fri, 24 Oct 2025 12:22:11 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset makes it easier to trace C2's individual bytecode parsing steps to the input class files and the output of type flow analysis, by:
> 
> 1. dumping the `map` node (holding the JVM state), basic block (reverse post-order index), and method name as properties of the graph that C2 dumps after each parsed bytecode at IGV dump level 6;
> 
> 2. appending this information to the graph name (hence generalizing [JDK-8356779](https://bugs.openjdk.org/browse/JDK-8356779)); and
> 
> 3. making the graph name suffix configurable via `Options -> Graph Name Suffix`. By default, it appends `(map: [map], block #[block] at [method])` to the names of graphs containing these properties (bytecode parsing dumps), and nothing otherwise.
> 
> Here are the `Outline` and `Properties` windows for
> 
> $ java -Xbatch -XX:CompileOnly=java.lang.String::charAt -XX:PrintIdealGraphLevel=6
> 
> before (left) and after (right) the changeset:
> 
> <img width="2537" height="1032" alt="before-after" src="https://github.com/user-attachments/assets/cbd78f21-2501-4dcf-b757-86a556002d95" />
> 
> Please let me know if there are other bytecode parsing graph properties that could be useful to dump, and whether you think the default graph name suffix contains the right amount of information.
> 
> #### Testing
>  - tier1.
>  - Tested automatically that dumping thousands of graphs does not trigger any assertion failure on HotSpot or IGV.

Nice improvement! I tried your patch out and I sometimes see a missing index for `map`. That might be expected but when looking at it, it rather suggests that something is off. If there is no `map`, maybe we can use "none" or completely remove the "map" entry for that graph.

<img width="358" height="27" alt="Image" src="https://github.com/user-attachments/assets/4bfece83-b5d7-46c2-82a7-f38dafc84359" />

src/utils/IdealGraphVisualizer/Settings/src/main/java/com/sun/hotspot/igv/settings/ViewPanel.java line 168:

> 166:     private void graphNameSuffixFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_graphNameSuffixFieldActionPerformed
> 167:         // TODO add your handling code here:
> 168:     }//GEN-LAST:event_graphNameSuffixFieldActionPerformed

Can you explain why this nop-action is needed?

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

PR Review: https://git.openjdk.org/jdk/pull/27975#pullrequestreview-3382239183
PR Review Comment: https://git.openjdk.org/jdk/pull/27975#discussion_r2464750262


More information about the hotspot-compiler-dev mailing list