RFR: 8350864: C2: verify structural invariants of the Ideal graph [v7]

Marc Chevalier mchevalier at openjdk.org
Mon Sep 29 06:53:36 UTC 2025


On Wed, 24 Sep 2025 14:47:36 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   A better way to make them not debug-only, without very ad-hoc hacking
>
> src/hotspot/share/opto/graphInvariants.cpp line 275:
> 
>> 273: 
>> 274: private:
>> 275:   static void print_node_list(const Node_List& ctrl_succ, stringStream& ss) {
> 
> Perhaps this would be a good addition to `Node_List` as an analog to `Node::dump(suffix, mark, ss, dc)` instead of a private method of some verification class.

There is already a `Node_List::dump` and `Node_List::dump_simple`, but they are a bit ugly for my usage here in my opinion: `dump_simple` just dump the node index, and `dump` prefix each line with `%5d--> ` where %d is the rank in the list (which I don't need to display here, and I found a bit confusing).

But they are more than enough for debugging. So, I'm not sure we need a relatively light variation of `dump` in there.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26362#discussion_r2386871229


More information about the hotspot-compiler-dev mailing list