Skip to content

Commit

Permalink
1, DDR Changes for Off-Heap
Browse files Browse the repository at this point in the history
2, Introduce Off-Heap Technology for Large Arrays

Introduce an optimized memory management for large
arrays in a region-based garbage collector. More
specifically, this is a new heap scheme and large
object organization (in-heap and off-heap), an
enhanced method for allocating large objects (proxy
objects), and an optimized technique of accessing
large arrays during runtime (JIT optimizations).

3, Updated PR Changes

4, enable xint by default

5, remove unneeded changes

6, updated changes

7, more updated changes

old update
1 Fix build flag related issues on Java 8

 -Fix incomplete issue to replace J9VM_ENV_DATA64 with
  J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION
 -Add/Enable buildflag gc_enableSparseHeapAllocation for
  J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION in axxon Java28 build
 -update getDataPointerForContiguous() to handle
  VirtualLargeObjectHeapEnabled case

2, Free the sparse region only once for all reserved leaf regions

 - new bool field _sparseHeapAllocation in MM_HeapRegionDescriptorVLHGC
  for identiying the first leaf region reserved for sparse heap
  allocation (default = false).
 - set the first leaf region reserved for sparse heap allocation = true
  during getSparseAddressAndDecommitLeaves().
 - doObjectInVirtualLargeObjectHeap only once (for the first reserved
  leaf region) in MM_RootScanner::scanObjectsInVirtualLargeObjectHeap()

3, new Update from code reviewing

Fix retrieving pontential stale pointer in jniGetPrimitiveArrayCritical

Update to retrieve arrayObject after enterCriticalRegion() to avoid
copy/move collection happen just before enterCriticalRegion()
(enterCriticalRegion() would prevent copy/move collection before
exitCriticalRegion()), the copy/move collection might move the
arrayObject. then cause jniGetPrimitiveArrayCritical return stale data
pointer.

 -replace isAddressWithinHeap() with
 (NULL != regionManager->regionDescriptorForAddress()).

4, Update macros rJ9JAVAARRAYCONTIGUOUS_EA

Update Macro J9JAVAARRAYCONTIGUOUS_EA and J9JAVAARRAYCONTIGUOUS_EA_VM to
also check isVirtualLargeObjectHeapEnabled if isIndexableDataAddrPresent
== true to handle VirtualLargeObjectHeapDisabled case in Balanced GC(
release JIT to initialize IndexableDataAddr for
VirtualLargeObjectHeapDisabled case).

Limitation: ArrayletDoubleMapping would not work properly.

	- new boolean isVirtualLargeObjectHeapEnabled in J9JavaVM
	- new boolean isVirtualLargeObjectHeapEnabled in J9VMThread

5, Detect offheap option for unsafe header

reset vm.unsafeIndexableHeaderSize and
vm.isVirtualLargeObjectHeapEnabled for off-heap case.

6, remove double mapping

7, DDR fixes

and fix the issue in jniReleasePrimitiveArrayCritical
(for zero size array, do not copyBackArrayCritical(), because
 doesn't copyArrayCritical() in jniGetPrimitiveArrayCritical() for
 removing double-mapping change).

8, Update from code review

9, DDR Changes for Off-Heap

his change would not have any dependance on off-heap runtime changes,
and should handle old core file(before any off-heap changes introduced),
intermediate core file(XXgc:disableIndexableDualHeaderShape) and new
core file(XXgc:enableVirtualLargeObjectHeap or
XXgc:disableVirtualLargeObjectHeap) smoothly.

    use gcExtensions.isVirtualLargeObjectHeapEnabled for identifying
    if off heap is enabled or not.
    verify the DataAddr via hasCorrectDataAddrPointer() if
    isVirtualLargeObjectHeapEnabled.
    use javaVM.isIndexableDataAddrPresent for identifying if there is
    extra DataAddr field in the header of IndexableObject.
    output DataAddr after size for IndexableObject if
    isIndexableDataAddrPresent.
    handle new structures
    J9IndexableObjectWithDataAddressContiguous/Discontiguous
    use arrayletObjectModel->_arrayletRangeBase/
    _arrayletRangeTop to verify if the address in heap.

10, code review update

11, update 2 for code review

12, Cmake update for off-heap

new define J9VM_GC_SPARSE_HEAP_ALLOCATION for cmake build

13, Update Java8 build specs for off-heap

 new define J9VM_GC_SPARSE_HEAP_ALLOCATION for the build specs

14, J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION -->
J9VM_GC_SPARSE_HEAP_ALLOCATION

15, compiler update

J9VM_GC_ENABLE_SPARSE_HEAP_ALLOCATION --> J9VM_GC_SPARSE_HEAP_ALLOCATION

16, rollback

17, j9gc_objaccess_arrayObjectDataDisplacement

18, remove "--enable-OMR_GC_SPARSE_HEAP_ALLOCATION" in mk files

19, replace with

<#if uma.spec.flags.gc_sparseHeapAllocation.enabled>
  --enable-OMR_GC_SPARSE_HEAP_ALLOCATION \
</#if>

in configure_common.mk.ftl

20, J9JAVAARRAYCONTIGUOUS_WITHOUT_DATAADDRESS_EA to
J9JAVAARRAYCONTIGUOUS_BASE_EA_VM

21, remove unrelated changes

22, update for match PR20648
(Extract copy/free arrayCritical code from StandardAccessBarrier)
23, updateSparseDataEntryAfterObjectHasMoved in
WriteOnceCompactFixupRoots
24, Update fixupArrayletLeafRegionContentsAndObjectLists

	- This fixing up is specific for hybrid arraylets,
	for off-heap array the fix-up has been done for contiguous array pass.
	So we should skip it for offheap enabled. It's a correctness problem,
	since we might be finding garbage references to scan.
	Additionally, because the leaf regions are supposed to be left
	decommited till the array dies, we are recommiting them too early.

25, fix JVM_CopySwapMemory crash issue for off-heap

The java caller has added Unsafe.arrayBaseOffset() to the offset.
need to remove it as GetPrimitiveArrayCritical returns a pointer to
the first element, need to replace
J9VMTHREAD_CONTIGUOUS_INDEXABLE_HEADER_SIZE()
with J9VMTHREAD_UNSAFE_INDEXABLE_HEADER_SIZE() for off-heap case.

26, Rollback JVM_CopySwapMemory changes

Change-Id: I2597c71ccf4c5fcc0f3aa3aea9f793e783a0a304
Signed-off-by: lhu <[email protected]>
  • Loading branch information
jonoommen authored and LinHu2016 committed Dec 5, 2024
1 parent f8939d1 commit 7c2a572
Show file tree
Hide file tree
Showing 31 changed files with 779 additions and 801 deletions.
248 changes: 136 additions & 112 deletions runtime/gc_base/IndexableObjectAllocationModel.cpp

Large diffs are not rendered by default.

50 changes: 31 additions & 19 deletions runtime/gc_base/IndexableObjectAllocationModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "JavaObjectAllocationModel.hpp"
#include "MemorySpace.hpp"

class MM_HeapRegionDescriptorVLHGC;

/**
* Class definition for the array object allocation model.
*/
Expand All @@ -57,14 +59,43 @@ class MM_IndexableObjectAllocationModel : public MM_JavaObjectAllocationModel
* Member functions
*/
private:
/**
* For contiguous arraylet all data is subsumed into the spine.
*
* @param env thread GC Environment
* @param spine indexable object spine
*
* @return initialized arraylet spine with its arraylet pointers initialized.
*/
MMINLINE J9IndexableObject *layoutContiguousArraylet(MM_EnvironmentBase *env, J9IndexableObject *spine);

/**
* For non-contiguous arraylet (i.e. discontiguous and hybrid), perform separate allocations
* for spine and leaf data. The spine and attached leaves may move as each leaf is allocated
* is GC is allowed. The final location of the spine is returned.
*
* @param env thread GC Environment
* @param spine indexable object spine
*
* @return initialized arraylet spine with its arraylet pointers initialized.
*/
MMINLINE J9IndexableObject *layoutDiscontiguousArraylet(MM_EnvironmentBase *env, J9IndexableObject *spine);

#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
/**
* For discontiguous arraylet that will be allocated to sparse heap (off-heap). Even though this arraylet is large enough to be
* discontiguous, its true layout is InlineContiguous. Arraylet leaves still need to be created and initialized,
* even though they won't be used.
*
* @param env thread GC Environment
* @param spine indexable object spine
*
* @return initialized arraylet spine with its arraylet pointers initialized
*/
MMINLINE J9IndexableObject *getSparseAddressAndDecommitLeaves(MM_EnvironmentBase *env, J9IndexableObject *spine);
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

protected:

public:
Expand Down Expand Up @@ -118,25 +149,6 @@ class MM_IndexableObjectAllocationModel : public MM_JavaObjectAllocationModel
*/
bool initializeAllocateDescription(MM_EnvironmentBase *env);

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
/**
* For non-contiguous arraylets (discontiguous arraylets, hybrid not allowed
* when double map is enabled), double maps the arraylet leaves to a contiguous
* region outside the heap, making a discontiguous arraylet look contiguous.
* Double map is enabled by default, if one wants to disable it, manually pass
* command line option -Xgc:disableArrayletDoubleMapping; however, if the
* system supports huge pages then double map will be disabled. That's because
* double map does support huge pages yet. If one still wants to enable double
* map in such systems, one must manually force the application to use the
* small system page size
*
* @param env thread GC Environment
* @param objectPtr indexable object spine
* @return the contiguous address pointer
*/
void *doubleMapArraylets(MM_EnvironmentBase *env, J9Object *objectPtr, void *preferredAddress);
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */

/**
* Initializer.
*/
Expand Down
47 changes: 22 additions & 25 deletions runtime/gc_base/RootScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
#include "HeapRegionDescriptor.hpp"
#include "HeapRegionIterator.hpp"
#include "HeapRegionManager.hpp"
#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
#include "HeapRegionIteratorVLHGC.hpp"
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#include "MemoryPool.hpp"
#include "MemorySubSpace.hpp"
#include "MemorySpace.hpp"
Expand Down Expand Up @@ -241,13 +239,13 @@ MM_RootScanner::doStringTableSlot(J9Object **slotPtr, GC_StringTableIterator *st
doSlot(slotPtr);
}

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
void
MM_RootScanner::doDoubleMappedObjectSlot(J9Object *objectPtr, struct J9PortVmemIdentifier *identifier)
MM_RootScanner::doObjectInVirtualLargeObjectHeap(J9Object *objectPtr, bool *sparseHeapAllocation)
{
/* No need to call doSlot() here since there's nothing to update */
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

/**
* @Perform operation on the given string cache table slot.
Expand Down Expand Up @@ -914,28 +912,27 @@ MM_RootScanner::scanJVMTIObjectTagTables(MM_EnvironmentBase *env)
}
#endif /* J9VM_OPT_JVMTI */

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
void
MM_RootScanner::scanDoubleMappedObjects(MM_EnvironmentBase *env)
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
void
MM_RootScanner::scanObjectsInVirtualLargeObjectHeap(MM_EnvironmentBase *env)
{
if (_singleThread || J9MODRON_HANDLE_NEXT_WORK_UNIT(env)) {
GC_HeapRegionIteratorVLHGC regionIterator(_extensions->heap->getHeapRegionManager());
MM_HeapRegionDescriptorVLHGC *region = NULL;
reportScanningStarted(RootScannerEntity_DoubleMappedObjects);
reportScanningStarted(RootScannerEntity_virtualLargeObjectHeapObjects);
while (NULL != (region = regionIterator.nextRegion())) {
if (region->isArrayletLeaf()) {
J9Object *spineObject = (J9Object *)region->_allocateData.getSpine();
Assert_MM_true(NULL != spineObject);
J9PortVmemIdentifier *arrayletDoublemapID = &region->_arrayletDoublemapID;
if (NULL != arrayletDoublemapID->address) {
doDoubleMappedObjectSlot(spineObject, arrayletDoublemapID);
if (region->_sparseHeapAllocation) {
J9Object *spineObject = (J9Object *)region->_allocateData.getSpine();
Assert_MM_true(NULL != spineObject);
doObjectInVirtualLargeObjectHeap(spineObject, &region->_sparseHeapAllocation);
}
}
}
reportScanningEnded(RootScannerEntity_DoubleMappedObjects);
reportScanningEnded(RootScannerEntity_virtualLargeObjectHeapObjects);
}
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

/**
* Scan all root set references from the VM into the heap.
Expand Down Expand Up @@ -1074,11 +1071,11 @@ MM_RootScanner::scanClearable(MM_EnvironmentBase *env)
}
#endif /* J9VM_OPT_JVMTI */

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
if (_includeDoubleMap) {
scanDoubleMappedObjects(env);
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
if (_includeVirtualLargeObjectHeap) {
scanObjectsInVirtualLargeObjectHeap(env);
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */
}

/**
Expand Down Expand Up @@ -1128,11 +1125,11 @@ MM_RootScanner::scanAllSlots(MM_EnvironmentBase *env)
}
#endif /* J9VM_OPT_JVMTI */

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
if (_includeDoubleMap) {
scanDoubleMappedObjects(env);
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
if (_includeVirtualLargeObjectHeap) {
scanObjectsInVirtualLargeObjectHeap(env);
}
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

scanOwnableSynchronizerObjects(env);
scanContinuationObjects(env);
Expand Down
43 changes: 21 additions & 22 deletions runtime/gc_base/RootScanner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ class MM_RootScanner : public MM_BaseVirtual
#endif /* J9VM_GC_MODRON_SCAVENGER */
bool _classDataAsRoots; /**< Should all classes (and class loaders) be treated as roots. Default true, should set to false when class unloading */
bool _includeJVMTIObjectTagTables; /**< Should the iterator include the JVMTIObjectTagTables. Default true, should set to false when doing JVMTI object walks */
#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
bool _includeDoubleMap; /**< Enables doublemap should the GC policy be balanced. Default is false. */
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
bool _includeVirtualLargeObjectHeap; /**< Enables scanning of objects that has been allocated at sparse heap. Default is false */
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */
bool _trackVisibleStackFrameDepth; /**< Should the stack walker be told to track the visible frame depth. Default false, should set to true when doing JVMTI walks that report stack slots */

U_64 _entityStartScanTime; /**< The start time of the scan of the current scanning entity, or 0 if no entity is being scanned. Defaults to 0. */
Expand Down Expand Up @@ -316,9 +316,9 @@ class MM_RootScanner : public MM_BaseVirtual
#endif /* J9VM_GC_MODRON_SCAVENGER */
, _classDataAsRoots(true)
, _includeJVMTIObjectTagTables(true)
#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
, _includeDoubleMap(_extensions->indexableObjectModel.isDoubleMappingEnabled())
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
, _includeVirtualLargeObjectHeap(_extensions->indexableObjectModel.isVirtualLargeObjectHeapEnabled())
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */
, _trackVisibleStackFrameDepth(false)
, _entityStartScanTime(0)
, _entityIncrementStartTime(0)
Expand Down Expand Up @@ -467,18 +467,18 @@ class MM_RootScanner : public MM_BaseVirtual
void scanJVMTIObjectTagTables(MM_EnvironmentBase *env);
#endif /* J9VM_OPT_JVMTI */

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
/**
* Scans each heap region for arraylet leaves that contains a not NULL
* contiguous address. This address points to a contiguous representation
* of the arraylet associated with this leaf. Only arraylets that has been
* double mapped will contain such contiguous address, otherwise the
* address will be NULL
*
* Scans each heap region for arraylet leaves that contains a non-NULL
* contiguous address due to off-heap allocation. This address points to the contiguous representation
* of the arraylet associated with this leaf. Only arraylets that have been off-heap
* allocated or double-mapped will contain such a contiguous address, otherwise the
* address will be NULL.
*
* @param env thread GC Environment
*/
void scanDoubleMappedObjects(MM_EnvironmentBase *env);
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
void scanObjectsInVirtualLargeObjectHeap(MM_EnvironmentBase *env);
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

virtual void doClassLoader(J9ClassLoader *classLoader);

Expand Down Expand Up @@ -540,17 +540,16 @@ class MM_RootScanner : public MM_BaseVirtual
virtual void doStringCacheTableSlot(J9Object **slotPtr);
virtual void doVMClassSlot(J9Class *classPtr);
virtual void doVMThreadSlot(J9Object **slotPtr, GC_VMThreadIterator *vmThreadIterator);
#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)

#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
/**
* Frees double mapped region associated to objectPtr (arraylet spine) if objectPtr
* is not live
* Frees the region used for off-heap allocation associated to the objectPtr (arraylet spine) if the objectPtr
* is not live.
*
* @param objectPtr[in] indexable object's spine
* @param identifier[in/out] identifier associated with object's spine, which contains
* doble mapped address and size
*/
virtual void doDoubleMappedObjectSlot(J9Object *objectPtr, struct J9PortVmemIdentifier *identifier);
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
virtual void doObjectInVirtualLargeObjectHeap(J9Object *objectPtr, bool *sparseHeapAllocation);
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */

/**
* Called for each object stack slot. Subclasses may override.
Expand Down
26 changes: 16 additions & 10 deletions runtime/gc_check/CheckEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
#include "ObjectModel.hpp"
#include "ObjectAccessBarrier.hpp"
#include "ScanFormatter.hpp"
#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)
#include "SparseAddressOrderedFixedSizeDataPool.hpp"
#include "SparseVirtualMemory.hpp"
#endif /* defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) */
#include "SublistPool.hpp"
#include "SublistPuddle.hpp"

Expand Down Expand Up @@ -165,7 +169,7 @@ GC_CheckEngine::pushPreviousClass(J9Class* clazz)
bool
GC_CheckEngine::isPointerInSegment(void *pointer, J9MemorySegment *segment)
{
return ( ((UDATA)pointer >= (UDATA)segment->heapBase) && ((UDATA)pointer < (UDATA)segment->heapAlloc) );
return (((UDATA)pointer >= (UDATA)segment->heapBase) && ((UDATA)pointer < (UDATA)segment->heapAlloc));
}

/**
Expand Down Expand Up @@ -357,7 +361,7 @@ GC_CheckEngine::checkJ9ObjectPointer(J9JavaVM *javaVM, J9Object *objectPtr, J9Ob
* @see @ref findSegmentForClass
*/
UDATA
GC_CheckEngine::checkJ9ClassPointer(J9JavaVM *javaVM, J9Class *clazz, bool allowUndead )
GC_CheckEngine::checkJ9ClassPointer(J9JavaVM *javaVM, J9Class *clazz, bool allowUndead)
{
/* Short circuit if we've recently checked this class.
* In JLTF, this cache is about 94% effective (when its size is 19).
Expand Down Expand Up @@ -390,13 +394,13 @@ GC_CheckEngine::checkJ9ClassPointer(J9JavaVM *javaVM, J9Class *clazz, bool allow
/* Check to ensure J9Class header has the correct eyecatcher.
*/
UDATA result = checkJ9ClassHeader(javaVM, clazz);
if ( J9MODRON_GCCHK_RC_OK != result) {
if (J9MODRON_GCCHK_RC_OK != result) {
return result;
}

/* Check that class is not unloaded */
result = checkJ9ClassIsNotUnloaded(javaVM, clazz);
if ( J9MODRON_GCCHK_RC_OK != result) {
if (J9MODRON_GCCHK_RC_OK != result) {
return result;
}

Expand Down Expand Up @@ -461,13 +465,15 @@ GC_CheckEngine::checkJ9Object(J9JavaVM *javaVM, J9Object* objectPtr, J9MM_Iterat
}

#if defined(J9VM_ENV_DATA64)
if (OMR_ARE_ANY_BITS_SET(_cycle->getMiscFlags(), J9MODRON_GCCHK_VALID_INDEXABLE_DATA_ADDRESS) && extensions->objectModel.isIndexable(objectPtr) && javaVM->isIndexableDataAddrPresent) {
if (extensions->isVirtualLargeObjectHeapEnabled && extensions->objectModel.isIndexable(objectPtr)) {
/* Check that the indexable object has the correct data address pointer */
if (!extensions->indexableObjectModel.isValidDataAddr((J9IndexableObject*)objectPtr)) {
void *dataAddr = extensions->indexableObjectModel.getDataAddrForIndexableObject((J9IndexableObject *)objectPtr);
bool isValidDataAddr = extensions->largeObjectVirtualMemory->getSparseDataPool()->isValidDataPtr(dataAddr);
if (!isValidDataAddr && !extensions->indexableObjectModel.isValidDataAddr((J9IndexableObject *)objectPtr, dataAddr, isValidDataAddr)) {
return J9MODRON_GCCHK_RC_INVALID_INDEXABLE_DATA_ADDRESS;
}
}
#endif /* (J9VM_ENV_DATA64) */
#endif /* defined(J9VM_ENV_DATA64) */

if (checkFlags & J9MODRON_GCCHK_VERIFY_RANGE) {
UDATA regionEnd = ((UDATA)regionDesc->regionStart) + regionDesc->regionSize;
Expand Down Expand Up @@ -1182,8 +1188,8 @@ GC_CheckEngine::checkSlotRememberedSet(J9JavaVM *javaVM, J9Object **objectIndire

if (_cycle->getMiscFlags() & J9MODRON_GCCHK_MISC_MIDSCAVENGE) {
/* during a scavenge, some RS entries may be tagged -- remove the tag */
if ( DEFERRED_RS_REMOVE_FLAG == (((UDATA)objectPtr) & DEFERRED_RS_REMOVE_FLAG) ) {
objectPtr = (J9Object*)( ((UDATA)objectPtr) & ~(UDATA)DEFERRED_RS_REMOVE_FLAG );
if (DEFERRED_RS_REMOVE_FLAG == (((UDATA)objectPtr) & DEFERRED_RS_REMOVE_FLAG)) {
objectPtr = (J9Object*)(((UDATA)objectPtr) & ~(UDATA)DEFERRED_RS_REMOVE_FLAG);
}
}

Expand Down Expand Up @@ -1214,7 +1220,7 @@ GC_CheckEngine::checkSlotRememberedSet(J9JavaVM *javaVM, J9Object **objectIndire
}

/* content of Remembered Set should be Old and Remembered */
if ( !(extensions->isOld(objectPtr) && extensions->objectModel.isRemembered(objectPtr))) {
if (!(extensions->isOld(objectPtr) && extensions->objectModel.isRemembered(objectPtr))) {
GC_CheckError error(puddle, objectIndirect, _cycle, _currentCheck, J9MODRON_GCCHK_RC_REMEMBERED_SET_FLAGS, _cycle->nextErrorCount());
_reporter->report(&error);
_reporter->reportObjectHeader(&error, objectPtr, NULL);
Expand Down
Loading

0 comments on commit 7c2a572

Please sign in to comment.