[sh/8u] Root processing related backports
Zhengyu Gu
zgu at redhat.com
Wed May 13 19:10:14 UTC 2020
>
> JDK-8189360 is not backported. Look in JNIHandleBlock::weak_oops_do:
>
> /*
> * JVMTI data structures may also contain weak oops. The iteration of them
> * is placed here so that we don't need to add it to each of the collectors.
> */
> JvmtiExport::weak_oops_do(is_alive, f);
Looked at wrong place. Okay, recovered to original form and added comments:
// When we're done marking everything, we process weak references.
// It is not obvious, but reference processing actually calls
// JNIHandle::weak_oops_do() to cleanup JNI and JVMTI weak oops.
if (_heap->process_references()) {
weak_refs_work(full_gc);
} else {
weak_roots_work();
}
Updated:
http://cr.openjdk.java.net/~zgu/shenandoah/sh-8u-root-processing/webrev.03/
-Zhengyu
>
> So it would do JvmtiExport::weak_oops_do it during JNIHandle::weak_oops_do. Please make sure we
> never ever touch JvmtiExport::weak_oops_do if JNIHandle::weak_oops_do possibly runs in another worker.
>
> I would check myself tomorrow.
>
More information about the shenandoah-dev
mailing list