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

8283930: IGV: add toggle button to show/hide empty blocks in CFG view #8128

Closed
wants to merge 2 commits into from

Conversation

robcasloz
Copy link
Contributor

@robcasloz robcasloz commented Apr 6, 2022

This change introduces a toggle button to show or hide empty blocks in the control-flow graph view. Showing empty blocks can be useful to provide context, for example when extracting a small set of nodes. On the other hand, for large graphs it can be preferable to hide empty blocks so that the extracted nodes can be localized more easily. Since both modes have advantages or disadvantages, this change gives the user the option to quickly switch between them. The toggle button is only active in the control-flow graph view: empty blocks in the clustered sea-of-nodes view are never shown because they would be disconnected and hence would not provide any additional context.

Testing

  • Tested manually on a small selection of graphs.

  • Tested automatically viewing thousands of graphs with random node subsets extracted, in all four combinations of showing/hiding empty blocks and showing/hiding neighbors of extracted nodes. The automatic test is performed by instrumenting IGV to view graphs and extract nodes randomly as the graphs are loaded, and running java -Xcomp -XX:-TieredCompilation -XX:PrintIdealGraphLevel=4.

Screenshots

  • New toggle button:

toolbar

  • Example control-flow graph with extracted node (85) and shown empty blocks:

  • Example control-flow graph with the same extracted node and hidden empty blocks:

  • Progress

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

    Issue

    • JDK-8283930: IGV: add toggle button to show/hide empty blocks in CFG view

    Reviewers

    Reviewing

    Using git

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

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

    Using Skara CLI tools

    Checkout this PR locally:
    $ git pr checkout 8128

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

    Using diff file

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

    @bridgekeeper
    Copy link

    bridgekeeper bot commented Apr 6, 2022

    👋 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 Apr 6, 2022

    @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 Apr 6, 2022
    @robcasloz robcasloz marked this pull request as ready for review April 7, 2022 06:54
    @openjdk openjdk bot added the rfr Pull request is ready for review label Apr 7, 2022
    @mlbridge
    Copy link

    mlbridge bot commented Apr 7, 2022

    Webrevs

    Copy link
    Contributor

    @vnkozlov vnkozlov left a comment

    Choose a reason for hiding this comment

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

    Good feature

    @openjdk
    Copy link

    openjdk bot commented Apr 7, 2022

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

    8283930: IGV: add toggle button to show/hide empty blocks in CFG view
    
    Reviewed-by: kvn, chagedorn
    

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

    • a445ecd: 8284297: Move FILE_AND_LINE to a platform independent header
    • 003aa2e: 8282043: IGV: speed up schedule approximation
    • 8c18705: 8284433: Cleanup Disassembler::find_prev_instr() on all platforms
    • e572a52: 8280511: AArch64: Combine shift and negate to a single instruction
    • de9596c: 8284495: [testbug] Adapt nsk tests to the RISC-V platform
    • d4a4884: 8284458: CodeHeapState::aggregate() leaks blob_name
    • e98c32d: 8284043: com/sun/jdi/MethodInvokeWithTraceOnTest.java failing with com.sun.jdi.ObjectCollectedException
    • 343e5f0: 8282040: Remove unnecessary check made obsolete by JDK-8261941
    • d6f01e9: 8234128: jarsigner will not show not-signed-by-alias warning if an intermediate cert is in this keystore
    • 5bafcfd: 8284444: Sting typo
    • ... and 46 more: https://git.openjdk.java.net/jdk/compare/9d200d6e7a3399d2b5448c27e40eb3b4d14a02df...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 Apr 7, 2022
    @robcasloz
    Copy link
    Contributor Author

    Good feature

    Thanks for reviewing, 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.

    That looks nice! Thanks for following up with this RFE which I think is especially valuable for large graphs.

    @robcasloz
    Copy link
    Contributor Author

    Thanks for reviewing, Christian! I just applied your suggested refactorings.

    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, looks good!

    @robcasloz
    Copy link
    Contributor Author

    /integrate

    @openjdk
    Copy link

    openjdk bot commented Apr 8, 2022

    Going to push as commit 6028181.
    Since your change was applied there have been 56 commits pushed to the master branch:

    • a445ecd: 8284297: Move FILE_AND_LINE to a platform independent header
    • 003aa2e: 8282043: IGV: speed up schedule approximation
    • 8c18705: 8284433: Cleanup Disassembler::find_prev_instr() on all platforms
    • e572a52: 8280511: AArch64: Combine shift and negate to a single instruction
    • de9596c: 8284495: [testbug] Adapt nsk tests to the RISC-V platform
    • d4a4884: 8284458: CodeHeapState::aggregate() leaks blob_name
    • e98c32d: 8284043: com/sun/jdi/MethodInvokeWithTraceOnTest.java failing with com.sun.jdi.ObjectCollectedException
    • 343e5f0: 8282040: Remove unnecessary check made obsolete by JDK-8261941
    • d6f01e9: 8234128: jarsigner will not show not-signed-by-alias warning if an intermediate cert is in this keystore
    • 5bafcfd: 8284444: Sting typo
    • ... and 46 more: https://git.openjdk.java.net/jdk/compare/9d200d6e7a3399d2b5448c27e40eb3b4d14a02df...master

    Your commit was automatically rebased without conflicts.

    @openjdk openjdk bot added the integrated Pull request has been integrated label Apr 8, 2022
    @openjdk openjdk bot closed this Apr 8, 2022
    @openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 8, 2022
    @openjdk
    Copy link

    openjdk bot commented Apr 8, 2022

    @robcasloz Pushed as commit 6028181.

    💡 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.

    3 participants