openj9
openj9 copied to clipboard
Loom: GC Scan Continuation Object
Identify if the Object is an instance of Continuation, if it is, scan the Java stacks in related J9vmContinuation.
- add ContinuationLink as a hiddenInstanceField of Continuation
instance for the global linklist
- openjdk using sub class "java/lang/VirtualThread$VThreadContinuation"
instead of "jdk/internal/vm/Continuation" for creating instance of
Continuation.
- new HeapWalkerDelegate to handle special treatment for Continuation
Instance.
- new Scan Type GC_ObjectModel::SCAN_CONTINUATION_OBJECT
- new J9AccClassContinuation bit (0x1000000, bit in classDepthAndFlags)
for identifying Continuation Instance, reset AccClassIsContended bit
(copy from romClass->extraModifiers, but not been used at all).
- scan/special treatment the Java stack related Continuation Instance
CompactSchemeFixupObject
CopyForwardScheme
GlobalCollectorDelegate
GlobalMarkCardScrbber
HeapWalkerDelegate
MarkingDelegate
MetronomeDelegate
RealtimeMarkingScheme
ScavengerDelegate
- ToDo List, below the items might also need some change to match
continuation, but not directly block the loom basic features.
HeapIteratorAPI::j9mm_iterate_object_slots()
MM_ReferenceChainWalker::scanObject()
MM_CompactDelegate::verifyHeap()
MM_RealtimeAccessBarrier::validateWriteBarrier()
tgcHookReportInterRegionReferenceCounting()
MM_CopyForwardScheme::verifyObject()
MM_IncrementalGenerationalGC::verifyMarkMapClosure()
MM_WriteOnceCompactor::verifyHeap()
jvmtiHeap.mapEventType()
DDR
GCCheck
- need to handle/avoid mount/unmount continuation during concurrent GCs
#depends on https://github.com/eclipse/omr/pull/6575, https://github.com/eclipse-openj9/openj9/pull/15434 #fix: https://github.com/eclipse-openj9/openj9/issues/15178
Signed-off-by: Lin Hu [email protected]
@amicic @dmitripivkine please review the changes, Thanks
General question: Do we need put #if JAVA_SPEC_VERSION >= 19
around most changes in GC? Can we just rely on existence of this case for Java 19 only? If it is possible it would make GC code much cleaner (despite slight grows of code and data for earlier Java versions)
updating new vm api walkContinuationStackFrames for scanning java stack in j9vmContinuation. https://github.com/eclipse-openj9/openj9/pull/15678/files#diff-aa08fd4ba250064714cc602eda8db8bbaae659c38b78e47f24ff00d9a5dd6a44
@tajila please review vm related changes, @dsouzai please review jit releated changes, Thanks
@jdmpapin could you also review the JIT changes from an optimizer pov?
the personal build with the latest omr master branch https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/13977/
The JIT changes LGTM, but we may also need to bump MINOR_NUMBER
. I'm thinking of a scenario where the client has continuation classes, but the server doesn't know about them, in which case the server could e.g. think it's ok to stack allocate
@LinHu2016 sorry, in the formatting changes I requested I meant that your code was using tabs, whereas the compiler code uses spaces. As it stands, the formatting is still incorrect in runtime/compiler/env/J9ClassEnv.cpp and runtime/compiler/env/VMJ9.cpp
Jenkins test sanity all jdk11
Jenkins test sanity all jdk11
Jenkins compile win32 jdk8
@amicic Update ScavengerDelegate.cpp, add OMR_GC_CONCURRENT_SCAVENGER precompile option for calling fixupSlot().
Jenkins compile win32 jdk8
Jenkins compile win jdk11
The last commit was minor, fixing a 32bit compile failure. So, I just re-lauched a couple of compile jobs. For sanity testing I'm relying on these that were done just before the last commit, and they were all green: https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/2642/