RFR: 8223056: Remove Type-Stable-Memory support for Parkers [v2]
David Holmes
david.holmes at oracle.com
Thu Jan 21 01:51:50 UTC 2021
On 20/01/2021 11:26 pm, Coleen Phillimore wrote:
> On Wed, 20 Jan 2021 06:18:02 GMT, David Holmes <dholmes at openjdk.org> wrote:
>
>>> As per the bug report, once we ensure the calls to unpark() are guaranteed to only occur on a live thread (protected by a ThreadsListHandle) Parkers (the synchronization object underlying java.util.concurrent.LockSupport) no longer need to use type-stable-memory (TSM).
>>>
>>> As a Parker is inherently associated with a single JavaThread, the Parker is now embedded directly in JavaThread, avoiding the need to use new/delete.
>>>
>>> The Parker and PlatformParker classes are now simplified from a memory management perspective. I also made them NONCOPYABLE for good measure. Possibly other constraints could be applied to them such as disallowing new/delete? (Though if we go that far maybe we need a new allocation base type?).
>>>
>>> Testing: tiers 1-3 plus additional test builds
>>>
>>> Thanks,
>>> David
>>
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address Coleen's nit.
>> Move _counter field to Posix PlatformParker class.
>> Rename _ParkEvent to _ParkerEvent on Windows
>
> Nice cleanup! Thanks!
>
> src/hotspot/os/windows/os_windows.hpp line 195:
>
>> 193:
>> 194: protected:
>> 195: HANDLE _ParkerEvent;
>
> How about calling it _ParkHandle like PlatformEvent above it? Two letters for me is not quickly distinguishable. If you make this change I don't need to see another version.
Done.
Thanks,
David
> -------------
>
> Marked as reviewed by coleenp (Reviewer).
>
> PR: https://git.openjdk.java.net/jdk/pull/2089
>
More information about the hotspot-runtime-dev
mailing list