RFR: 8360389: Support printing from C2 compiled code [v3]
Benoît Maillard
bmaillard at openjdk.org
Wed Aug 20 21:27:39 UTC 2025
On Tue, 19 Aug 2025 15:44:42 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:
>>
>> Use print_cr instead of \n
>
> src/hotspot/share/opto/compile.cpp line 5411:
>
>> 5409: }
>> 5410:
>> 5411: Node* Compile::make_debug_print_call(const char* str, address call_addr, PhaseGVN* gvn,
>
> I think it should be in graphKit.cpp similar to `GraphKit::make_runtime_call()`
This was the case in the first iteration of the implementation, but this meant that it could only be used during parsing, and not in subsequent phases. It was actually requested to be moved out of `GraphKit`, and a large chunk of the logic is about doing the wiring of the call node without depending on the `SafePointNode` available in `GraphKit`.
The three examples in the _More Examples_ section highlight use cases where `GraphKit` is not available. Maybe I should have started with one of these instead of the `return_values` example.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26475#discussion_r2289332208
More information about the hotspot-dev
mailing list