RFR(L): 8151601: Cleanup locking of the Reference pending list

Bengt Rutisson bengt.rutisson at oracle.com
Tue Mar 15 10:40:36 UTC 2016


Hi Per,

On 2016-03-10 16:53, Per Liden wrote:
> Hi,
>
> The SurrogateLockerThread is currently used by both G1 and CMS to lock 
> the Reference pending list. However, there's quite a bit of 
> unnecessary code duplication and special case handling in this area. 
> This patch is an attempt to clean this up.
>
> The main changes:
>
> - All locking of the pending list is how done through the new 
> ReferencePendingListLocker. This locker delegates to a locker thread 
> if needed.
>
> - The locking related code in instanceRefKlass was moved to the new 
> ReferencePendingListLocker.
>
> - What used to be the SurrogateLockerThread is now the 
> ReferencePendingListLockerThread.
>
> - The new virtual function 
> CollectedHeap::needs_reference_pending_list_locker_thread() indicates 
> if a collector needs a locker thread. G1 and CMS returns true here.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8151601
> Webrev: http://cr.openjdk.java.net/~pliden/8151601/webrev.0/

Looks good.

Bengt

> Testing: jprt, vm.gc
>
> cheers,
> Per




More information about the hotspot-gc-dev mailing list