RFR: 8209850: Allow NamedThreads to use GlobalCounter critical sections

Kim Barrett kim.barrett at oracle.com
Thu Aug 23 18:27:51 UTC 2018


> On Aug 23, 2018, at 6:22 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
> 
> Hi Kim,
> 
> Looks good for me. Thank you for sorting this out.

Thanks.

> 
> /Erik
> 
> On 2018-08-22 21:18, Kim Barrett wrote:
>> Please review this change to GlobalCounter, permitting NamedThreads to
>> enter a critical section.
>> 
>> To accomplish this, we add a new RCU-inspired synchronization utility,
>> SingleWriterSynchronizer.  This has some similarities to
>> GlobalCounter, but the latter should be preferred except where it
>> can't be used (such as in the implementation of GlobalCounter!).  This
>> utility is based on a private utility embedded in OopStorage.  That
>> private utility is being replaced by the new public one.
>> 
>> Using this new synchronization utility, we provide lock-free iteration
>> over the list of NamedThreads that is safe against creation and
>> deletion of such threads.  That iteration is used by GlobalCounter to
>> examine all NamedThreads, rather than only the VMThread.
>> 
>> CR:
>> https://bugs.openjdk.java.net/browse/JDK-8209850
>> 
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8209850/open.00/
>> 
>> Testing:
>> mach5 tier1-3, hs-tier4-5.
>> New synchronization utility includes a gtest.




More information about the hotspot-dev mailing list