RFR(S): 8066770: EnqueueMethodForCompilationTest.java fails to compile method

Nils Eliasson nils.eliasson at oracle.com
Thu Mar 3 14:30:29 UTC 2016


Hi,

Please review,

Bug: https://bugs.openjdk.java.net/browse/JDK-8066770
Webrev: http://cr.openjdk.java.net/~neliasso/8066770/webrev.02

Summary:
These tests fail intermittently when a method that is supposed to be 
compiled is not. This does not reproduce easily but the cause is 
understood to be that sometimes pending compilations become stale and 
are evicted from the compilation queue.

Solution:
Use the support for blocking compiles in 
https://bugs.openjdk.java.net/browse/JDK-8150646 that also prevents 
blocking tasks from going stale.

CompilerWhiteBoxTest.java - waitBackgroundCompilation changed to wait 
100ms between checking isMethodQueuedForCompilation. Saves a lot of time 
when most compilations are ready much faster than a second. When the 
compiles are blocking this should not be an issue.

I also reduced the LockCompilationTest to a single test case. Tests that 
extend CompilerWhiteboxTest run 6 different test cases. This test locks 
the compilations and waits 10 seconds before feeling reasonably sure 
that the test case never will be compiled. Doing this serially for 6 
test cases consumes a lot of time. Since the compile queues treat all 
compiles equally this is an acceptable limitation.

Results:
All related whitebox tests passes
3 min test time saved on a fast machine

Regards,
Nils Eliasson



Reference:
Test times before:

elapsed time (seconds): 0.378
elapsed time (seconds): 0.389
elapsed time (seconds): 0.393
elapsed time (seconds): 0.394
elapsed time (seconds): 0.394
elapsed time (seconds): 0.395
elapsed time (seconds): 0.395
elapsed time (seconds): 0.396
elapsed time (seconds): 0.397
elapsed time (seconds): 0.398
elapsed time (seconds): 0.404
elapsed time (seconds): 0.405
elapsed time (seconds): 0.41
elapsed time (seconds): 0.411
elapsed time (seconds): 0.413
elapsed time (seconds): 0.415
elapsed time (seconds): 0.421
elapsed time (seconds): 0.594
elapsed time (seconds): 0.601
elapsed time (seconds): 0.628
elapsed time (seconds): 0.646
elapsed time (seconds): 0.651
elapsed time (seconds): 1.218
elapsed time (seconds): 1.219
elapsed time (seconds): 1.28
elapsed time (seconds): 2.294
elapsed time (seconds): 2.595
elapsed time (seconds): 2.871
elapsed time (seconds): 3.674
elapsed time (seconds): 3.692
elapsed time (seconds): 4.711
elapsed time (seconds): 4.809
elapsed time (seconds): 10.562
elapsed time (seconds): 10.964
elapsed time (seconds): 42.838
elapsed time (seconds): 99.492

Test times after:
elapsed time (seconds): 0.344
elapsed time (seconds): 0.378
elapsed time (seconds): 0.388
elapsed time (seconds): 0.396
elapsed time (seconds): 0.396
elapsed time (seconds): 0.396
elapsed time (seconds): 0.401
elapsed time (seconds): 0.401
elapsed time (seconds): 0.402
elapsed time (seconds): 0.405
elapsed time (seconds): 0.406
elapsed time (seconds): 0.406
elapsed time (seconds): 0.406
elapsed time (seconds): 0.41
elapsed time (seconds): 0.413
elapsed time (seconds): 0.413
elapsed time (seconds): 0.429
elapsed time (seconds): 0.586
elapsed time (seconds): 0.609
elapsed time (seconds): 0.61
elapsed time (seconds): 0.643
elapsed time (seconds): 0.669
elapsed time (seconds): 0.698
elapsed time (seconds): 1.181
elapsed time (seconds): 1.232
elapsed time (seconds): 1.242
elapsed time (seconds): 1.341
elapsed time (seconds): 1.898
elapsed time (seconds): 2.515
elapsed time (seconds): 2.64
elapsed time (seconds): 2.707
elapsed time (seconds): 2.725
elapsed time (seconds): 2.843
elapsed time (seconds): 2.888
elapsed time (seconds): 2.936
elapsed time (seconds): 10.905

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160303/1e80dcf0/attachment.html>


More information about the hotspot-compiler-dev mailing list