Currently there are a number of places in the code where we deal with root scanning and unlinking of "native weak" oops. One of those places where it's convenient to add native weak oops to is the ReferenceProcessor.
The ReferenceProcessor is mainly dealing with the Java weak references in java.lang.ref References, but it also helps out by also cleaning the JNI global weak handles.
I'd like to clean this up so that the ReferenceProcessor *only* deals with the Java level java.lang.ref References.
At the same time, new sets of native weak oops are being add to the VM and we need a convenient place to add them without having to change all our GCs. So, I propose that we create a new class, WeakProcessor, where both the JNI global weak handles and the new native weak oops are dealt with.
The ReferenceProcessor is mainly dealing with the Java weak references in java.lang.ref References, but it also helps out by also cleaning the JNI global weak handles.
I'd like to clean this up so that the ReferenceProcessor *only* deals with the Java level java.lang.ref References.
At the same time, new sets of native weak oops are being add to the VM and we need a convenient place to add them without having to change all our GCs. So, I propose that we create a new class, WeakProcessor, where both the JNI global weak handles and the new native weak oops are dealt with.