Preview: Concurrent JNIWeakHandles processing

Per Liden per.liden at oracle.com
Wed Jan 24 10:16:06 UTC 2018


First of all, just want to mention that this patch is kind a major 
milestone. With the recent introduction of OopStorage, we now have 
enough infrastructure in place upstream to start moving the cleaning of 
VM weak roots out from STW and in to a concurrent phase. The JNI weak 
handles is the first step, StringTable is being worked on and will 
follow later.

In plain English, this means that an application can create as many 
JNIWeakGlobalRefs as is wants to without affecting GC pause times.

About the patch. Stefan and I discussed some minor cleanups, which I'll 
push as a follow up to his patch. Here that are:

http://cr.openjdk.java.net/~pliden/zgc/concurrent_weak_processing_cleanups/webrev.0/

cheers,
Per

On 01/22/2018 08:29 PM, Stefan Karlsson wrote:
> I fixed the copyright header for the two new files, and fixed the 
> incorrect usage of Atomic::cmpxchg.
> 
> StefanK
> 
> On 2018-01-19 16:21, Stefan Karlsson wrote:
>> Hi all,
>>
>> Kim recently pushed a patch to jdk/hs, which contains the new 
>> OopStorage class. This class is a container for oops, and helps 
>> separating GC scanning/clearing from Runtime data structure 
>> cleaning/unlinking. The OopStorage also provides the functionallity to 
>> scan/clear the oop*s concurrently.
>>
>> The container of the JNIWeakHandles has been changed to the 
>> OopStorage, but the clearing is currently done during pauses. The 
>> following patch adds concurrent clearing to ZGC. The patch moves the 
>> clearing out from the "mark end" pause into the "concurrent weak 
>> processing" phase after mark end.
>>
>> I want to do further testing before this gets pushed, but here's the 
>> current patch:
>>
>> http://cr.openjdk.java.net/~stefank/zgc/zConcurrentJNIWeakHandles/webrev.01/ 
>>
>>
>> Thanks,
>> StefanK
> 
> 


More information about the zgc-dev mailing list