openj9
openj9 copied to clipboard
Loom: GC collection of Continuations
Virtual threads are not part of the root set. They are only alive if they are mounted on a carrier thread or if there is a strong reference to them (ie scheduler, blocking queue, etc.)
GC would maintain a "global continuation Object List", via function continuationObjectCreated() add the Continuation Object into the list, refresh the list during clearable phase of GC(walk through the old list, rebuild the new list for survived Continuation Objects, clean up (free/recycle related J9vmContinuation structure) the dead Objects, also provide an iterating callback for vm/jvmti/ddr usage.
- new vm-gc api j9mm_iterate_all_continuation_objects(),
continuationObjectCreated()
- the Continuation Object List is designed as the similar way as
Unfinalized Object List.
via hidden field continuationLink to connect next Continuation Obj
Thread base buffer for reducing thread contention
an array of the lists per region for maximum parallel processing
and avoiding unnecessary processing
- for fix-up and compaction case(there is no clean-up), the rebuilding
the list has optimized to piggy-back scanning processing.
- for scavenge back-out, if the related J9vmContinuation structure has
been cleaned up, there is no rollback for J9vmContinuation, but the
vmref, which points to J9vmContinuation would remain NULL.
#depends on https://github.com/eclipse-openj9/openj9/pull/15603 #fix: https://github.com/eclipse-openj9/openj9/issues/15180
Signed-off-by: Lin Hu [email protected]
@amicic @dmitripivkine please review the changes, Thanks
personal build: https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/14116/
Jenkins sanity all jdk17
Jenkins test sanity all jdk17
Sanity tests just prior last minor commit were all green: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/2675/