RFR: 8315604: IGV: dump and visualize node bottom and phase types

Christian Hagedorn chagedorn at openjdk.org
Mon Sep 25 07:42:19 UTC 2023


On Fri, 22 Sep 2023 08:18:46 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset dumps node type information in IGV graphs. Type information includes node bottom types (`Node::bottom_type()`) and node phase types (GVN, IGVN, CCP) as IGV node properties `bottom_type` and `phase_type`. It also adds a filter (`Show types`) to display type information in the node labels:
> 
> ![igv-with-types](https://github.com/openjdk/jdk/assets/8792647/dbb15822-f365-454d-8142-fe851652656e)
> 
> The filter presents a concise version of the complete type information (for example, removing long interface lists from reference types). It shows the bottom type of each node (which is always available), followed by the phase type (prefixed with `P:`) if this is also available and differs from the bottom type (see, for example, node `124 AddI` in the picture above).
> 
> On the HotSpot side, the size of the `stringStream` buffer used to extract type information (and other properties such as `dump_spec`) is increased from 128 to 512 characters to prevent truncations. The additional type information and the buffer size change increase the size of the dumped graphs by around 10% on average.
> 
> Thanks to Christian Hagedorn for providing feedback on earlier versions of the changeset.
> 
> #### Testing
> 
> - tier1-3 (windows-x64, linux-x64, linux-aarch64, macosx-x64, macosx-aarch64; release and debug mode)
> - tested that thousands of graphs are correctly opened and visualized with IGV using different filter configurations
> - tested that graphs dumped interactively from GDB are correctly opened and visualized
> - tested that graphs dumped from earlier JVM versions are correctly handled by the new filter

That's a nice improvement! Cannot say much about the filter code - maybe someone else should have a look at that as well.

src/hotspot/share/opto/idealGraphPrinter.cpp line 387:

> 385:       t->dump_on(&bottom_type_stream);
> 386:       print_prop("bottom_type", buffer);
> 387:       if (types != nullptr) {

Could we just use `Compile::current()->types()` here instead of passing it in? We do not seem to use any other types array apart from `Compile::types()`. We are already accessing `Compile::current()` above on line 375.

-------------

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15881#pullrequestreview-1641506544
PR Review Comment: https://git.openjdk.org/jdk/pull/15881#discussion_r1335495716


More information about the hotspot-compiler-dev mailing list