RFR: 8311981: Test gc/stringdedup/TestStringDeduplicationAgeThreshold.java#ZGenerational timed out [v2]

David Holmes dholmes at openjdk.org
Mon Aug 14 01:36:28 UTC 2023


On Fri, 11 Aug 2023 18:16:07 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> src/hotspot/share/runtime/handshake.cpp line 504:
>> 
>>> 502:   // and force the caller to check more carefully in a safer context. If we can't get
>>> 503:   // the lock it means another thread is trying to handshake with us, so it can't
>>> 504:   // happen during thread termination and destruction.
>> 
>> Why the particular mention about thread termination and destruction?
>
> nit typo: s/musn't/mustn't/
> 
> which is preferred according to urbandictionary.com.
> 
> I also don't understand the last sentence. More accurately, I understand the first
> phrase, but I don't understand the need for the second phrase.

Earlier when I mistakenly thought the no-arg version was this version with default args, I was concerned about its use in the `HandshakeState` destructor, but reasoned that it was safe as there couldn't be a real pending op at that time to cause contention on the lock - hence the comment in the main code. I left the comment just to add some information on when during a thread's lifetime we could hit this problem - to make it easier to reason about. I can remove it if it is causing confusion.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15240#discussion_r1292893686


More information about the hotspot-runtime-dev mailing list