RFR(S): 8146096: [TEST BUG] compiler/loopopts/UseCountedLoopSafepoints.java Timeouts
andreas.eriksson at oracle.com
Tue Feb 16 14:24:12 UTC 2016
I've changed the test so it will not timeout, by using the
WhiteBox.forceSafepoint() in a separate thread.
If there is a safepoint in the loop, then the test will exit after
taking one safepoint.
If instead all safepoints in the loop were removed, then the safepoint
operation will timeout after two seconds (because of
-XX:+SafepointTimeout) and it will be detected and the test will fail.
On 2016-01-20 10:26, Andreas Eriksson wrote:
> Vladimir Kozlov and Vladimir Ivanov,
> Ok, I'll look into using the whitebox api to fix the test.
> Thanks for looking at this.
> - Andreas
> On 2016-01-19 21:46, Vladimir Kozlov wrote:
>> Simple use timeout to check for generated safepoint is bad idea. It
>> is very inaccurate. At least you need to check call stack to see if
>> it stopped in compiled method.
>> I would prefer to see WB new interface which would check that loop
>> SafePointNode is generated during compilation of method. It will be
>> And we need such tests to make sure a feature is working - we can't
>> remove them.
>> On 1/19/16 4:50 AM, Vladimir Ivanov wrote:
>>> As an idea to improve the test: spawn a thread which executes the
>>> counted loop and then use WhiteBox.forceSafepoint() to
>>> trigger a safepoint.
>>> If the test times out, it means there's no safepoint in the loop.
>>> Also, it also simplifies the implementation - no need to spawn a
>>> child process, the check can be done in-process.
>>> Best regards,
>>> Vladimir Ivanov
>>> On 1/19/16 3:32 PM, Andreas Eriksson wrote:
>>>> Can I please have a review for the removal of
>>>> The test needs to do a loop that takes more than two seconds to
>>>> fully without doing a safepointing call. For this expensive atomic
>>>> operations were used. The problem is that on certain embedded
>>>> they are too expensive, and the test times out.
>>>> The loop length could probably be reduced, and it should still work on
>>>> faster machines. However, the test is not very useful, so I think it's
>>>> better to just remove it to avoid future problems.
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8146096
>>>> Test to be removed:
>>>> (I can create a webrev if you think it necessary.)
More information about the hotspot-compiler-dev