RFR: 8284849: Add deoptimization to unified logging [v9]
Jorn Vernee
jvernee at openjdk.java.net
Mon Jun 13 15:06:20 UTC 2022
On Fri, 10 Jun 2022 09:38:09 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.324s][debug][deoptimization] cid=236 level=4java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(I)Z trap_bci=26 unstable_if reinterpret pc=0x00007f8b30bf8b94 relative_pc=0x0000000000000174
>>
>>
>> Passes tier1.
>
> Johan Sjölén has updated the pull request incrementally with one additional commit since the last revision:
>
> Update with some nit fixes
Sorry, one more thing
src/hotspot/share/runtime/deoptimization.cpp line 1848:
> 1846: bool is_osr = nm->is_osr_method();
> 1847: ls.print("cid=%d%s level=%d",
> 1848: nm->compile_id(), (is_osr ? " osr" : ""), nm->comp_level());
I'd like to suggest using `%4d` for the cid (also used by PrintCompilation), as well as using spaces for if a method is not osr. That way, the method names will be aligned in the output.
Also, right now there is no space between the level and method name.
Suggestion:
ls.print("cid=%4d %s level=%d ",
nm->compile_id(), (is_osr ? "osr" : " "), nm->comp_level());
-------------
PR: https://git.openjdk.org/jdk/pull/8812
More information about the hotspot-dev
mailing list