RFR: 8261336: IGV: enhance default filters
Roberto Castañeda Lozano
rcastanedalo at openjdk.java.net
Fri Feb 12 09:36:02 UTC 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:

Default color scheme before (left) and after (right) the proposed change:

Examples of the new 'Color by execution frequency' filter:


Example of the new 'Hide X subgraph'' filters, where only the data subgraph is shown:

Example of the new 'Hide X edges' filters, where all nodes remain in their position but only the memory edges are shown:

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).
-------------
Commit messages:
- Use 'subgraph' instead of 'nodes' in filter names, for clarity
- Add filters to hide edges by category
- Update year in headers
- Adjust frequency precision
- Improve color scale in 'Color by execution frequency' filter
- Add filter to color nodes by estimated execution frequency
- Lift simplification filter
- Merge simplification filters into a single, more intuitive one
- Add filters to hide nodes by category
- Reorder filters to preserve the behavior of 'Show control flow only'
- ... and 4 more: https://git.openjdk.java.net/jdk/compare/db0ca2b9...3ed1e3de
Changes: https://git.openjdk.java.net/jdk/pull/2499/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2499&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8261336
Stats: 359 lines in 25 files changed: 284 ins; 40 del; 35 mod
Patch: https://git.openjdk.java.net/jdk/pull/2499.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2499/head:pull/2499
PR: https://git.openjdk.java.net/jdk/pull/2499
More information about the hotspot-compiler-dev
mailing list