RFR: JDK-8278329: some TraceDeoptimization code not included in PRODUCT build
Tobias Holenstein
duke at openjdk.java.net
Thu Dec 16 08:09:04 UTC 2021
On Wed, 15 Dec 2021 14:12:59 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> After "JDK-8154011: Make `TraceDeoptimization` a diagnostic flag" some code was not included in the PRODUCT build.
>>
>> Removed all the #ifndef PRODUCT guards around `TraceDeoptimization` checks and made sure to be consistent.
>>
>> The DEOPT PACKING messages were controlled by `PrintDeoptimizationDetails` (develop flag), but DEOPT UNPACKING is controlled by `TraceDeoptimization` (product flag),. Therefore changed DEOPT PACKING messages to be controlled by `TraceDeoptimization` as well.
>>
>> Checked that tests are not affected. Checked on Aurora that performance is not affected.
>
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6746
More information about the hotspot-dev
mailing list