On Thu, 30 Jun 2022 15:48:07 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Xue-Lei Andrew Fan has updated the pull request with a new target base due 
>> to a merge or a rebase. The pull request now contains 13 commits:
>> 
>>  - Master
>>  - use Reference.refersTo
>>  - remove trailing whitespaces
>>  - use timeout factor
>>  - Merge
>>  - Merge master
>>  - Merge
>>  - add timeout parameter
>>  - rollback is not in this branch
>>  - rollback JDK-8287384
>>  - ... and 3 more: https://git.openjdk.org/jdk/compare/47b86690...0f196282
>
> test/lib/jdk/test/lib/util/ForceGC.java line 58:
> 
>> 56:         Reference.reachabilityFence(ref);
>> 57: 
>> 58:         for (int retries = (int)(timeout / 200); retries >= 0; 
>> retries--) {
> 
> The logic around the timeout might be clearer if it was only based on the 
> number of retries,
> and can be scaled by the TIMEOUT_FACTOR too.

I just curious if the factor could be set to some unusual values like "1.25".  
Scaling on timeout, and then calculating the retires could be more accuracy for 
such circumstances, although it may be not necessary.  I moved the retries 
calculation close to the for-loop.  Hope it is better for readers.

-------------

PR: https://git.openjdk.org/jdk/pull/8979

Reply via email to