RFR: 8262454: Handshake timeout improvements, single target, kill unfinished thread [v3]
Daniel D.Daugherty
dcubed at openjdk.java.net
Wed Mar 10 15:11:12 UTC 2021
On Tue, 9 Mar 2021 07:22:50 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/handshake/HandshakeTimeoutTest.java line 83:
>>
>>> 81: int i = 0;
>>> 82: while (true) {
>>> 83: i++;
>>
>> Are we relying on the fact that the timeout is small (1ms) and so at some point one of the HandshakeALotClosure operations should timeout?
>> Otherwise you could do as in TestAbortVMOnSafepointTimeout.java and use "wb.waitUnsafe(waitTime)" so that it will timeout right away.
>
> Yes, good, thanks, I'll do that! (funny I think I added waitUnsafe but didn't remember that :) )
Also, since the counter `i` isn't used for anything the compiler might optimize that code away...
-------------
PR: https://git.openjdk.java.net/jdk/pull/2743
More information about the hotspot-runtime-dev
mailing list