-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8264842: IGV: different nodes sharing idx are treated as equal #3593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Encapsulate node identifiers by never showing them directly to the user. Instead, introduce a 'Short Node Text' property that dictates which node properties are shown in edge tooltips, slot tooltips, and node search bar. 'Short Node Text' has default value '[idx] [name]', and can be configured in Tools -> Options. This encapsulation enables decoupling the C2 node identifiers shown to the user (property 'idx') and internal node identifiers.
👋 Welcome back rcastanedalo! A progress list of the required criteria for merging this PR into |
@robcasloz The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
/label remove build |
@robcasloz |
This change has a side benefit: nodes that are renumbered by C2 (by calling Preserving node equivalence in more complex transformations (matching) is proposed in a separate RFE (JDK-8265587). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@robcasloz This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 67 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Thanks for reviewing, Igor and Vladimir! |
/summary |
@robcasloz Setting summary to:
|
/integrate |
@robcasloz Since your change was applied there have been 67 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit b3a319c. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This change replaces
Node::_idx
with a dedicatedNode::_igv_idx
as the internal node identifier for IGV._igv_idx
is unique across all phases in a compilation, which prevents IGV from wrongly treating unrelated nodes as if they were the same._igv_idx
is proposed instead ofNode::_debug_idx
, which is also unique across phases, for stability (the_debug_idx
identifiers of a compilation are affected by the entire compilation history) and flexibility (future enhancements such as JDK-8265587 require altering the node identifier in IGV-specific ways).The following figure illustrates the effect of using
_igv_idx
instead of_idx
as an internal node identifier. Using_idx
(left), node 54 is wrongly treated as created in two different phases (two green circles in the graph snapshot view), whereas using_igv_idx
(right), node 54 is shown as created once, as expected:At the IGV user interface level, this change encapsulates the internal node identifier by showing a "short node text" (configurable from
Tools -> Options
, defaulting to[idx] [name]
) in all places where the internal identifier was exposed before: edge tooltips, slot tooltips, and the node search results. The code in ViewPanel.form and ViewPanel.java is generated by NetBeans 12.3 by editing ViewPanel.java in "Design" mode.Testing
java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4 ...
on an instrumented IGV. Loading and scheduling are useful graph well-formedness tests, as they tend to fail for incorrect graphs, e.g. with repeated node identifiers.Short Node Text
field inTools -> Options
is displayed and stored correctly, and that it is honored by edge tooltips, slot tooltips, and node search results (on Linux and Windows, for JDK 8, 11, and 15).Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3593/head:pull/3593
$ git checkout pull/3593
Update a local copy of the PR:
$ git checkout pull/3593
$ git pull https://git.openjdk.java.net/jdk pull/3593/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3593
View PR using the GUI difftool:
$ git pr show -t 3593
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3593.diff