Skip to content

Conversation

@dafedafe
Copy link
Contributor

@dafedafe dafedafe commented Nov 13, 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 (image) 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:
Screenshot 2025-11-13 at 15 04 12

Testing

  • Tier 1-3
  • Manual testing in IGV

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8371419: IGV: Add view to visualise dominator tree and dominator information (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28293/head:pull/28293
$ git checkout pull/28293

Update a local copy of the PR:
$ git checkout pull/28293
$ git pull https://git.openjdk.org/jdk.git pull/28293/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28293

View PR using the GUI difftool:
$ git pr show -t 28293

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28293.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2025

👋 Welcome back dfenacci! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 13, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title JDK-8371419: IGV: Add view to visualise dominator tree and dominator information 8371419: IGV: Add view to visualise dominator tree and dominator information Nov 13, 2025
@openjdk
Copy link

openjdk bot commented Nov 13, 2025

@dafedafe The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@dafedafe dafedafe marked this pull request as ready for review November 13, 2025 15:03
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 13, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-compiler [email protected] rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant