-
Notifications
You must be signed in to change notification settings - Fork 720
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
Fix the references in continunation java stacks for scavenger backout #19559
Conversation
GC_HeapRegionIteratorStandard regionIterator(regionManager); | ||
|
||
while (NULL != (region = regionIterator.nextRegion())) { | ||
if ((MEMORY_TYPE_NEW == (region->getTypeFlags() & MEMORY_TYPE_NEW)) && _scavenger->isObjectInEvacuateMemory((omrobjectptr_t )region->getLowAddress())) { |
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.
NEW check is probably redundant
omrobjectptr_t next = _extensions->accessBarrier->getContinuationLink(object); | ||
MM_ForwardedHeader forwardHeader(object, compressed); | ||
Assert_MM_false(forwardHeader.isForwardedPointer()); | ||
Assert_MM_false(forwardHeader.isReverseForwardedPointer()); |
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.
isForwardedPointer assert is reasonable, but isReverseForwardedPointer is probably overkill (knowing that we are doing this pass only in Evacuate and that reverseFP cannot be there)
we are asserting that forwarded pointers have been restored (that restoration pass has completed before)
{ | ||
#if defined(OMR_GC_CONCURRENT_SCAVENGER) | ||
if (_extensions->isConcurrentScavengerEnabled()) { | ||
/* nothing need to do for concurrent scavenger case */ |
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.
rather than just stating the obvious, try to explain why.
something like: for CS no need to backout stack references, since they will be fixed up to point to the new version of the object (if not already do so), later during marking when continuation objects are found live
In eclipse-openj9#19388, we are fixing up stack references of unmounted continuation for scavenge backout during reverseForwardedObject(), but the fixup would depend on the related resverseForwardedPointer installed, so the scan for fix-up need to be done after all resverseForwardedPointer are installed, otherwise some fix-up would miss. Using backoutContinuationObjects() to scan/fixup all of continuation stack references in evacuate region. Signed-off-by: hulin <linhu@ca.ibm.com>
jenkins test sanity win,aix jdk21 |
Seems like a change we should be adding to the 0.46 release? |
the PR for cherrypicking to 0.46 release |
In #19388, we are fixing up stack references of unmounted continuation for scavenge backout during reverseForwardedObject(), but the fixup would depend on the related resverseForwardedPointer installed, so the scan for fix-up need to be done after all resverseForwardedPointer are installed, otherwise some fix-up would miss.
Using backoutContinuationObjects() to scan/fixup all of continuation stack references in evacuate region.