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

8261336: IGV: enhance default filters #2499

Closed
wants to merge 19 commits into from

Conversation

robcasloz
Copy link
Contributor

@robcasloz robcasloz commented Feb 10, 2021

Redesign the filters shown by default in the "Filters" window:

  • Add filters to color the graph by node category and execution frequency (if applicable), and to hide subgraphs or edges only by category. The category of a node can be one of {data, memory, control, mixed, other}, and is solely determined by its type. mixed nodes are those with a tuple type that has different categories, such as CallStaticJavaNode. The category of an edge is that of its source node.

  • Instrument C2 to include the category and estimated execution frequency (if available) of each node in the graph dumps produced by -XX:PrintIdealGraphLevel=N (only in debug builds).

  • Remove filters which depend on properties never emitted by C2 (e.g. 'Remove State') or which appear to be unused ('C2 Matcher Flags Coloring' and 'C2 Register Coloring'). Also remove the subsumed 'C2 Basic Coloring' filter.

  • Merge 'C2 Remove Filter' and 'C2 Structural' into a single filter with a clearer name ('Simplify graph').

Screenshots

"Filters" window before (left) and after (right) the proposed change:
filters-window
Default color scheme before (left) and after (right) the proposed change:
color-scheme
Examples of the new 'Color by execution frequency' filter:
color-by-frequency-2
color-by-frequency-1
Example of the new 'Hide X subgraph'' filters, where only the data subgraph is shown:
hide-all-but-data-subgraphs
Example of the new 'Hide X edges' filters, where all nodes remain in their position but only the memory edges are shown:
hide-all-but-memory-edges

Tested IGV manually on a few graphs. Tested C2 instrumentation by running hs-tier1 with -Xbatch -XX:PrintIdealGraphLevel=3 -XX:PrintIdealGraphFile=graph.xml on windows-x64, linux-x64, linux-aarch64, and macosx-x64 (all debug).


Progress

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

Issue

Reviewers

Contributors

  • Christian Hagedorn <chagedorn@openjdk.org>

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2499/head:pull/2499
$ git checkout pull/2499

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 10, 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.

@openjdk
Copy link

openjdk bot commented Feb 10, 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.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Feb 10, 2021
@robcasloz robcasloz marked this pull request as ready for review February 12, 2021 09:32
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 12, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 12, 2021

Webrevs

Copy link
Contributor

@iwanowww iwanowww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@openjdk
Copy link

openjdk bot commented Feb 12, 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:

8261336: IGV: enhance default filters

Add filters to color and hide parts of the graph based on node categories or
estimated execution frequency, and simplify remaining filters.

Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Reviewed-by: vlivanov, chagedorn, thartmann

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

  • 3f8819c: 8261501: Shenandoah: reconsider heap statistics memory ordering
  • 3cbd16d: 8259668: Make SubTasksDone use-once
  • 219b115: 8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
  • cdc874d: 8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
  • e2d52ae: 8261413: Shenandoah: Disable class-unloading in I-U mode
  • 34ae7ae: 8261609: remove remnants of XML-driven builders
  • 6badd22: 8261351: Create implementation for NSAccessibilityRadioButton protocol
  • 849f4c0: 8260291: The case instruction is not visible in dark mode
  • 2e610f5: 8260687: Inherited font size is smaller than expected when using StyleSheet to add styles
  • 3882fda: 8260414: Remove unused set_single_threaded_mode() method in task executor
  • ... and 96 more: https://git.openjdk.java.net/jdk/compare/db0ca2b9d40963e19a1d9c169e42463a4c2c8a07...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.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 12, 2021
@robcasloz
Copy link
Contributor Author

Very nice!

Thanks Vladimir!

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, very nice improvement! I applied the patch and played around with it in the IGV. Everything seems to work as expected. I like the new default filters and the new colors for the new categories. That makes it much more useful.

src/hotspot/share/opto/idealGraphPrinter.hpp Outdated Show resolved Hide resolved
src/hotspot/share/opto/type.cpp Show resolved Hide resolved
src/hotspot/share/opto/type.hpp Outdated Show resolved Hide resolved
src/hotspot/share/opto/idealGraphPrinter.cpp Show resolved Hide resolved
src/hotspot/share/opto/type.cpp Outdated Show resolved Hide resolved
@robcasloz
Copy link
Contributor Author

Otherwise, very nice improvement! I applied the patch and played around with it in the IGV. Everything seems to work as expected. I like the new default filters and the new colors for the new categories. That makes it much more useful.

Thanks for reviewing Christian! I will have a look at your comments on Monday.

@robcasloz
Copy link
Contributor Author

/contributor add @chhagedorn

@openjdk
Copy link

openjdk bot commented Feb 15, 2021

@robcasloz
Contributor Christian Hagedorn <chagedorn@openjdk.org> successfully added.

@robcasloz
Copy link
Contributor Author

Otherwise, very nice improvement! I applied the patch and played around with it in the IGV. Everything seems to work as expected. I like the new default filters and the new colors for the new categories. That makes it much more useful.

Thanks for reviewing Christian! I will have a look at your comments on Monday.

I have addressed them now, please re-review.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my suggestions. I tested it again - looks good!

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome. Thanks a lot for taking the time to improve the IGV. Looks good to me!

@robcasloz
Copy link
Contributor Author

Thanks Christian and Tobias for reviewing!

@robcasloz
Copy link
Contributor Author

/summary
Add filters to color and hide parts of the graph based on node categories or
estimated execution frequency, and simplify remaining filters.

@openjdk
Copy link

openjdk bot commented Feb 16, 2021

@robcasloz Setting summary to:

Add filters to color and hide parts of the graph based on node categories or
estimated execution frequency, and simplify remaining filters.

@robcasloz
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Feb 16, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 16, 2021
@openjdk
Copy link

openjdk bot commented Feb 16, 2021

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

  • 3f8819c: 8261501: Shenandoah: reconsider heap statistics memory ordering
  • 3cbd16d: 8259668: Make SubTasksDone use-once
  • 219b115: 8261422: Adjust problematic String.format calls in jdk/internal/util/Preconditions.java outOfBoundsMessage
  • cdc874d: 8261601: free memory in early return in Java_sun_nio_ch_sctp_SctpChannelImpl_receive0
  • e2d52ae: 8261413: Shenandoah: Disable class-unloading in I-U mode
  • 34ae7ae: 8261609: remove remnants of XML-driven builders
  • 6badd22: 8261351: Create implementation for NSAccessibilityRadioButton protocol
  • 849f4c0: 8260291: The case instruction is not visible in dark mode
  • 2e610f5: 8260687: Inherited font size is smaller than expected when using StyleSheet to add styles
  • 3882fda: 8260414: Remove unused set_single_threaded_mode() method in task executor
  • ... and 96 more: https://git.openjdk.java.net/jdk/compare/db0ca2b9d40963e19a1d9c169e42463a4c2c8a07...master

Your commit was automatically rebased without conflicts.

Pushed as commit 16bd7d3.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants