RFR: 8360389: Support printing from C2 compiled code [v12]

Benoît Maillard bmaillard at openjdk.org
Thu Oct 2 14:51:33 UTC 2025


On Wed, 1 Oct 2025 18:45:44 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Benoît Maillard has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/opto/compile.cpp
>>   
>>   Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
>
> src/hotspot/share/opto/compile.cpp line 5387:
> 
>> 5385:       if (in->is_CFG()) {
>> 5386:         if (in->is_Multi()) {
>> 5387:           candidates.push(in->as_Multi()->proj_out(TypeFunc::Control));
> 
> Why you collect only one control output edge? IfNode has two. May be add comment if it is intentional.

This should not happen because we got here by following data inputs, so typically it cannot be an `IfNode` (I have added a comment). However @TobiHartmann pointed out that if we are trying to print the return value of a java call we should use the fall through projection of the `CatchNode` after the call. I have made the necessary changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26475#discussion_r2399089041


More information about the hotspot-dev mailing list