-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loom: GC Scan Continuation Object #15603
Loom: GC Scan Continuation Object #15603
Conversation
dc2a5af
to
faebda8
Compare
faebda8
to
b5fc3a4
Compare
@amicic @dmitripivkine please review the changes, Thanks |
runtime/gc_api/HeapIteratorAPI.cpp
Outdated
case GC_ObjectModel::SCAN_CONTINUATION_OBJECT: | ||
returnCode = iterateMixedObjectSlots(javaVM, objectPtr, object, flags, func, userData); | ||
break; | ||
#endif /* JAVA_SPEC_VERSION >= 19 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to have extra or different logic here? If not, you can add this case to group above:
....
case GC_ObjectModel::SCAN_CLASSLOADER_OBJECT:
case GC_ObjectModel::SCAN_REFERENCE_MIXED_OBJECT:
#if JAVA_SPEC_VERSION >= 19
case GC_ObjectModel::SCAN_CONTINUATION_OBJECT:
#endif /* JAVA_SPEC_VERSION >= 19 */
....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I leave it separate here, because I am not very clear if we need any different logic for continuation in this case, keep a room to update in future.
General question: Do we need put |
case GC_ObjectModel::SCAN_CONTINUATION_OBJECT: | ||
scanMixedObject(objectPtr); | ||
break; | ||
#endif /* JAVA_SPEC_VERSION >= 19 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this case be separate or can it be joined to the group above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same reason as above for keeping the separated code.
3fb509a
to
fe627a9
Compare
d873db9
to
c9b5e0c
Compare
f20dd73
to
07da4a5
Compare
updating new vm api walkContinuationStackFrames for scanning java stack in j9vmContinuation. |
07da4a5
to
63192ac
Compare
eaf733a
to
c1d7e88
Compare
9a25d9e
to
2af6bac
Compare
The JIT changes LGTM, but we may also need to bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, but I'd like @dsouzai to give his opinion about the protocol version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the MINOR_NUMBER should be bumped since this includes frontend API changes.
Also there's some formatting issues that remain.
runtime/compiler/env/J9ClassEnv.cpp
Outdated
@@ -87,7 +87,8 @@ J9::ClassEnv::isClassSpecialForStackAllocation(TR_OpaqueClassBlock * clazz) | |||
const UDATA mask = (J9AccClassReferenceWeak | | |||
J9AccClassReferenceSoft | | |||
J9AccClassFinalizeNeeded | | |||
J9AccClassOwnableSynchronizer); | |||
J9AccClassOwnableSynchronizer | | |||
J9AccClassContinuation ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is using tabs instead of spaces.
runtime/compiler/env/VMJ9.cpp
Outdated
J9Class* j9class = TR::Compiler->cls.convertClassOffsetToClassPtr(clazz); | ||
return ((J9CLASS_FLAGS(j9class) & J9AccClassContinuation) != 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting; tabs used instead of spaces.
121cb31
to
9182142
Compare
@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 |
9182142
to
1fe5a82
Compare
Jenkins test sanity all jdk11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two cosmetic changes left:
- remove check for Java 19 in MM_GlobalMarkingScheme::scanClassObject() or explain why it required
- revert Copyrights date update in MemorySubSpaceTarok.cpp, file has not been changed
Except this looks good to me
1fe5a82
to
5502e96
Compare
Jenkins test sanity all jdk11 |
Jenkins compile win32 jdk8 |
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 Signed-off-by: Lin Hu <linhu@ca.ibm.com>
5502e96
to
69c8e12
Compare
@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/ |
Identify if the Object is an instance of Continuation, if it is, scan
the Java stacks in related J9vmContinuation.
#depends on eclipse/omr#6575, #15434, #15678
#fix: #15178
Signed-off-by: Lin Hu linhu@ca.ibm.com