@@ -328,4 +328,51 @@ MM_ScavengerBackOutScanner::backoutUnfinalizedObjects(MM_EnvironmentStandard *en
328
328
env->getGCEnvironment ()->_unfinalizedObjectBuffer ->flush (env);
329
329
}
330
330
#endif /* J9VM_GC_FINALIZATION */
331
+
332
+ /* *
333
+ * Backout the continuation objects.
334
+ * Move continuation backout processing in scanAllSlots(), scavenger abort would never happen after continuationObjectList processing
335
+ * (so only need to backout list._head from _priorHead).
336
+ * Here walk the lists in the Evacuate region only for helping to back out the references in java stacks of the unmounted continuations.
337
+ */
338
+ void
339
+ MM_ScavengerBackOutScanner::backoutContinuationObjects (MM_EnvironmentStandard *env)
340
+ {
341
+ #if defined(OMR_GC_CONCURRENT_SCAVENGER)
342
+ if (_extensions->isConcurrentScavengerEnabled ()) {
343
+ /* *
344
+ * For ConcurrentScavenge no need to backout stack references,
345
+ * since they will be fixed up to point to the new version of the object
346
+ * (if not already do so), later during marking when continuation objects are found live.
347
+ */
348
+ return ;
349
+ } else
350
+ #endif /* OMR_GC_CONCURRENT_SCAVENGER */
351
+ {
352
+ MM_Heap *heap = _extensions->heap ;
353
+ MM_HeapRegionManager *regionManager = heap->getHeapRegionManager ();
354
+ MM_HeapRegionDescriptorStandard *region = NULL ;
355
+ bool const compressed = _extensions->compressObjectReferences ();
356
+ GC_HeapRegionIteratorStandard regionIterator (regionManager);
357
+
358
+ while (NULL != (region = regionIterator.nextRegion ())) {
359
+ if (_scavenger->isObjectInEvacuateMemory ((omrobjectptr_t )region->getLowAddress ())) {
360
+ MM_HeapRegionDescriptorStandardExtension *regionExtension = MM_ConfigurationDelegate::getHeapRegionDescriptorStandardExtension (env, region);
361
+ for (uintptr_t i = 0 ; i < regionExtension->_maxListIndex ; i++) {
362
+ MM_ContinuationObjectList *list = ®ionExtension->_continuationObjectLists [i];
363
+ if (!list->wasEmpty ()) {
364
+ omrobjectptr_t object = list->getPriorList ();
365
+ while (NULL != object) {
366
+ omrobjectptr_t next = _extensions->accessBarrier ->getContinuationLink (object);
367
+ MM_ForwardedHeader forwardHeader (object, compressed);
368
+ Assert_MM_false (forwardHeader.isForwardedPointer ());
369
+ _scavenger->getDelegate ()->scanContinuationNativeSlots (env, object, SCAN_REASON_BACKOUT);
370
+ object = next;
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ }
331
378
#endif /* defined(OMR_GC_MODRON_SCAVENGER) */
0 commit comments