RFR: 8371419: IGV: Add view to visualise dominator tree and dominator information

Damon Fenacci dfenacci at openjdk.org
Thu Nov 13 15:07:32 UTC 2025


This change introduces a dominator tree view in IGV’s CFG panel, enabling users to toggle between the control flow graph and the dominator tree. This makes dominator relationships easier to inspect than the current stdout-based output (`-XX:+PrintDominators`).

## Motivation
* Today, dominator information is difficult to access (e.g. via `-XX:+PrintDominators`, which is hard to read and correlate with the graph).
* IGV already computes dominators for some phases but does not visualize them.
* Comparing dominator trees across graphs/phases was not supported.
 
## What’s New
1. Toggle in the CFG view (toolbar button (<img width="34" height="30" alt="image" src="https://github.com/user-attachments/assets/d215d018-dbb6-4ef0-8129-2fab60999acf" />) to switch between:
   * Control Flow Graph (CFG)
   * Dominator Tree
2. Dominator edge coloring to indicate provenance:
   * Blue: dominator info provided by C2 (from GCM phase onward for now, a follow RFE will handle loop optimization dominator information)
   * Red: dominator info computed by IGV (pre-GCM)
3. Graph comparison enhancements:
   * Compare dominator trees between graphs (new)
   * Compare CFG differences between graphs (previously missing)
4. Node annotations:
   * `idom`: immediate dominator
   * `dom_depth`: dominator depth
   * `block`: numeric block ID for all nodes in a block
 
The resulting main view looks like this:
<img width="1415" height="1051" alt="Screenshot 2025-11-13 at 15 04 12" src="https://github.com/user-attachments/assets/2aedca80-45d6-40ba-8726-50d5b8fd68df" />

## Testing
* Tier 1-3
* Manual testing in IGV

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

Commit messages:
 - JDK-8371419: Update copyright year to 2025
 - JDK-8371419: undo unnecessary variable definition
 - JDK-8371419: remove white line
 - JDK-8371419: remove processBlockDominatorConnection
 - JDK-8371419: add dominator info in scheduler
 - JDK-8371419: remove superfluous toString
 - JDK-8371419: IGV: Add view to visualise dominator tree and dominator information

Changes: https://git.openjdk.org/jdk/pull/28293/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28293&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371419
  Stats: 296 lines in 15 files changed: 275 ins; 3 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/28293.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28293/head:pull/28293

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


More information about the hotspot-compiler-dev mailing list