diff --git a/runtime/gc_base/ObjectAccessBarrier.cpp b/runtime/gc_base/ObjectAccessBarrier.cpp index 78ede9f38cf..a30fbffff6b 100644 --- a/runtime/gc_base/ObjectAccessBarrier.cpp +++ b/runtime/gc_base/ObjectAccessBarrier.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -50,7 +50,7 @@ MM_ObjectAccessBarrier::initialize(MM_EnvironmentBase *env) J9JavaVM *vm = (J9JavaVM*)env->getOmrVM()->_language_vm; OMR_VM *omrVM = env->getOmrVM(); -#if defined (OMR_GC_COMPRESSED_POINTERS) +#if defined(OMR_GC_COMPRESSED_POINTERS) if (env->compressObjectReferences()) { #if defined(J9VM_GC_REALTIME) @@ -67,14 +67,14 @@ MM_ObjectAccessBarrier::initialize(MM_EnvironmentBase *env) } #endif /* J9VM_GC_REALTIME */ -#if defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_FULL_POINTERS) _compressObjectReferences = true; -#endif /* defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_FULL_POINTERS) */ _compressedPointersShift = omrVM->_compressedPointersShift; vm->compressedPointersShift = omrVM->_compressedPointersShift; Trc_MM_CompressedAccessBarrierInitialized(env->getLanguageVMThread(), 0, _compressedPointersShift); } -#endif /* OMR_GC_COMPRESSED_POINTERS */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) */ vm->objectAlignmentInBytes = omrVM->_objectAlignmentInBytes; vm->objectAlignmentShift = omrVM->_objectAlignmentShift; diff --git a/runtime/gc_base/ObjectAccessBarrier.hpp b/runtime/gc_base/ObjectAccessBarrier.hpp index f9270b2a257..763111aa50e 100644 --- a/runtime/gc_base/ObjectAccessBarrier.hpp +++ b/runtime/gc_base/ObjectAccessBarrier.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -53,12 +53,12 @@ class MM_ObjectAccessBarrier : public MM_BaseVirtual protected: MM_GCExtensions *_extensions; MM_Heap *_heap; -#if defined (OMR_GC_COMPRESSED_POINTERS) -#if defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) +#if defined(OMR_GC_FULL_POINTERS) bool _compressObjectReferences; -#endif /* defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_FULL_POINTERS) */ UDATA _compressedPointersShift; /**< the number of bits to shift by when converting between the compressed pointers heap and real heap */ -#endif /* defined (OMR_GC_COMPRESSED_POINTERS) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) */ UDATA _referenceLinkOffset; /** Offset within java/lang/ref/Reference of the reference link field */ UDATA _ownableSynchronizerLinkOffset; /** Offset within java/util/concurrent/locks/AbstractOwnableSynchronizer of the ownable synchronizer link field */ public: @@ -572,12 +572,12 @@ class MM_ObjectAccessBarrier : public MM_BaseVirtual MM_ObjectAccessBarrier(MM_EnvironmentBase *env) : MM_BaseVirtual() , _extensions(NULL) , _heap(NULL) -#if defined (OMR_GC_COMPRESSED_POINTERS) -#if defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) +#if defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(false) -#endif /* defined (OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_FULL_POINTERS) */ , _compressedPointersShift(0) -#endif /* OMR_GC_COMPRESSED_POINTERS */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) */ , _referenceLinkOffset(UDATA_MAX) , _ownableSynchronizerLinkOffset(UDATA_MAX) { diff --git a/runtime/gc_base/ScavengerForwardedHeader.hpp b/runtime/gc_base/ScavengerForwardedHeader.hpp index 46bbb2f8876..58883ff1c53 100644 --- a/runtime/gc_base/ScavengerForwardedHeader.hpp +++ b/runtime/gc_base/ScavengerForwardedHeader.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -58,9 +58,9 @@ class MM_ScavengerForwardedHeader protected: omrobjectptr_t _objectPtr; /**< the object on which to act */ UDATA _preserved; /**< a backup copy of the header fields which may be modified by this class */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool const _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ private: public: @@ -300,9 +300,9 @@ class MM_ScavengerForwardedHeader MM_ScavengerForwardedHeader(omrobjectptr_t object, MM_GCExtensionsBase *extensions) : _objectPtr(object) , _preserved(*(volatile UDATA *)_objectPtr) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(extensions->compressObjectReferences()) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { } @@ -323,9 +323,9 @@ class MM_ScavengerForwardedHeader MM_ScavengerForwardedHeader(omrobjectptr_t object, bool compress) : _objectPtr(object) , _preserved(*(volatile UDATA *)_objectPtr) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(compress) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { } diff --git a/runtime/gc_glue_java/ArrayletObjectModelBase.cpp b/runtime/gc_glue_java/ArrayletObjectModelBase.cpp index 33ad9d4d5ca..82a0faa2b2e 100644 --- a/runtime/gc_glue_java/ArrayletObjectModelBase.cpp +++ b/runtime/gc_glue_java/ArrayletObjectModelBase.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -26,9 +26,9 @@ bool GC_ArrayletObjectModelBase::initialize(MM_GCExtensionsBase * extensions) { -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) _compressObjectReferences = extensions->compressObjectReferences(); -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ _omrVM = extensions->getOmrVM(); _arrayletRangeBase = NULL; _arrayletRangeTop = (void *)UDATA_MAX; diff --git a/runtime/gc_glue_java/ArrayletObjectModelBase.hpp b/runtime/gc_glue_java/ArrayletObjectModelBase.hpp index b5e9333618a..2e05eccacb0 100644 --- a/runtime/gc_glue_java/ArrayletObjectModelBase.hpp +++ b/runtime/gc_glue_java/ArrayletObjectModelBase.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -41,13 +41,13 @@ class GC_ArrayletObjectModelBase * Data members */ private: -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ #if defined(J9VM_GC_ENABLE_DOUBLE_MAP) bool _enableDoubleMapping; /** Allows arraylets to be double mapped */ #endif /* J9VM_GC_ENABLE_DOUBLE_MAP */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ OMR_VM *_omrVM; /**< used so that we can pull the arrayletLeafSize and arrayletLeafLogSize for arraylet sizing calculations */ void * _arrayletRangeBase; /**< The base heap range of where discontiguous arraylets are allowed. */ void * _arrayletRangeTop; /**< The top heap range of where discontiguous arraylets are allowed. */ diff --git a/runtime/gc_glue_java/MixedObjectModel.cpp b/runtime/gc_glue_java/MixedObjectModel.cpp index 9ef00fe3d6d..020e73f2083 100644 --- a/runtime/gc_glue_java/MixedObjectModel.cpp +++ b/runtime/gc_glue_java/MixedObjectModel.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -27,9 +27,9 @@ bool GC_MixedObjectModel::initialize(MM_GCExtensionsBase *extensions) { -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) _compressObjectReferences = extensions->compressObjectReferences(); -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ return true; } diff --git a/runtime/gc_glue_java/MixedObjectModel.hpp b/runtime/gc_glue_java/MixedObjectModel.hpp index f27cab322ad..97b22fbb7bb 100644 --- a/runtime/gc_glue_java/MixedObjectModel.hpp +++ b/runtime/gc_glue_java/MixedObjectModel.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -43,10 +43,10 @@ class GC_MixedObjectModel * Data members */ private: -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ public: /* diff --git a/runtime/gc_glue_java/ObjectModelDelegate.hpp b/runtime/gc_glue_java/ObjectModelDelegate.hpp index c4d3ac3f414..d61029bdcea 100644 --- a/runtime/gc_glue_java/ObjectModelDelegate.hpp +++ b/runtime/gc_glue_java/ObjectModelDelegate.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017, 2020 IBM Corp. and others + * Copyright (c) 2017, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -51,16 +51,15 @@ class GC_ObjectModelDelegate static const uintptr_t _objectHeaderSlotOffset = 0; static const uintptr_t _objectHeaderSlotFlagsShift = 0; -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ - const uintptr_t _delegateHeaderSlotFlagsMask; GC_ArrayObjectModel *_arrayObjectModel; GC_MixedObjectModel *_mixedObjectModel; protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ public: /* diff --git a/runtime/gc_glue_java/ScavengerDelegate.cpp b/runtime/gc_glue_java/ScavengerDelegate.cpp index 0216ca40ef2..351a61f660e 100644 --- a/runtime/gc_glue_java/ScavengerDelegate.cpp +++ b/runtime/gc_glue_java/ScavengerDelegate.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 IBM Corp. and others + * Copyright (c) 2019, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -803,9 +803,6 @@ MM_ScavengerDelegate::MM_ScavengerDelegate(MM_EnvironmentBase* env) : _omrVM(MM_GCExtensions::getExtensions(env)->getOmrVM()) , _javaVM(MM_GCExtensions::getExtensions(env)->getJavaVM()) , _extensions(MM_GCExtensions::getExtensions(env)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(env->compressObjectReferences()) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _shouldScavengeFinalizableObjects(false) , _shouldScavengeUnfinalizedObjects(false) , _shouldScavengeSoftReferenceObjects(false) @@ -817,6 +814,9 @@ MM_ScavengerDelegate::MM_ScavengerDelegate(MM_EnvironmentBase* env) #if defined(OMR_GC_CONCURRENT_SCAVENGER) , _flushCachesAsyncCallbackKey(-1) #endif /* OMR_GC_CONCURRENT_SCAVENGER */ +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(env->compressObjectReferences()) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { _typeId = __FUNCTION__; } diff --git a/runtime/gc_glue_java/ScavengerDelegate.hpp b/runtime/gc_glue_java/ScavengerDelegate.hpp index 8a0a2e85cc4..a87488049e9 100644 --- a/runtime/gc_glue_java/ScavengerDelegate.hpp +++ b/runtime/gc_glue_java/ScavengerDelegate.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2020 IBM Corp. and others + * Copyright (c) 2019, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -60,13 +60,12 @@ class MM_ParallelSweepScheme; * @ingroup GC_Base */ class MM_ScavengerDelegate : public MM_BaseNonVirtual { + +/* Data members & types */ private: OMR_VM *_omrVM; J9JavaVM *_javaVM; MM_GCExtensions *_extensions; -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ volatile bool _shouldScavengeFinalizableObjects; /**< Set to true at the beginning of a collection if there are any pending finalizable objects */ volatile bool _shouldScavengeUnfinalizedObjects; /**< Set to true at the beginning of a collection if there are any unfinalized objects */ volatile bool _shouldScavengeSoftReferenceObjects; /**< Set to true if there are any SoftReference objects discovered */ @@ -81,8 +80,13 @@ class MM_ScavengerDelegate : public MM_BaseNonVirtual { #endif /* OMR_GC_CONCURRENT_SCAVENGER */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ + public: +/* Methods */ private: /* diff --git a/runtime/gc_include/ObjectAccessBarrierAPI.hpp b/runtime/gc_include/ObjectAccessBarrierAPI.hpp index 8f824bd7de5..9ae62713d61 100644 --- a/runtime/gc_include/ObjectAccessBarrierAPI.hpp +++ b/runtime/gc_include/ObjectAccessBarrierAPI.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -52,16 +52,18 @@ class MM_ObjectAccessBarrierAPI /* Data members & types */ public: -protected: + private: const UDATA _writeBarrierType; const UDATA _readBarrierType; -#if defined (OMR_GC_COMPRESSED_POINTERS) +#if defined(OMR_GC_COMPRESSED_POINTERS) const UDATA _compressedPointersShift; -#if defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) */ + +protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) bool const _compressObjectReferences; -#endif /* defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ -#endif /* defined (OMR_GC_COMPRESSED_POINTERS) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ /* Methods */ public: @@ -72,12 +74,12 @@ class MM_ObjectAccessBarrierAPI MM_ObjectAccessBarrierAPI(J9VMThread *currentThread) : _writeBarrierType(currentThread->javaVM->gcWriteBarrierType) , _readBarrierType(currentThread->javaVM->gcReadBarrierType) -#if defined (OMR_GC_COMPRESSED_POINTERS) +#if defined(OMR_GC_COMPRESSED_POINTERS) , _compressedPointersShift(currentThread->javaVM->compressedPointersShift) -#if defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) */ +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(J9VMTHREAD_COMPRESS_OBJECT_REFERENCES(currentThread)) -#endif /* defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ -#endif /* defined (OMR_GC_COMPRESSED_POINTERS) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ {} /** diff --git a/runtime/gc_structs/ArrayletLeafIterator.hpp b/runtime/gc_structs/ArrayletLeafIterator.hpp index 1e2801d2d9c..660a4f6fd5b 100644 --- a/runtime/gc_structs/ArrayletLeafIterator.hpp +++ b/runtime/gc_structs/ArrayletLeafIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -46,9 +46,9 @@ class GC_ArrayletLeafIterator { protected: OMR_VM *const _omrVM; -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ GC_SlotObject _slotObject; J9IndexableObject *_spinePtr; /**< The pointer to the beginning of the actual indexable object (ie: the spine) */ GC_ArrayletObjectModel::ArrayLayout _layout; /**< The layout of the arraylet being iterated */ @@ -124,9 +124,9 @@ class GC_ArrayletLeafIterator GC_ArrayletLeafIterator(J9JavaVM *javaVM, J9IndexableObject *objectPtr) : _omrVM(javaVM->omrVM) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _slotObject(GC_SlotObject(_omrVM, NULL)) { initialize(objectPtr); diff --git a/runtime/gc_structs/MixedObjectIterator.hpp b/runtime/gc_structs/MixedObjectIterator.hpp index 0b787786f47..3b23f87d001 100644 --- a/runtime/gc_structs/MixedObjectIterator.hpp +++ b/runtime/gc_structs/MixedObjectIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -46,9 +46,9 @@ class GC_MixedObjectIterator private: protected: GC_SlotObject _slotObject; /**< Create own SlotObject class to provide output */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ J9Object *_objectPtr; /**< save address of object this class initiated with */ fj9object_t *_scanPtr; /**< current scan pointer */ @@ -248,9 +248,9 @@ class GC_MixedObjectIterator */ GC_MixedObjectIterator (OMR_VM *omrVM) : _slotObject(GC_SlotObject(omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(OMRVM_COMPRESS_OBJECT_REFERENCES(omrVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _objectPtr(NULL) , _scanPtr(NULL) , _endPtr(NULL) @@ -265,9 +265,9 @@ class GC_MixedObjectIterator */ GC_MixedObjectIterator (OMR_VM *omrVM, J9Object *objectPtr) : _slotObject(GC_SlotObject(omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(OMRVM_COMPRESS_OBJECT_REFERENCES(omrVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _objectPtr(NULL) , _scanPtr(NULL) , _endPtr(NULL) diff --git a/runtime/gc_structs/PointerArrayletInlineLeafIterator.hpp b/runtime/gc_structs/PointerArrayletInlineLeafIterator.hpp index f23f52f5072..25b5d404093 100644 --- a/runtime/gc_structs/PointerArrayletInlineLeafIterator.hpp +++ b/runtime/gc_structs/PointerArrayletInlineLeafIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -47,10 +47,6 @@ class GC_PointerArrayletInlineLeafIterator /* Data Members */ private: GC_SlotObject _slotObject; /**< Create own SlotObject class to provide output */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ - UDATA _arrayletLeafSize; /* The size of an arraylet leaf */ UDATA _fobjectsPerLeaf; /* The number of fj9object_t's per leaf */ fj9object_t * _currentArrayletBaseAddress; /* The base address of the current arraylet */ @@ -58,6 +54,9 @@ class GC_PointerArrayletInlineLeafIterator UDATA _elementsStillToRead; /**< The number of elements this iterator is still expecting to return */ J9JavaVM *_javaVM; /**< The JavaVM */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool const _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ public: /* Member Functions */ @@ -123,10 +122,10 @@ class GC_PointerArrayletInlineLeafIterator GC_PointerArrayletInlineLeafIterator(J9JavaVM *javaVM) : _slotObject(GC_SlotObject(javaVM->omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _javaVM(javaVM) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { _arrayletLeafSize = _javaVM->arrayletLeafSize; _fobjectsPerLeaf = _arrayletLeafSize / J9JAVAVM_REFERENCE_SIZE(javaVM); @@ -137,10 +136,10 @@ class GC_PointerArrayletInlineLeafIterator */ GC_PointerArrayletInlineLeafIterator(J9JavaVM *javaVM, J9Object *objectPtr) : _slotObject(GC_SlotObject(javaVM->omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _javaVM(javaVM) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { _arrayletLeafSize = _javaVM->arrayletLeafSize; _fobjectsPerLeaf = _arrayletLeafSize / J9JAVAVM_REFERENCE_SIZE(javaVM); diff --git a/runtime/gc_structs/PointerArrayletIterator.hpp b/runtime/gc_structs/PointerArrayletIterator.hpp index 42062981989..430c2a6aeda 100644 --- a/runtime/gc_structs/PointerArrayletIterator.hpp +++ b/runtime/gc_structs/PointerArrayletIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -48,9 +48,6 @@ class GC_PointerArrayletIterator private: J9IndexableObject *_arrayPtr; /**< pointer to the array object being iterated */ GC_SlotObject _slotObject; /**< Create own SlotObject class to provide output */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ UDATA const _arrayletLeafSize; /* The size of an arraylet leaf */ UDATA const _fobjectsPerLeaf; /* The number of fj9object_t's per leaf */ @@ -84,6 +81,9 @@ class GC_PointerArrayletIterator } protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool const _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ J9JavaVM *const _javaVM; /**< A cached pointer to the shared JavaVM instance */ public: @@ -148,15 +148,15 @@ class GC_PointerArrayletIterator GC_PointerArrayletIterator(J9JavaVM *javaVM) : _arrayPtr(NULL) , _slotObject(GC_SlotObject(javaVM->omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _arrayletLeafSize(javaVM->arrayletLeafSize) , _fobjectsPerLeaf(_arrayletLeafSize / J9JAVAVM_REFERENCE_SIZE(javaVM)) , _index(0) , _currentArrayletBaseAddress(NULL) , _currentArrayletIndex(0) , _currentArrayletOffset(0) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _javaVM(javaVM) { } @@ -167,15 +167,15 @@ class GC_PointerArrayletIterator GC_PointerArrayletIterator(J9JavaVM *javaVM, J9Object *objectPtr) : _arrayPtr(NULL) , _slotObject(GC_SlotObject(javaVM->omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _arrayletLeafSize(javaVM->arrayletLeafSize) , _fobjectsPerLeaf(_arrayletLeafSize / J9JAVAVM_REFERENCE_SIZE(javaVM)) , _index(0) , _currentArrayletBaseAddress(NULL) , _currentArrayletIndex(0) , _currentArrayletOffset(0) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(javaVM)) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _javaVM(javaVM) { initialize(objectPtr); diff --git a/runtime/gc_structs/PointerContiguousArrayIterator.hpp b/runtime/gc_structs/PointerContiguousArrayIterator.hpp index d5d59fc6961..ad30ad8d0f2 100644 --- a/runtime/gc_structs/PointerContiguousArrayIterator.hpp +++ b/runtime/gc_structs/PointerContiguousArrayIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -48,14 +48,13 @@ class GC_PointerContiguousArrayIterator private: J9IndexableObject *_arrayPtr; /**< pointer to the array object being iterated */ GC_SlotObject _slotObject; /**< Create own SlotObject class to provide output */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ - fj9object_t *_scanPtr; /**< pointer to the current array slot */ fj9object_t *_endPtr; /**< pointer to the array slot where the iteration will terminate */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool const _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ OMR_VM *_omrVM; public: @@ -110,9 +109,9 @@ class GC_PointerContiguousArrayIterator GC_PointerContiguousArrayIterator(OMR_VM *omrVM) : _slotObject(GC_SlotObject(omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(OMRVM_COMPRESS_OBJECT_REFERENCES(omrVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _omrVM(omrVM) { } @@ -122,9 +121,9 @@ class GC_PointerContiguousArrayIterator */ GC_PointerContiguousArrayIterator(OMR_VM *omrVM, J9Object *objectPtr) : _slotObject(GC_SlotObject(omrVM, NULL)) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(OMRVM_COMPRESS_OBJECT_REFERENCES(omrVM)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ , _omrVM(omrVM) { initialize(objectPtr); diff --git a/runtime/gc_vlhgc/InterRegionRememberedSet.cpp b/runtime/gc_vlhgc/InterRegionRememberedSet.cpp index 33455dc164d..708451b1edc 100644 --- a/runtime/gc_vlhgc/InterRegionRememberedSet.cpp +++ b/runtime/gc_vlhgc/InterRegionRememberedSet.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -56,9 +56,6 @@ MM_InterRegionRememberedSet::MM_InterRegionRememberedSet(MM_HeapRegionManager *h , _overflowedListTail(NULL) , _regionSize(0) , _shouldFlushBuffersForDecommitedRegions(false) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - , _compressObjectReferences(false) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ , _overflowedRegionCount(0) , _stableRegionCount(0) , _beingRebuiltRegionCount(0) @@ -69,6 +66,9 @@ MM_InterRegionRememberedSet::MM_InterRegionRememberedSet(MM_HeapRegionManager *h , _cardToRegionDisplacement(0) , _cardTable(NULL) , _rememberedSetCardBucketPool(NULL) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + , _compressObjectReferences(false) +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { _typeId = __FUNCTION__; } @@ -272,9 +272,9 @@ MM_InterRegionRememberedSet::initialize(MM_EnvironmentVLHGC* env) UDATA baseOfHeap = (UDATA) (_heapRegionManager->_regionTable)->getLowAddress(); #if defined(OMR_GC_COMPRESSED_POINTERS) if (env->compressObjectReferences()) { -#if defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_FULL_POINTERS) _compressObjectReferences = true; -#endif /* defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_FULL_POINTERS) */ _cardToRegionShift = _heapRegionManager->_regionShift - CARD_SIZE_SHIFT; _cardToRegionDisplacement = baseOfHeap >> CARD_SIZE_SHIFT; } else diff --git a/runtime/gc_vlhgc/InterRegionRememberedSet.hpp b/runtime/gc_vlhgc/InterRegionRememberedSet.hpp index 80adf0d3dd1..80991a0fe78 100644 --- a/runtime/gc_vlhgc/InterRegionRememberedSet.hpp +++ b/runtime/gc_vlhgc/InterRegionRememberedSet.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -70,9 +70,6 @@ class MM_InterRegionRememberedSet : public MM_BaseVirtual UDATA _regionSize; /**< Cached region size */ bool _shouldFlushBuffersForDecommitedRegions; /**< set to true at the end of a GC, if contraction occured. this is a signal for the next GC to perform flush buffers from regions contracted */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ volatile UDATA _overflowedRegionCount; /**< count of regions overflowed as full */ UDATA _stableRegionCount; /**< count of regions overflowed as stable */ @@ -87,6 +84,11 @@ class MM_InterRegionRememberedSet : public MM_BaseVirtual MM_RememberedSetCardBucket *_rememberedSetCardBucketPool; /**< RS bucket pool (for all regions) for Main thread or any other thread that caused GC in absence of Main thread */ +protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ + private: /** diff --git a/runtime/gc_vlhgc/LeafAwareMixedObjectIterator.hpp b/runtime/gc_vlhgc/LeafAwareMixedObjectIterator.hpp index f0b792df030..83208363533 100644 --- a/runtime/gc_vlhgc/LeafAwareMixedObjectIterator.hpp +++ b/runtime/gc_vlhgc/LeafAwareMixedObjectIterator.hpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2020 IBM Corp. and others + * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -52,11 +52,11 @@ class GC_LeafAwareMixedObjectIterator UDATA _descriptionIndex; /**< current bit number in description word */ UDATA *_leafDescriptionPtr; /**< current leaf-bit description pointer */ UDATA _leafDescription; /**< current leaf-bit description word */ -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) - bool const _compressObjectReferences; -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ protected: +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + bool const _compressObjectReferences; +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ public: /** @@ -218,9 +218,9 @@ class GC_LeafAwareMixedObjectIterator , _descriptionIndex(0) , _leafDescriptionPtr(NULL) , _leafDescription(0) -#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) , _compressObjectReferences(J9JAVAVM_COMPRESS_OBJECT_REFERENCES(vm)) -#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) && !defined(OMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES) */ +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ { _objectPtr = objectPtr; J9Class *clazzPtr = J9GC_J9OBJECT_CLAZZ_VM(objectPtr, vm);