RFR: JDK-8275865: Print deoptimization statistics in product builds [v2]

Volker Simonis simonis at openjdk.java.net
Wed Oct 27 11:43:50 UTC 2021

On Tue, 26 Oct 2021 16:24:41 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>>   Fix C1 case which doesn't print deoptimization statistics
> src/hotspot/share/runtime/java.cpp line 355:
>> 353:   }
>> 354: 
>> 355: #if defined(COMPILER1) || defined(COMPILER2) || defined(INCLUDE_JVMCI)
> Deoptimization statistic is collected and printed only for C2 and JVMCI otherwise it is empty:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/deoptimization.cpp#L2664
> There are calls to `Deoptimization::print_statistics()` at lines #234 and #244:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/java.cpp#L229
> In Tiered VM the call at line #234 will be executed when `LogVMOutput || LogCompilation` is true. But not when only `PrintOptoStatistics` is true. Which is bug.
> My suggestion is to remove call from line #234 and move call at #244 from under `#ifndef COMPILER1` guard.

Hi Vladimir,
thanks for looking into this PR. My initial condition was based on the corresponding condition in the debug branch. But you are completely right with your observation so I've changed the condition and the code in the debug branch like you've suggested.
Thank you and best regards,


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

More information about the hotspot-runtime-dev mailing list