RFR: JDK-8278329: some TraceDeoptimization code not included in PRODUCT build

Doug Simon dnsimon at openjdk.java.net
Thu Dec 16 08:38:02 UTC 2021


On Thu, 16 Dec 2021 08:05:39 GMT, Tobias Holenstein <duke at openjdk.java.net> wrote:

>> src/hotspot/share/runtime/deoptimization.cpp line 734:
>> 
>>> 732:     tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d",
>>> 733:                   p2i(thread), p2i(array), exec_mode);
>>> 734:     tty->cr();
>> 
>> Same question as above about the necessity of `cr()`.
>
> DEOPT PACKING thread 0x00007f9b9b008a20 Compiled frame (sp=0x0000700002121f00 unextended sp=0x0000700002121f00, fp=0x0000000000000000, real_fp=0x0000700002121f30, pc=0x000000011bad5944)
>      nmethod   1714  154       4       java.lang.String::indexOf (29 bytes)
>      Virtual frames (innermost first):
>         0 - (0x00007f9b9ff91038) - ifge @ bci 13 
>         1 - (0x00007f9b9ff923a0) - invokestatic @ bci 13 
>      Created vframeArray 0x00007f9ba280a820
> 
> DEOPT UNPACKING thread 0x00007f9b9b008a20 vframeArray 0x00007f9ba280a820 mode 2
> 
> {method} {0x000000012d00b8c8} 'indexOf' '(II)I' in 'java/lang/String' - invokestatic @ bci 13 sp = 0x0000700002121eb8
> Expressions size: 0
> Locals size: 3
> [1. Interpreted Frame]
> [...]
> 
> I have put it for separating the `DEOPT PACKING`, `DEOPT UNPACKING` and `SAVED OOP RESULT` blocks for readability reasons. But I don't mind removing it, if a compact log is preferred.

I don't feel strongly about it but I think `-XX:+TraceDeoptimization -XX:-PrintDeoptimizationDetails` has never printed blank lines. However, this is primarily for human consumption so it's fine to leave as you have it.

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

PR: https://git.openjdk.java.net/jdk/pull/6746


More information about the hotspot-dev mailing list