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

Tobias Hartmann thartmann at openjdk.java.net
Fri Jan 7 07:38:11 UTC 2022


On Thu, 6 Jan 2022 14:15:38 GMT, Tobias Holenstein <duke at openjdk.java.net> 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.
>
> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Cleanup output of TraceDeoptimization

Great work, looks good to me. Just found some minor style issues.

src/hotspot/share/runtime/deoptimization.cpp line 1510:

> 1508:     ResourceMark rm;
> 1509:     stringStream st;
> 1510:     //st.print_cr("DEOPT PACKING thread " INTPTR_FORMAT " ", p2i(thread));

Should be removed.

src/hotspot/share/runtime/deoptimization.cpp line 1954:

> 1952: #if INCLUDE_JVMCI
> 1953:             , debug_id
> 1954: #endif

You can use `JVMCI_ONLY` here as well. Same in line 1840.

src/hotspot/share/runtime/vframeArray.cpp line 586:

> 584:     stringStream st;
> 585:     st.print_cr("DEOPT UNPACKING thread=" INTPTR_FORMAT " vframeArray=" INTPTR_FORMAT " mode=%d",
> 586:                p2i(current), p2i(this), exec_mode);

Indentation of line 586 is off-by-one.

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-dev mailing list