[9] RFR(S): [TESTBUG] Whitebox tests fail with -XX:CompileThreshold=100

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Oct 16 01:26:02 UTC 2014


On 10/15/14 1:47 AM, Tobias Hartmann wrote:
> Hi,
>
> please review the following patch.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8060454
> Webrev: http://cr.openjdk.java.net/~thartmann/8060454/webrev.00/
>
> Problem:
> The problem is that with a low CompileThreshold we execute the loop to trigger osr compilation fewer times. While the
> osr compilation should be triggered there is still a non-osr compilation request in the compile queue and therefore the
> osr compilation fails (see 'compilation_is_in_queue(method)' check in 'CompileBroker::compile_method_base').

This is strange. OSR (backbranch count) threshold should be reached before invocation count threshold. OSR threshold is 
calculated as invocation threshold * 1.3 (OnStackReplacePercentage flag). So for 100, OSR threshold should be 130.
Do you know why we get normal compilation in queue? Did we deoptimized first OSR compilation? In this case osr test is 
not correct - it should not trigger deoptimization.

Thanks,
Vladimir

>
> Solution:
> I moved the call to 'waitAndDeoptimize' from the warmup methods to the osr triggering methods to make sure that no
> non-osr compilation is in the queue after warmup.
>
> Maybe we should think about allowing both osr and non-osr compilations in the compile queue at the same time. Currently,
> we check this with the access flag 'JVM_ACC_QUEUED'. Unfortunately, it is not possible to simply add a new flag for osr
> compilations because all bitmasks are taken.
>
> Testing:
> Executed failing tests on JPRT with different VM options (this time including -XX:CompileThreshold). Results are
> attached to bug.
>
> Thanks,
> Tobias


More information about the hotspot-compiler-dev mailing list