RFR: 8348645: IGV: visualize live ranges [v3]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Tue Feb 18 10:31:26 UTC 2025
> This changeset extends IGV with live range visualization. It introduces live ranges as first-class IGV entities and displays them along with the control-flow graph in the CFG view. Visualizing liveness information should hopefully make C2's register allocator easier to understand, diagnose, debug, and enhance.
>
> Live ranges are visible in C2 phases where liveness information is available, that is, phases `Initial liveness` to `Fix up spills` at IGV print level 4 or greater. For example, running a debug build of the JVM as follows:
>
>
> java -Xbatch -XX:CompileCommand=IGVPrintLevel,java.util.HashMap::newNode,4
>
>
> produces the following visualization for the `Initial spilling` phase:
>
> 
>
> Live ranges are first-class IGV entities, meaning that the user can:
>
> - search, select, and extract them;
>
> 
>
> - examine their properties in the `Properties` window or via tooltips;
>
> 
>
> - navigate to related IGV entities via a pop-up menu; and
>
> 
>
> - program filters that act om them according to their properties.
>
> 
>
> Live ranges are connected to nodes by a use-def relation: a node can define zero or one live ranges, and use multiple live ranges; a live range can be defined and used by multiple nodes. Consequently, a live range in IGV is visible if and only if all its related nodes are visible (fully or semi-transparently). Generally, the start and end of a live range are vertically aligned with the nodes that first define and last use the live range. To reflect accurately the semantics of Phi nodes w.r.t. liveness, the visualization treats live ranges related by Phi nodes specially: live ranges used by a Phi node end at the bottom of the corresponding predecessor basic blocks, whereas live ranges defined by a Phi node start at the top of the node's basic block. The following screenshot shows an example of a Phi node (`48 Phi`) joining live ranges `L8` and `L13` into `L15`:
>
> 
>
> The changeset extends the IGV graph printing logic in HotSpot t...
Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:
Remove unnecessary whitespace
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23558/files
- new: https://git.openjdk.org/jdk/pull/23558/files/00169223..08ee449e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23558&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23558&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23558.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23558/head:pull/23558
PR: https://git.openjdk.org/jdk/pull/23558
More information about the hotspot-compiler-dev
mailing list