RFR: 8367728: IGV: dump node address type

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Tue Sep 16 11:52:03 UTC 2025


On Tue, 16 Sep 2025 10:38:13 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> This changeset dumps the address type of each node (`Node::adr_type()`), when not null, into the IGV graphs. This should improve the visibility and diagnosability of C2 type inconsistencies, see e.g. [JDK-8367667](https://bugs.openjdk.org/browse/JDK-8367667).
>> 
>> #### Testing
>> - tier1 (windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64; release and debug mode).
>> - Tested IGV manually on a few selected graphs. Tested automatically that dumping thousands of graphs does not trigger any assertion failure (by running `java -Xcomp -XX:PrintIdealGraphLevel=1`).
>
> src/hotspot/share/opto/idealGraphPrinter.cpp line 452:
> 
>> 450:     }
>> 451:     if (n->adr_type() != nullptr) {
>> 452:       stringStream adr_type_stream;
> 
> Other stringStream around are using a preallocated buffer. Would it be a good idea here too?

Thanks for bringing this up. I did not use the pre-allocated buffer for simplicity, which I think I is more important than efficiency in this code - as long as the efficiency is not bad enough to turn into a usability problem. We should probably investigate (separately) simplifying all other uses of `stringStream` in the IGV dumping logic.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27310#discussion_r2352179908


More information about the hotspot-compiler-dev mailing list