From 82cac63e79e2af720518aed1c6b3ff684f400db4 Mon Sep 17 00:00:00 2001 From: lhu Date: Mon, 4 Nov 2024 16:52:49 -0500 Subject: [PATCH] Add flag isVirtualLargeObjectHeapEnabled in J9VMThread and J9JavaVM - cache flag isVirtualLargeObjectHeapEnabled in both J9VMThread and J9JavaVM. - initialize both isVirtualLargeObjectHeapEnabled flags. Signed-off-by: lhu --- runtime/gc_modron_startup/mminit.cpp | 1 + runtime/oti/j9nonbuilder.h | 2 ++ runtime/vm/vmthread.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/runtime/gc_modron_startup/mminit.cpp b/runtime/gc_modron_startup/mminit.cpp index 761e21451ff..4724a9b16df 100644 --- a/runtime/gc_modron_startup/mminit.cpp +++ b/runtime/gc_modron_startup/mminit.cpp @@ -2962,6 +2962,7 @@ gcInitializeDefaults(J9JavaVM* vm) #if defined(J9VM_ENV_DATA64) vm->isIndexableDualHeaderShapeEnabled = TRUE; vm->isIndexableDataAddrPresent = FALSE; + vm->isVirtualLargeObjectHeapEnabled = FALSE; #endif /* defined(J9VM_ENV_DATA64) */ /* enable estimateFragmentation for all GCs as default for java, but not the estimated result would not affect concurrentgc kickoff by default */ diff --git a/runtime/oti/j9nonbuilder.h b/runtime/oti/j9nonbuilder.h index 4c9d2eb008b..64f08ed1b7e 100644 --- a/runtime/oti/j9nonbuilder.h +++ b/runtime/oti/j9nonbuilder.h @@ -5480,6 +5480,7 @@ typedef struct J9VMThread { UDATA discontiguousIndexableHeaderSize; #if defined(J9VM_ENV_DATA64) UDATA isIndexableDataAddrPresent; + BOOLEAN isVirtualLargeObjectHeapEnabled; #endif /* defined(J9VM_ENV_DATA64) */ void* gpInfo; void* jitVMwithThreadInfo; @@ -6033,6 +6034,7 @@ typedef struct J9JavaVM { UDATA discontiguousIndexableHeaderSize; #if defined(J9VM_ENV_DATA64) UDATA isIndexableDataAddrPresent; + BOOLEAN isVirtualLargeObjectHeapEnabled; BOOLEAN isIndexableDualHeaderShapeEnabled; #endif /* defined(J9VM_ENV_DATA64) */ struct J9VMThread* exclusiveVMAccessQueueHead; diff --git a/runtime/vm/vmthread.cpp b/runtime/vm/vmthread.cpp index 3a019c0ac39..92c87004964 100644 --- a/runtime/vm/vmthread.cpp +++ b/runtime/vm/vmthread.cpp @@ -197,6 +197,7 @@ allocateVMThread(J9JavaVM *vm, omrthread_t osThread, UDATA privateFlags, void *m newThread->unsafeIndexableHeaderSize = vm->unsafeIndexableHeaderSize; #if defined(J9VM_ENV_DATA64) newThread->isIndexableDataAddrPresent = vm->isIndexableDataAddrPresent; + newThread->isVirtualLargeObjectHeapEnabled = vm->isVirtualLargeObjectHeapEnabled; #endif /* defined(J9VM_ENV_DATA64) */ newThread->privateFlags = privateFlags;