RFR(M): 8219584: Try to dump error file by thread which causes safepoint timeout
vladimir.kozlov at oracle.com
Wed Mar 6 19:14:00 UTC 2019
On 3/6/19 3:43 AM, Doerr, Martin wrote:
> my proposal JDK-8219584 is currently being reviewed on hotspot-runtime-dev, but it contains a small test which
> explicitly uses C2.
> May I get a review for TestAbortVMOnSafepointTimeout.java, please?
> Bug with description of the feature:
> The purpose of the method “test_loop” is to loop long enough to hit a safepoint timeout (with configured timeout delay).
> I compile it directly by C2 with -XX:-UseCountedLoopSafepoints and -XX:LoopStripMiningIter=0.
Yes, these flags combination should work even if one of this flag is set by testing infra.
Also you correctly use @requires vm.compiler2.enabled to run VM build where these flag are available.
> This should force the loop to get compiled without safepoint and 2 billion divisions should definitely take long enough
> to hit a 500ms safepoint timeout.
Compiling with -Xcomp may produce unexpected result. Did you look on generated code for test_loop() method?
Also use something smaller then Integer.MAX_VALUE for limit (subtract -100 for example) to simplify logic for overflow
You may also add -XX:LoopUnrollLimit=0 to avoid unrolling and other loop optimizations which you don't need. Check
> I’ve tested it many times on all platforms we have and I’ve never seen it failing.
Did you tested on SPARC? How long it takes to run on it?
> Is it fine to rely on this?
Yes, I think so.
> Best regards,
More information about the hotspot-compiler-dev