RFR: 8189359: Move native weak oops cleaning out of ReferenceProcessor
Kim Barrett
kim.barrett at oracle.com
Tue Oct 17 19:52:22 UTC 2017
> On Oct 16, 2017, at 10:14 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>
> Hi all,
>
> Please review this patch to move the JNI global weak handle processing out of the ReferenceProcessor into a new class, WeakProcessor, that will be used to gather processing and cleaning of "native weak" oops.
>
> After this patch the ReferenceProcessor will only deal with the Java level java.lang.ref weak references.
>
> http://cr.openjdk.java.net/~stefank/8189359/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8189359
>
> Note this patch only moves the JNIHandles::weak_oops_do calls into the new WeakProcessor. A subsequent patch for JDK-8189359 will move the JvmtiExport::weak_oops_do from JNIHandleBlock into the WeakProcessor.
>
> Future patches like JDK-8171119, for example, will be able to add it's set of native weak oops into the new WeakProcessor functions and won't have to duplicate the code for all GCs or add call inside the ReferenceProcessor.
>
> Tested with JPRT.
>
> Thanks,
> StefanK
Mostly OK, and nice to have this cleaned up, esp. with the JDK-8189359
followup.
------------------------------------------------------------------------------
src/hotspot/share/gc/shared/weakProcessor.hpp
I don't understand the name of unlink_or_oops_do. A little hint as to
the semantics of the two functions in WeakProcessor might help. Right
now, it's not at all obvious how they differ, other than by signature.
------------------------------------------------------------------------------
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
This change seems to remove the only call to process_weak_jni_handles().
------------------------------------------------------------------------------
More information about the hotspot-dev
mailing list