RFR(S): 8152169: LockCompilationTest.java fails due method present in the compiler queue
Christian Thalinger
christian.thalinger at oracle.com
Fri Mar 18 22:15:22 UTC 2016
> On Mar 18, 2016, at 10:34 AM, Nils Eliasson <nils.eliasson at oracle.com> wrote:
>
>
>
> On 2016-03-18 18:30, Christian Thalinger wrote:
>>
>>> On Mar 18, 2016, at 5:02 AM, Nils Eliasson < <mailto:nils.eliasson at oracle.com>nils.eliasson at oracle.com <mailto:nils.eliasson at oracle.com>> wrote:
>>>
>>> Hi,
>>>
>>> Please review this test fix.
>>>
>>> Summary:
>>> This test tests the locking of the compilers - make sure no compiles can be completed while the lock is in place. When running with -XX:-TieredCompilation and -XX:CompileThreshold=100 we got a fairly long queue of compiles waiting, and when only C2 is available it can take longer to complete than the test wait time.
>>>
>>> Solution:
>>> Only allow compile of the test method - make sure we have no contention on the compile queue. With only a single method in the queue we can also reduce the wait time.
>>>
>>> Testing:
>>> Test run in failing configuration.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8152169 <https://bugs.openjdk.java.net/browse/JDK-8152169>
>>> Webrev: http://cr.openjdk.java.net/~neliasso/8152169/webrev.01/ <http://cr.openjdk.java.net/%7Eneliasso/8152169/webrev.01/>
>>
>> + // Sleep a while and then make sure the compile is still waiting
>> + try {
>> + Thread.sleep(5000);
>> + } catch (Exception e) {
>> + System.out.println("Thread sleep interrupted");
>> + }
>> Should we propagate this exception instead of just issuing a warning on stdout?
>
> Sure, that's better. There are no thread that can interrupt it at the moment, but better safe than sorry.
>
> Webrev: http://cr.openjdk.java.net/~neliasso/8152169/webrev.02/ <http://cr.openjdk.java.net/~neliasso/8152169/webrev.02/>
I was thinking making the method "throws Exception”. Would be simpler. main already does:
public static void main(String[] args) throws Exception {
>
> Regards,
> Nils
>>
>>>
>>> Regards,
>>> Nils
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160318/c2e891de/attachment.html>
More information about the hotspot-compiler-dev
mailing list