JDK-8295166 : IGV: dump graph at more locations
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-10-11
  • Updated: 2023-12-19
  • Resolved: 2023-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b02Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Dump graph at more locations than currently. Specifically, at

- PHASE_REGISTER_ALLOCATION
- PHASE_BLOCK_ORDERING
- PHASE_PEEPHOLE
- PHASE_POSTALLOC_EXPAND

and before and after other optimizations

- Loop Peeling
- Partial Peeling
- Loop Unswitching
- Loop Unrolling
- Pre/Main/Post loops
- Superword
- Loop Predication
- Split If
- Range Check Elimination
- Before CCP (we currently only dump after CCP)

Additionally, we should
- Rearrange print levels if necessary to accommodate the new phase types.
- Enumerate phases that are reoccurring. For example, we already have PhaseIdealLoop1/2/3 but afterwards we just use "PhaseIdealLoop iterations" multiple times which sometimes makes it hard to find (again) the right graph when clicking around.
- Print the involved idx + node name for the additional before/after loop optimization dumps mentioned above to better match the -XX:+TraceLoopOpts output. For example, when peeling a loop with LoopNode "123 Loop", we could name the IGV graph "Before Loop Peeling - 123 Loop"

Note: All new phases should also be added to the CompilePhase enum [1] of the  IR framework.

[1] https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/compiler/lib/ir_framework/CompilePhase.java
Comments
Changeset: 701bc3bb Author: Daniel Lundén <daniel.lunden@oracle.com> Committer: Roberto Castañeda Lozano <rcastanedalo@openjdk.org> Date: 2023-12-08 11:08:08 +0000 URL: https://git.openjdk.org/jdk/commit/701bc3bbbe49a46aea7efc195463cc2efd64a785
08-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16120 Date: 2023-10-10 13:31:00 +0000
05-12-2023

Other related ideas which could also be done separately: - Enumerating phases that are reoccurring. For example, we already have PhaseIdealLoop1/2/3 but afterwards we just use "PhaseIdealLoop iterations" multiple times which sometimes makes it hard to find (again) the right graph when clicking around. - Print the involved idx + node name for the additional before/after loop optimization dumps mentioned above to better match the -XX:+TraceLoopOpts output. For example, when peeling a loop with LoopNode "123 Loop", we could name the IGV graph "Before Loop Peeling - 123 Loop"
06-09-2023

> - Before IGVN (afterwards might not be necessary as we have some existing dumps that cover this like Iter GVN*, or PhaseIdealLoop*) > - During IGVN as steps (this is very verbose but I often use that when debugging to see how IGVN is changing the graph) These two points are now covered by JDK-8310220.
04-09-2023

Other places, where we could dump the graph: Before and after major optimizations: - Loop Peeling - Partial Peeling - Loop Unswitching - Loop Unrolling - Pre/Main/Post loops - Superword - Loop Predication - Split If - Range Check Elimination Some more places: - Before CCP (we currently only dump after CCP) - Before IGVN (afterwards might not be necessary as we have some existing dumps that cover this like Iter GVN*, or PhaseIdealLoop*) - During IGVN as steps (this is very verbose but I often use that when debugging to see how IGVN is changing the graph) As mentioned above, we should rethink the print levels when deciding to dump graphs at more points.
29-11-2022

When these new compile phases are added, they should also be added to the compile phases specified in the IR framework (added by JDK-8280378).
11-10-2022