RFR: 8310220: IGV: dump graph after each IGVN step at level 4 [v2]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Wed Aug 30 08:55:44 UTC 2023
> This changeset instruments Iterative GVN (IGVN) in C2 to dump the Ideal graph after each effective step (i.e. when the graph is rewritten or the recorded types are refined). This enables fine-grained tracing of IGVN transformation sequences using Ideal Graph Visualizer. This technique has proved useful for the investigation of [JDK-8303513](https://bugs.openjdk.org/browse/JDK-8303513), and can be also useful for educational purposes:
>
> 
>
> These new dumps are emitted at print level 4 (`PrintIdealGraphLevel=4`), the highest level of detail.
>
> Following [feedback](https://bugs.openjdk.org/browse/JDK-8310220?focusedCommentId=14590132&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14590132) and offline discussions with Christian Hagedorn, the changeset also dumps the Ideal graph before and after IGVN at print level 3. This makes it possible to identify the source of graph changes between IGVN and other phases such as loop transformations. The existing phase `PHASE_MACH_ANALYSIS` is also promoted to print level 3, since it prints a single graph per compilation unit only (see print level documentation updates in this changeset). These additional changes increase the number of graph dumps per compilation at print level 3 by around 1.5x:
>
> 
>
> Finally, the verbose and rarely used bytecode parsing dumps are relegated to a new print level 5, which leaves the number of graphs per compilation at level 4 roughly as before the changeset.
>
> #### Testing
>
> - tier1-3 (linux-x64; release and debug mode).
>
> - Verified that thousands of new IGVN graph dumps are correctly opened and visualized with the Ideal Graph Visualizer, at print levels 3 to 5.
Roberto Castañeda Lozano 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 eight additional commits since the last revision:
- Update compile phase list in IR test framework
- Fix typo
- Move bytecode parse dumping to a new IGV dump level 5
- Merge branch 'master' into JDK-8310220
- Dump graph before IGVN (by popular demand) and after IGVN (for symmetry)
- Update IGV's README
- Promote PHASE_MACH_ANALYSIS dump to print level 3 (since it runs once per compilation)
- Dump Ideal graph after each IGVN step (in print level 4)
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14537/files
- new: https://git.openjdk.org/jdk/pull/14537/files/35ad9fba..e683d28d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14537&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14537&range=00-01
Stats: 177351 lines in 3531 files changed: 74319 ins; 81139 del; 21893 mod
Patch: https://git.openjdk.org/jdk/pull/14537.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14537/head:pull/14537
PR: https://git.openjdk.org/jdk/pull/14537
More information about the hotspot-compiler-dev
mailing list