RFR: 8283930: IGV: add toggle button to show/hide empty blocks in CFG view
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Fri Apr 8 08:45:21 UTC 2022
On Wed, 6 Apr 2022 15:27:48 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> 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:
>
> 
>
> - Example control-flow graph with extracted node (85) and shown empty blocks:
>
> <p align="center">
> <img src="https://user-images.githubusercontent.com/8792647/162010182-47c148dd-ba4a-4ed9-9013-c2b29e95f708.png" width="30%">
> </p
>
> - Example control-flow graph with the same extracted node and hidden empty blocks:
>
>
> <p align="center">
> <img src="https://user-images.githubusercontent.com/8792647/162010256-7faf7041-e132-4b0a-b2de-828d18c4a7f8.png" width="30%">
> </p
Thanks for reviewing, Christian! I just applied your suggested refactorings.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8128
More information about the hotspot-compiler-dev
mailing list