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

Per Liden per.liden at oracle.com
Tue Mar 15 11:02:57 UTC 2016


Hi,

I got some minor comments from StefanK offline, here's an updated webrev:

Incremental: http://cr.openjdk.java.net/~pliden/8151601/webrev.diff-0vs1/

Full: http://cr.openjdk.java.net/~pliden/8151601/webrev.1/

thanks,
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/
> Testing: jprt, vm.gc
>
> cheers,
> Per


More information about the hotspot-gc-dev mailing list