RFR: 8284849: Add deoptimization to unified logging [v2]
Jorn Vernee
jvernee at openjdk.java.net
Tue May 31 17:02:49 UTC 2022
On Fri, 27 May 2022 12:20:43 GMT, Johan Sjölén <duke at openjdk.java.net> wrote:
>> This PR adds a new "deoptimization" tag and a new log message on the info level mimicking JFR's deoptimization event. In the future this tag will be used to add trace level information, hopefully replacing TraceDeoptimization. JFR's event also captures the stacktrace, which this does not (happy to add this if considered important).
>>
>> An example output looks like this:
>>
>>
>> [1.346s][info][deoptimization] Deoptimization start {
>> [1.346s][info][deoptimization] compileId = 407
>> [1.346s][info][deoptimization] compiler = c2
>> [1.346s][info][deoptimization] method:lineno:bci = java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(I)Z:176:26
>> [1.346s][info][deoptimization] instruction = ifne
>> [1.346s][info][deoptimization] reason = unstable_if
>> [1.346s][info][deoptimization] action = reinterpret
>> [1.346s][info][deoptimization] } Deoptimization end
>
> Johan Sjölén has updated the pull request incrementally with one additional commit since the last revision:
>
> Change log to single line
I think this looks good overall. 1 comment inline
src/hotspot/share/runtime/deoptimization.cpp line 1939:
> 1937: const char* reason_action = Deoptimization::trap_action_name(action);
> 1938: JFR_ONLY(post_deoptimization_event(nm, tm, trap_bci, trap_bc, reason, action);)
> 1939: if (Log(deoptimization)::is_info()) {
I don't think this `if` is needed now? The `log_debug` macro already seems to check whether the tag is enabled.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8812
More information about the hotspot-dev
mailing list