Integrated: 8310220: IGV: dump graph after each IGVN step at level 4

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Mon Sep 4 07:44:46 UTC 2023


On Mon, 19 Jun 2023 10:21:57 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> 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:
> 
> ![igv-level4](https://github.com/openjdk/jdk/assets/8792647/56dc9729-d5eb-44f3-8614-dc72e17f1bef)
> 
> 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:
> 
> ![igv-level3](https://github.com/openjdk/jdk/assets/8792647/9bccc78b-13b8-428d-8c98-ef3f0f769f4c)
> 
> 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.

This pull request has now been integrated.

Changeset: 0d52c82e
Author:    Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0d52c82ed1fa6ecf5b431949c803abc8423336cb
Stats:     30 lines in 7 files changed: 15 ins; 1 del; 14 mod

8310220: IGV: dump graph after each IGVN step at level 4

Reviewed-by: chagedorn, tholenstein

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

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


More information about the hotspot-compiler-dev mailing list