Skip to content
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

8265587: IGV: track nodes across matching #3654

Closed
wants to merge 2 commits into from

Conversation

@robcasloz
Copy link
Contributor

@robcasloz robcasloz commented Apr 23, 2021

This change preserves, as much as possible, the IGV node identifier of Ideal nodes in their corresponding machine nodes created by Matcher::match(). This makes it possible to track nodes when stepping from "Before matching" to "After matching" in IGV, as illustrated for an extracted compare-and-branch subgraph in the following screenshot:

before-after-matching

Limitations

This solution preserves most of the node relations across matching, however if an Ideal node is expanded into multiple machine nodes, only one of them is assigned the IGV identifier of the Ideal node (since IGV identifiers need to be unique within a compilation phase). This limitation can be seen in the following example, where the CmpU Ideal node is implemented with three compU_rReg machine nodes (one for each jmpConU machine node), but only one of the compU_rReg machine nodes (50) preserves the IGV identifier:

before-after-matching-limitation

Overcoming this limitation would require explicitly serializing the entire before-after relation among nodes and adapting IGV's node selection and graph difference logic, which seems too complex for a relatively infrequent case.

Testing

  • Regression-tested HotSpot changes on hs-tier1-3, windows-x64, linux-x64, linux-aarch64, and macosx-x64 (both release and debug).
  • Tested HotSpot graph generation and IGV graph loading and scheduling on tens of thousands of graphs by running 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.
  • Tested manually, for a few graphs, that nodes of different types can be tracked across matching.

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3654/head:pull/3654
$ git checkout pull/3654

Update a local copy of the PR:
$ git checkout pull/3654
$ git pull https://git.openjdk.java.net/jdk pull/3654/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3654

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3654.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 23, 2021

👋 Welcome back rcastanedalo! 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.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 23, 2021

@robcasloz 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.

Loading

@robcasloz robcasloz marked this pull request as ready for review Apr 23, 2021
@openjdk openjdk bot added the rfr label Apr 23, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 23, 2021

Webrevs

Loading

Copy link
Member

@TobiHartmann TobiHartmann left a comment

That's a nice enhancement, looks good to me!

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 27, 2021

@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:

8265587: IGV: track nodes across matching

Preserve the IGV node identifier of Ideal nodes in their corresponding machine
nodes after matching, to allow IGV users to track nodes across this phase.

Reviewed-by: thartmann, vlivanov

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 94 new commits pushed to the master branch:

  • 164454f: 8265867: thread.hpp defines some enums but no reference
  • 75a2354: 8266028: C2 computes -0.0 for Math.pow(-0.0, 0.5)
  • ca37be1: 8197800: Test java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java fails on Windows
  • cf92693: 8198619: java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java fails on mac
  • 2201e11: 8266055: ZGC: ZHeap::print_extended_on() doesn't disable deferred delete
  • ce48f04: 8198617: java/awt/Focus/6382144/EndlessLoopTest.java fails on mac
  • 0438cea: 8136517: [macosx]Test java/awt/Focus/8073453/AWTFocusTransitionTest.java fails on MacOSX
  • 6b5e5d7: 8266181: compiler/eliminateAutobox/TestEliminateBoxInDebugInfo should be in driver mode
  • 81b1502: 8266161: mark hotspot compiler/rtm tests which ignore VM flags
  • 4a8324d: 8266180: compiler/vectorapi/TestVectorErgonomics should be run in driver mode
  • ... and 84 more: https://git.openjdk.java.net/jdk/compare/b3a319c83441a8707fc4ddd1dc6a09d3de3097ac...master

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 master branch, type /integrate in a new comment.

Loading

@openjdk openjdk bot added the ready label Apr 27, 2021
@robcasloz
Copy link
Contributor Author

@robcasloz robcasloz commented Apr 27, 2021

That's a nice enhancement, looks good to me!

Thanks for reviewing, Tobias!

Loading

Copy link

@iwanowww iwanowww left a comment

Looks good.

Loading

@robcasloz
Copy link
Contributor Author

@robcasloz robcasloz commented Apr 27, 2021

Looks good.

Thanks Vladimir!

Loading

@robcasloz
Copy link
Contributor Author

@robcasloz robcasloz commented Apr 28, 2021

/summary
Preserve the IGV node identifier of Ideal nodes in their corresponding machine
nodes after matching, to allow IGV users to track nodes across this phase.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 28, 2021

@robcasloz Setting summary to:

Preserve the IGV node identifier of Ideal nodes in their corresponding machine
nodes after matching, to allow IGV users to track nodes across this phase.

Loading

@robcasloz
Copy link
Contributor Author

@robcasloz robcasloz commented Apr 28, 2021

/integrate

Loading

@openjdk openjdk bot closed this Apr 28, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Apr 28, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 28, 2021

@robcasloz Since your change was applied there have been 94 commits pushed to the master branch:

  • 164454f: 8265867: thread.hpp defines some enums but no reference
  • 75a2354: 8266028: C2 computes -0.0 for Math.pow(-0.0, 0.5)
  • ca37be1: 8197800: Test java/awt/Focus/NonFocusableWindowTest/NoEventsTest.java fails on Windows
  • cf92693: 8198619: java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java fails on mac
  • 2201e11: 8266055: ZGC: ZHeap::print_extended_on() doesn't disable deferred delete
  • ce48f04: 8198617: java/awt/Focus/6382144/EndlessLoopTest.java fails on mac
  • 0438cea: 8136517: [macosx]Test java/awt/Focus/8073453/AWTFocusTransitionTest.java fails on MacOSX
  • 6b5e5d7: 8266181: compiler/eliminateAutobox/TestEliminateBoxInDebugInfo should be in driver mode
  • 81b1502: 8266161: mark hotspot compiler/rtm tests which ignore VM flags
  • 4a8324d: 8266180: compiler/vectorapi/TestVectorErgonomics should be run in driver mode
  • ... and 84 more: https://git.openjdk.java.net/jdk/compare/b3a319c83441a8707fc4ddd1dc6a09d3de3097ac...master

Your commit was automatically rebased without conflicts.

Pushed as commit e879f8c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Loading

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