RFR: 8284849: Add deoptimization to unified logging
David Holmes
dholmes at openjdk.java.net
Mon May 23 07:28:58 UTC 2022
On Fri, 20 May 2022 14:12:30 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
src/hotspot/share/runtime/deoptimization.cpp line 1937:
> 1935: if(Log(deoptimization)::is_info()) {
> 1936: LogMessage(deoptimization) lm;
> 1937: auto tm = trap_method();
Not sure use if C++11 type inference is a permitted use - I can't find it n the style guide.
src/hotspot/share/runtime/deoptimization.cpp line 1938:
> 1936: LogMessage(deoptimization) lm;
> 1937: auto tm = trap_method();
> 1938: lm.info("Deoptimization start {");
Do we use this brace style for other log messages? I'm not really seeing the need for a start/end delimiter here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8812
More information about the hotspot-dev
mailing list