RFR: 8288926: make runtime/logging/DeoptStats.java more reliable

Volker Simonis simonis at openjdk.org
Wed Jun 22 09:40:43 UTC 2022


On Tue, 21 Jun 2022 23:11:43 GMT, Xin Liu <xliu at openjdk.org> wrote:

> Currently, the test only triggers one deoptimization and it is not the test itself. In [JDK-8287385](https://bugs.openjdk.org/browse/JDK-8287385), we suppress the superficial unstable_if traps and then we can't pass this test. We would like to make sure the test triggers a deoptimization itself and is not subject to external environment.
> 
> Before this change, vmOutput.log has the following information. 
> 
> <statistics type='deoptimization'>
> Deoptimization traps recorded:
>      1 (100.0%) total
>          unstable_if/reinterpret/if_icmpeq: 1 (100.0%)
> </statistics>
> 
> 
> After this change, it contains 2 deoptimizations. The null-check deopt comes from the test itself. 
> 
> <statistics type='deoptimization'>
> Deoptimization traps recorded:
>      2 (100.0%) total
>        null_check/maybe_recompile/getfield: 1 (50.0%)
>          unstable_if/reinterpret/if_icmpeq: 1 (50.0%)
> </statistics>
> 
> 
> Test:
> ``` 
> $make test TEST="runtime/logging/DeoptStats.java" CONF=linux-x86_64-server-release LOG=info

Change looks good. Thanks for catching this!

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

Marked as reviewed by simonis (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9228


More information about the hotspot-runtime-dev mailing list