@@ -305,7 +305,7 @@ MM_CopyForwardScheme::initialize(MM_EnvironmentVLHGC *env)
305
305
_maxCacheSize = _extensions->scavengerScanCacheMaximumSize ;
306
306
307
307
/* Cached pointer to the inter region remembered set */
308
- _interRegionRememberedSet = MM_GCExtensions::getExtensions (env) ->interRegionRememberedSet ;
308
+ _interRegionRememberedSet = _extensions ->interRegionRememberedSet ;
309
309
310
310
_cacheLineAlignment = CACHE_LINE_SIZE;
311
311
@@ -412,7 +412,7 @@ MM_CopyForwardScheme::raiseAbortFlag(MM_EnvironmentVLHGC *env)
412
412
413
413
Trc_MM_CopyForwardScheme_abortFlagRaised (env->getLanguageVMThread ());
414
414
PORT_ACCESS_FROM_ENVIRONMENT (env);
415
- TRIGGER_J9HOOK_MM_PRIVATE_COPY_FORWARD_ABORT (MM_GCExtensions::getExtensions (env) ->privateHookInterface , env->getOmrVMThread (), j9time_hires_clock (), J9HOOK_MM_PRIVATE_COPY_FORWARD_ABORT);
415
+ TRIGGER_J9HOOK_MM_PRIVATE_COPY_FORWARD_ABORT (_extensions ->privateHookInterface , env->getOmrVMThread (), j9time_hires_clock (), J9HOOK_MM_PRIVATE_COPY_FORWARD_ABORT);
416
416
}
417
417
}
418
418
}
@@ -434,9 +434,9 @@ MM_CopyForwardScheme::updateLeafRegions(MM_EnvironmentVLHGC *env)
434
434
GC_HeapRegionIteratorVLHGC regionIterator (_regionManager);
435
435
MM_HeapRegionDescriptorVLHGC *region = NULL ;
436
436
437
- if (MM_GCExtensions::getExtensions (env) ->isVirtualLargeObjectHeapEnabled ) {
437
+ if (_extensions ->isVirtualLargeObjectHeapEnabled ) {
438
438
const uintptr_t arrayletLeafSize = env->getOmrVM ()->_arrayletLeafSize ;
439
- MM_SparseVirtualMemory *largeObjectVirtualMemory = MM_GCExtensions::getExtensions (env) ->largeObjectVirtualMemory ;
439
+ MM_SparseVirtualMemory *largeObjectVirtualMemory = _extensions ->largeObjectVirtualMemory ;
440
440
uintptr_t arrayletLeafCount = 0 ;
441
441
J9HashTableState walkState;
442
442
@@ -3944,7 +3944,7 @@ class MM_CopyForwardSchemeRootScanner : public MM_RootScanner
3944
3944
}
3945
3945
} else {
3946
3946
/* double check that there really was no work to do */
3947
- Assert_MM_true (!MM_GCExtensions::getExtensions (env) ->finalizeListManager ->isFinalizableObjectProcessingRequired ());
3947
+ Assert_MM_true (!_extensions ->finalizeListManager ->isFinalizableObjectProcessingRequired ());
3948
3948
}
3949
3949
reportScanningEnded (RootScannerEntity_FinalizableObjects);
3950
3950
}
@@ -4172,7 +4172,9 @@ class MM_CopyForwardSchemeRootClearer : public MM_RootScanner
4172
4172
env->_copyForwardStats ._offHeapRegionsCleared += 1 ;
4173
4173
void *dataAddr = _extensions->indexableObjectModel .getDataAddrForContiguous ((J9IndexableObject *)objectPtr);
4174
4174
_extensions->largeObjectVirtualMemory ->freeSparseRegionAndUnmapFromHeapObject (_env, dataAddr, objectPtr, _extensions->indexableObjectModel .getDataSizeInBytes ((J9IndexableObject *)objectPtr));
4175
- *sparseHeapAllocation = false ;
4175
+ if (NULL != sparseHeapAllocation) {
4176
+ *sparseHeapAllocation = false ;
4177
+ }
4176
4178
} else {
4177
4179
void *dataAddr = _extensions->indexableObjectModel .getDataAddrForContiguous ((J9IndexableObject *)fwdOjectPtr);
4178
4180
if (NULL != dataAddr) {
@@ -4755,17 +4757,19 @@ MM_CopyForwardScheme::verifyCopyForwardResult(MM_EnvironmentVLHGC *env)
4755
4757
4756
4758
while (NULL != (region = regionIterator.nextRegion ())) {
4757
4759
if (region->isArrayletLeaf ()) {
4758
- J9Object *spineObject = (J9Object *)region->_allocateData .getSpine ();
4759
- Assert_MM_true (NULL != spineObject);
4760
- /* the spine must be marked if it was copied as a live object or if we aborted the copy-forward */
4761
- /* otherwise, it must not be forwarded (since that would imply that the spine survived but the pointer wasn't updated) */
4762
- if (!_markMap->isBitSet (spineObject)) {
4763
- MM_ForwardedHeader forwardedSpine (spineObject, _extensions->compressObjectReferences ());
4764
- if (forwardedSpine.isForwardedPointer ()) {
4765
- PORT_ACCESS_FROM_ENVIRONMENT (env);
4766
- j9tty_printf (PORTLIB, " Spine pointer is not marked and is forwarded (leaf region's pointer to spine not updated)! Region %p Spine %p (should be %p)\n " , region, spineObject, forwardedSpine.getForwardedObject ());
4767
- verifyDumpObjectDetails (env, " spineObject" , spineObject);
4768
- Assert_MM_unreachable ();
4760
+ if (!_extensions->isVirtualLargeObjectHeapEnabled ) {
4761
+ J9Object *spineObject = (J9Object *)region->_allocateData .getSpine ();
4762
+ Assert_MM_true (NULL != spineObject);
4763
+ /* the spine must be marked if it was copied as a live object or if we aborted the copy-forward */
4764
+ /* otherwise, it must not be forwarded (since that would imply that the spine survived but the pointer wasn't updated) */
4765
+ if (!_markMap->isBitSet (spineObject)) {
4766
+ MM_ForwardedHeader forwardedSpine (spineObject, _extensions->compressObjectReferences ());
4767
+ if (forwardedSpine.isForwardedPointer ()) {
4768
+ PORT_ACCESS_FROM_ENVIRONMENT (env);
4769
+ j9tty_printf (PORTLIB, " Spine pointer is not marked and is forwarded (leaf region's pointer to spine not updated)! Region %p Spine %p (should be %p)\n " , region, spineObject, forwardedSpine.getForwardedObject ());
4770
+ verifyDumpObjectDetails (env, " spineObject" , spineObject);
4771
+ Assert_MM_unreachable ();
4772
+ }
4769
4773
}
4770
4774
}
4771
4775
} else {
@@ -4793,6 +4797,32 @@ MM_CopyForwardScheme::verifyCopyForwardResult(MM_EnvironmentVLHGC *env)
4793
4797
}
4794
4798
}
4795
4799
4800
+ #if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
4801
+ if (_extensions->isVirtualLargeObjectHeapEnabled ) {
4802
+ MM_SparseVirtualMemory *largeObjectVirtualMemory = _extensions->largeObjectVirtualMemory ;
4803
+ J9HashTableState walkState;
4804
+
4805
+ MM_SparseDataTableEntry *sparseDataEntry = (MM_SparseDataTableEntry *)hashTableStartDo (largeObjectVirtualMemory->getSparseDataPool ()->getObjectToSparseDataTable (), &walkState);
4806
+ while (NULL != sparseDataEntry) {
4807
+ J9Object *spineObject = (J9Object *)sparseDataEntry->_proxyObjPtr ;
4808
+ Assert_MM_true (NULL != spineObject);
4809
+ /* the spine must be marked if it was copied as a live object or if we aborted the copy-forward */
4810
+ /* otherwise, it must not be forwarded (since that would imply that the spine survived but the pointer wasn't updated) */
4811
+ if (!_markMap->isBitSet (spineObject)) {
4812
+ MM_ForwardedHeader forwardedSpine (spineObject, _extensions->compressObjectReferences ());
4813
+ if (forwardedSpine.isForwardedPointer ()) {
4814
+ PORT_ACCESS_FROM_ENVIRONMENT (env);
4815
+ j9tty_printf (PORTLIB, " Spine pointer is not marked and is forwarded (leaf region's pointer to spine not updated)! Region %p Spine %p (should be %p)\n " , region, spineObject, forwardedSpine.getForwardedObject ());
4816
+ verifyDumpObjectDetails (env, " spineObject" , spineObject);
4817
+ Assert_MM_unreachable ();
4818
+ }
4819
+ }
4820
+
4821
+ sparseDataEntry = (MM_SparseDataTableEntry *)hashTableNextDo (&walkState);
4822
+ }
4823
+ }
4824
+ #endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */
4825
+
4796
4826
MM_CopyForwardVerifyScanner scanner (env, this );
4797
4827
scanner.scanAllSlots (env);
4798
4828
@@ -5209,7 +5239,7 @@ MM_CopyForwardScheme:: cleanOverflowInRange(MM_EnvironmentVLHGC *env, uintptr_t
5209
5239
{
5210
5240
/* At this point, no copying should happen, so that reservingContext is irrelevant */
5211
5241
MM_AllocationContextTarok *reservingContext = _commonContext;
5212
- MM_HeapMapIterator objectIterator = MM_HeapMapIterator (MM_GCExtensions::getExtensions (env) , env->_cycleState ->_markMap , lowAddress, highAddress);
5242
+ MM_HeapMapIterator objectIterator = MM_HeapMapIterator (_extensions , env->_cycleState ->_markMap , lowAddress, highAddress);
5213
5243
5214
5244
J9Object *object = NULL ;
5215
5245
while (NULL != (object = objectIterator.nextObject ())) {
0 commit comments