From 0bfabacedaa44a4bfbfa7f705f3f798bedec64f2 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 03:27:34 +0000 Subject: [PATCH 01/14] CodeCacheSegmentSize --- src/hotspot/cpu/aarch64/globals_aarch64.hpp | 2 +- src/hotspot/cpu/arm/globals_arm.hpp | 6 +++--- src/hotspot/cpu/ppc/globals_ppc.hpp | 8 ++++---- src/hotspot/cpu/riscv/globals_riscv.hpp | 2 +- src/hotspot/cpu/s390/globals_s390.hpp | 2 +- src/hotspot/cpu/x86/globals_x86.hpp | 2 +- src/hotspot/cpu/zero/globals_zero.hpp | 8 ++++---- src/hotspot/share/code/codeCache.cpp | 4 ++-- .../share/jvmci/jvmciCompilerToVMInit.cpp | 19 +++++++++++-------- .../flags/jvmFlagConstraintsCompiler.cpp | 8 ++++---- .../flags/jvmFlagConstraintsCompiler.hpp | 2 +- src/hotspot/share/runtime/globals.hpp | 2 +- .../codecache/jmx/CodeCacheUtils.java | 2 +- .../jfr/event/compiler/TestCodeSweeper.java | 2 +- 14 files changed, 36 insertions(+), 33 deletions(-) diff --git a/src/hotspot/cpu/aarch64/globals_aarch64.hpp b/src/hotspot/cpu/aarch64/globals_aarch64.hpp index b316103d6567e..d195af8cef468 100644 --- a/src/hotspot/cpu/aarch64/globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/globals_aarch64.hpp @@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI); -define_pd_global(uintx, CodeCacheSegmentSize, 64); +define_pd_global(size_t, CodeCacheSegmentSize, 64); define_pd_global(intx, CodeEntryAlignment, 64); define_pd_global(intx, OptoLoopAlignment, 16); diff --git a/src/hotspot/cpu/arm/globals_arm.hpp b/src/hotspot/cpu/arm/globals_arm.hpp index 9c4b8500e1873..0b6214dada5d4 100644 --- a/src/hotspot/cpu/arm/globals_arm.hpp +++ b/src/hotspot/cpu/arm/globals_arm.hpp @@ -36,9 +36,9 @@ define_pd_global(bool, TrapBasedNullChecks, false); // Not needed define_pd_global(bool, DelayCompilerStubsGeneration, false); // No need - only few compiler's stubs -define_pd_global(uintx, CodeCacheSegmentSize, 64); -define_pd_global(intx, CodeEntryAlignment, 16); -define_pd_global(intx, OptoLoopAlignment, 16); +define_pd_global(size_t, CodeCacheSegmentSize, 64); +define_pd_global(intx, CodeEntryAlignment, 16); +define_pd_global(intx, OptoLoopAlignment, 16); #define DEFAULT_STACK_YELLOW_PAGES (2) #define DEFAULT_STACK_RED_PAGES (1) diff --git a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index f944408fe29d5..794be9bbcb93b 100644 --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -59,10 +59,10 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES); define_pd_global(bool, VMContinuations, true); // Use large code-entry alignment. -define_pd_global(uintx, CodeCacheSegmentSize, 128); -define_pd_global(intx, CodeEntryAlignment, 64); -define_pd_global(intx, OptoLoopAlignment, 16); -define_pd_global(intx, InlineSmallCode, 1500); +define_pd_global(size_t, CodeCacheSegmentSize, 128); +define_pd_global(intx, CodeEntryAlignment, 64); +define_pd_global(intx, OptoLoopAlignment, 16); +define_pd_global(intx, InlineSmallCode, 1500); // Flags for template interpreter. define_pd_global(bool, RewriteBytecodes, true); diff --git a/src/hotspot/cpu/riscv/globals_riscv.hpp b/src/hotspot/cpu/riscv/globals_riscv.hpp index d67e05bbb6d09..4a33d40ec6ceb 100644 --- a/src/hotspot/cpu/riscv/globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/globals_riscv.hpp @@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI); -define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. +define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. define_pd_global(intx, CodeEntryAlignment, 64); define_pd_global(intx, OptoLoopAlignment, 16); diff --git a/src/hotspot/cpu/s390/globals_s390.hpp b/src/hotspot/cpu/s390/globals_s390.hpp index cf4be20397cfd..aefe58f9e4432 100644 --- a/src/hotspot/cpu/s390/globals_s390.hpp +++ b/src/hotspot/cpu/s390/globals_s390.hpp @@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nu define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI); -define_pd_global(uintx, CodeCacheSegmentSize, 256); +define_pd_global(size_t, CodeCacheSegmentSize, 256); // This shall be at least 32 for proper branch target alignment. // Ideally, this is 256 (cache line size). This keeps code end data // on separate lines. But we reduced it to 64 since 256 increased diff --git a/src/hotspot/cpu/x86/globals_x86.hpp b/src/hotspot/cpu/x86/globals_x86.hpp index a1d4a71874f55..cabbc72eeeea3 100644 --- a/src/hotspot/cpu/x86/globals_x86.hpp +++ b/src/hotspot/cpu/x86/globals_x86.hpp @@ -37,7 +37,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI); -define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. +define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. // See 4827828 for this change. There is no globals_core_i486.hpp. I can't // assign a different value for C2 without touching a number of files. Use // #ifdef to minimize the change as it's late in Mantis. -- FIXME. diff --git a/src/hotspot/cpu/zero/globals_zero.hpp b/src/hotspot/cpu/zero/globals_zero.hpp index 76f9692e2021b..66c9d5faab3bc 100644 --- a/src/hotspot/cpu/zero/globals_zero.hpp +++ b/src/hotspot/cpu/zero/globals_zero.hpp @@ -38,10 +38,10 @@ define_pd_global(bool, UncommonNullCast, true); define_pd_global(bool, DelayCompilerStubsGeneration, false); // Don't have compiler's stubs -define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. -define_pd_global(intx, CodeEntryAlignment, 32); -define_pd_global(intx, OptoLoopAlignment, 16); -define_pd_global(intx, InlineSmallCode, 1000); +define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment. +define_pd_global(intx, CodeEntryAlignment, 32); +define_pd_global(intx, OptoLoopAlignment, 16); +define_pd_global(intx, InlineSmallCode, 1000); // not used, but must satisfy following constraints: // 1.) must be in the allowed range for intx *and* diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp index 3a5da1d7cd2ae..05b38ecba6e21 100644 --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -1106,9 +1106,9 @@ size_t CodeCache::freelists_length() { void icache_init(); void CodeCache::initialize() { - assert(CodeCacheSegmentSize >= (uintx)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points"); + assert(CodeCacheSegmentSize >= (size_t)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points"); #ifdef COMPILER2 - assert(CodeCacheSegmentSize >= (uintx)OptoLoopAlignment, "CodeCacheSegmentSize must be large enough to align inner loops"); + assert(CodeCacheSegmentSize >= (size_t)OptoLoopAlignment, "CodeCacheSegmentSize must be large enough to align inner loops"); #endif assert(CodeCacheSegmentSize >= sizeof(jdouble), "CodeCacheSegmentSize must be large enough to align constants"); // This was originally just a check of the alignment, causing failure, instead, round diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp index 1beb1917b9a97..e5e13b126a221 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp @@ -57,6 +57,8 @@ #include "gc/shenandoah/shenandoahHeapRegion.hpp" #endif +#include + int CompilerToVM::Data::oopDesc_klass_offset_in_bytes; int CompilerToVM::Data::arrayOopDesc_length_offset_in_bytes; @@ -343,7 +345,7 @@ JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) { return vmIntrinsics; } -#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_int_flag, do_intx_flag, do_uintx_flag) \ +#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_int_flag, do_size_t_flag, do_intx_flag, do_uintx_flag) \ do_int_flag(AllocateInstancePrefetchLines) \ do_int_flag(AllocatePrefetchDistance) \ do_intx_flag(AllocatePrefetchInstr) \ @@ -354,7 +356,7 @@ JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) { do_bool_flag(BootstrapJVMCI) \ do_bool_flag(CITime) \ do_bool_flag(CITimeEach) \ - do_uintx_flag(CodeCacheSegmentSize) \ + do_size_t_flag(CodeCacheSegmentSize) \ do_intx_flag(CodeEntryAlignment) \ do_int_flag(ContendedPaddingWidth) \ do_bool_flag(DontCompileHugeMethods) \ @@ -541,16 +543,17 @@ jobjectArray readConfiguration0(JNIEnv *env, JVMCI_TRAPS) { JVMCIObject vmFlagObj = JVMCIENV->new_VMFlag(fname, ftype, value, JVMCI_CHECK_NULL); \ JVMCIENV->put_object_at(vmFlags, i++, vmFlagObj); \ } -#define ADD_BOOL_FLAG(name) ADD_FLAG(bool, name, BOXED_BOOLEAN) -#define ADD_INT_FLAG(name) ADD_FLAG(int, name, BOXED_LONG) -#define ADD_INTX_FLAG(name) ADD_FLAG(intx, name, BOXED_LONG) -#define ADD_UINTX_FLAG(name) ADD_FLAG(uintx, name, BOXED_LONG) +#define ADD_BOOL_FLAG(name) ADD_FLAG(bool, name, BOXED_BOOLEAN) +#define ADD_INT_FLAG(name) ADD_FLAG(int, name, BOXED_LONG) +#define ADD_SIZE_T_FLAG(name) ADD_FLAG(size_t, name, BOXED_LONG) +#define ADD_INTX_FLAG(name) ADD_FLAG(intx, name, BOXED_LONG) +#define ADD_UINTX_FLAG(name) ADD_FLAG(uintx, name, BOXED_LONG) - len = 0 + PREDEFINED_CONFIG_FLAGS(COUNT_FLAG, COUNT_FLAG, COUNT_FLAG, COUNT_FLAG); + len = 0 + PREDEFINED_CONFIG_FLAGS(COUNT_FLAG, COUNT_FLAG, COUNT_FLAG, COUNT_FLAG, COUNT_FLAG); JVMCIObjectArray vmFlags = JVMCIENV->new_VMFlag_array(len, JVMCI_CHECK_NULL); int i = 0; JVMCIObject value; - PREDEFINED_CONFIG_FLAGS(ADD_BOOL_FLAG, ADD_INT_FLAG, ADD_INTX_FLAG, ADD_UINTX_FLAG) + PREDEFINED_CONFIG_FLAGS(ADD_BOOL_FLAG, ADD_INT_FLAG, ADD_SIZE_T_FLAG, ADD_INTX_FLAG, ADD_UINTX_FLAG) JVMCIObjectArray vmIntrinsics = CompilerToVM::initialize_intrinsics(JVMCI_CHECK_NULL); diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp index d9972b21ea122..96177512dfeef 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp @@ -155,8 +155,8 @@ JVMFlag::Error OnStackReplacePercentageConstraintFunc(intx value, bool verbose) return JVMFlag::SUCCESS; } -JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) { - if (CodeCacheSegmentSize < (uintx)CodeEntryAlignment) { +JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(size_t value, bool verbose) { + if (CodeCacheSegmentSize < (size_t)CodeEntryAlignment) { JVMFlag::printError(verbose, "CodeCacheSegmentSize (%zu) must be " "larger than or equal to CodeEntryAlignment (%zd) " @@ -174,7 +174,7 @@ JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) { } #ifdef COMPILER2 - if (CodeCacheSegmentSize < (uintx)OptoLoopAlignment) { + if (CodeCacheSegmentSize < (size_t)OptoLoopAlignment) { JVMFlag::printError(verbose, "CodeCacheSegmentSize (%zu) must be " "larger than or equal to OptoLoopAlignment (%zd) " @@ -203,7 +203,7 @@ JVMFlag::Error CodeEntryAlignmentConstraintFunc(intx value, bool verbose) { return JVMFlag::VIOLATES_CONSTRAINT; } - if ((uintx)CodeEntryAlignment > CodeCacheSegmentSize) { + if ((size_t)CodeEntryAlignment > CodeCacheSegmentSize) { JVMFlag::printError(verbose, "CodeEntryAlignment (%zd) must be " "less than or equal to CodeCacheSegmentSize (%zu) " diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp index cfca8ecf8eef7..265350b87412c 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp @@ -40,7 +40,7 @@ f(int, AllocatePrefetchStepSizeConstraintFunc) \ f(intx, CompileThresholdConstraintFunc) \ f(intx, OnStackReplacePercentageConstraintFunc) \ - f(uintx, CodeCacheSegmentSizeConstraintFunc) \ + f(size_t, CodeCacheSegmentSizeConstraintFunc) \ f(intx, CodeEntryAlignmentConstraintFunc) \ f(intx, OptoLoopAlignmentConstraintFunc) \ f(uintx, ArraycopyDstPrefetchDistanceConstraintFunc) \ diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 290ce0d3cba2d..a85a398cf0ae5 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1501,7 +1501,7 @@ const int ObjectAlignmentInBytes = 8; "Stack space (bytes) required for JVM_InvokeMethod to complete") \ \ /* code cache parameters */ \ - product_pd(uintx, CodeCacheSegmentSize, EXPERIMENTAL, \ + product_pd(size_t, CodeCacheSegmentSize, EXPERIMENTAL, \ "Code cache segment size (in bytes) - smallest unit of " \ "allocation") \ range(1, 1024) \ diff --git a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java index 340021bb99317..9c863b874fadf 100644 --- a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java +++ b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java @@ -41,7 +41,7 @@ public final class CodeCacheUtils { = Integer.getInteger("codecache.allocation.size", 100); public static final WhiteBox WB = WhiteBox.getWhiteBox(); public static final long SEGMENT_SIZE - = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheSegmentSize"); + = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheSegmentSize"); public static final long MIN_BLOCK_LENGTH = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheMinBlockLength"); public static final long MIN_ALLOCATION = SEGMENT_SIZE * MIN_BLOCK_LENGTH; diff --git a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java index dd227489a0c6e..37c52d24cd866 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java @@ -65,7 +65,7 @@ public class TestCodeSweeper { private static final String METHOD_NAME = "verifyFullEvent"; private static final String pathFull = EventNames.CodeCacheFull; private static final String pathFailure = EventNames.CompilationFailure; - public static final long SEGMENT_SIZE = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheSegmentSize"); + public static final long SEGMENT_SIZE = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheSegmentSize"); public static final long MIN_BLOCK_LENGTH = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheMinBlockLength"); public static final long MIN_ALLOCATION = SEGMENT_SIZE * MIN_BLOCK_LENGTH; private static final double CACHE_USAGE_COEF = 0.95d; From 707a85af422f8f13e5bedf953ce12823baa09f62 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 06:05:10 +0000 Subject: [PATCH 02/14] Initial/ReservedCodeCacheSize --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 4 ++-- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 4 ++-- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 4 ++-- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 4 ++-- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 4 ++-- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 4 ++-- src/hotspot/cpu/s390/c1_globals_s390.hpp | 4 ++-- src/hotspot/cpu/s390/c2_globals_s390.hpp | 4 ++-- src/hotspot/cpu/x86/c1_globals_x86.hpp | 4 ++-- src/hotspot/cpu/x86/c2_globals_x86.hpp | 6 +++--- src/hotspot/share/code/codeCache.cpp | 2 +- src/hotspot/share/compiler/compilationPolicy.cpp | 6 +++--- src/hotspot/share/compiler/compilerDefinitions.cpp | 8 ++++---- src/hotspot/share/compiler/compiler_globals_pd.hpp | 4 ++-- src/hotspot/share/runtime/arguments.cpp | 2 +- src/hotspot/share/runtime/globals.hpp | 4 ++-- .../compiler/codecache/stress/RandomAllocationTest.java | 2 +- .../codecache/stress/ReturnBlobToWrongHeapTest.java | 2 +- .../jtreg/compiler/whitebox/AllocationCodeBlobTest.java | 2 +- test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java | 2 +- 20 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index c2d1405b005df..ffbdd18cc47c8 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -43,8 +43,8 @@ define_pd_global(intx, CompileThreshold, 1500 ); define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(intx, NewSizeThreadIncrease, 4*K ); -define_pd_global(intx, InitialCodeCacheSize, 160*K); -define_pd_global(intx, ReservedCodeCacheSize, 32*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index 6c5c469ca2736..a4f84587a96f7 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -51,7 +51,7 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); // InitialCodeCacheSize derived from specjbb2000 run. -define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(intx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags @@ -69,7 +69,7 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true); define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8); define_pd_global(bool, IdealizeClearArrayNode, true); -define_pd_global(intx, ReservedCodeCacheSize, 48*M); +define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index 23604b5c08392..0098e9cddccd5 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -44,7 +44,7 @@ define_pd_global(intx, CompileThreshold, 1000); define_pd_global(intx, OnStackReplacePercentage, 1400); define_pd_global(bool, ProfileInterpreter, false); -define_pd_global(uintx, ReservedCodeCacheSize, 32*M); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); @@ -54,7 +54,7 @@ define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); define_pd_global(uint64_t, MaxRAM, 1ULL*G); -define_pd_global(uintx, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); #endif // !COMPILER2 define_pd_global(bool, UseTypeProfile, false); diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index 3e83ac4f3a437..b76c5b7bdcb41 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -78,8 +78,8 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, OptoScheduling, false); define_pd_global(bool, IdealizeClearArrayNode, true); -define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(uintx, ReservedCodeCacheSize, 48*M); +define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 311405dbc2b1d..baf81f3feed23 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -43,8 +43,8 @@ define_pd_global(intx, CompileThreshold, 1500 ); define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(intx, NewSizeThreadIncrease, 4*K ); -define_pd_global(intx, InitialCodeCacheSize, 160*K); -define_pd_global(intx, ReservedCodeCacheSize, 32*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index 79bdc4917c9ed..8daedd7e938de 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -51,7 +51,7 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); // InitialCodeCacheSize derived from specjbb2000 run. -define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(intx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags @@ -69,7 +69,7 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true); define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, IdealizeClearArrayNode, true); -define_pd_global(intx, ReservedCodeCacheSize, 48*M); +define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 130a53ad0843f..1a7f51496bf7e 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -44,7 +44,7 @@ define_pd_global(intx, CompileThreshold, 1000); define_pd_global(intx, OnStackReplacePercentage, 1400); define_pd_global(bool, ProfileInterpreter, false); -define_pd_global(uintx, ReservedCodeCacheSize, 32*M); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M); define_pd_global(uintx, ProfiledCodeHeapSize, 14*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); @@ -54,7 +54,7 @@ define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); define_pd_global(uint64_t, MaxRAM, 1ULL*G); -define_pd_global(uintx, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); #endif // !COMPILER2 define_pd_global(bool, UseTypeProfile, false); diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index b8b45cbc80e09..53f1ea6969132 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -67,8 +67,8 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, IdealizeClearArrayNode, false); // InitialCodeCacheSize derived from specjbb2000 run. -define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(uintx, ReservedCodeCacheSize, 48*M); +define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index b2085a0b4b399..27ae018de06fc 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -42,8 +42,8 @@ define_pd_global(intx, CompileThreshold, 1500 ); define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(size_t, NewSizeThreadIncrease, 4*K ); -define_pd_global(uintx, InitialCodeCacheSize, 160*K); -define_pd_global(uintx, ReservedCodeCacheSize, 32*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M ); define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index 64dda0a8947e4..56f34f50f0c48 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -50,7 +50,7 @@ define_pd_global(intx, InteriorEntryAlignment, 16); define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, LoopUnrollLimit, 60); // InitialCodeCacheSize derived from specjbb2000 run. -define_pd_global(uintx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(uintx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags @@ -60,7 +60,7 @@ define_pd_global(intx, InteriorEntryAlignment, 4); define_pd_global(size_t, NewSizeThreadIncrease, 4*K); define_pd_global(intx, LoopUnrollLimit, 50); // Design center runs on 1.3.1 // InitialCodeCacheSize derived from specjbb2000 run. -define_pd_global(uintx, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(uintx, CodeCacheExpansionSize, 32*K); // Ergonomics related flags @@ -79,7 +79,7 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true); define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, IdealizeClearArrayNode, true); -define_pd_global(uintx, ReservedCodeCacheSize, 48*M); +define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp index 05b38ecba6e21..9d505df8b7295 100644 --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -433,7 +433,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, CodeBlobType code_b add_heap(heap); // Reserve Space - size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size()); + size_t size_initial = MIN2(InitialCodeCacheSize, rs.size()); size_initial = align_up(size_initial, rs.page_size()); if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) { vm_exit_during_initialization(err_msg("Could not reserve enough space in %s (%zuK)", diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index bab437eaade14..5ca719d030957 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -572,10 +572,10 @@ void CompilationPolicy::initialize() { c2_size = C2Compiler::initial_code_buffer_size(); #endif size_t buffer_size = c1_only ? c1_size : (c1_size/3 + 2*c2_size/3); - int max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / (int)buffer_size; - if (count > max_count) { + size_t max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / buffer_size; + if ((size_t)count > max_count) { // Lower the compiler count such that all buffers fit into the code cache - count = MAX2(max_count, min_count); + count = MAX2((int)max_count, min_count); } FLAG_SET_ERGO(CICompilerCount, count); } diff --git a/src/hotspot/share/compiler/compilerDefinitions.cpp b/src/hotspot/share/compiler/compilerDefinitions.cpp index f82e96be6ae7e..2a4fdc9d456ff 100644 --- a/src/hotspot/share/compiler/compilerDefinitions.cpp +++ b/src/hotspot/share/compiler/compilerDefinitions.cpp @@ -313,7 +313,7 @@ void CompilerConfig::set_compilation_policy_flags() { // Increase the code cache size - tiered compiles a lot more. if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { FLAG_SET_ERGO(ReservedCodeCacheSize, - MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)ReservedCodeCacheSize * 5)); + MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5)); } // Enable SegmentedCodeCache if tiered compilation is enabled, ReservedCodeCacheSize >= 240M // and the code cache contains at least 8 pages (segmentation disables advantage of huge pages). @@ -478,18 +478,18 @@ bool CompilerConfig::check_args_consistency(bool status) { uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3); if (ReservedCodeCacheSize < InitialCodeCacheSize) { jio_fprintf(defaultStream::error_stream(), - "Invalid ReservedCodeCacheSize: %dK. Must be at least InitialCodeCacheSize=%dK.\n", + "Invalid ReservedCodeCacheSize: %zuK. Must be at least InitialCodeCacheSize=%zuK.\n", ReservedCodeCacheSize/K, InitialCodeCacheSize/K); status = false; } else if (ReservedCodeCacheSize < min_code_cache_size) { jio_fprintf(defaultStream::error_stream(), - "Invalid ReservedCodeCacheSize=%dK. Must be at least %uK.\n", ReservedCodeCacheSize/K, + "Invalid ReservedCodeCacheSize=%zuK. Must be at least %uK.\n", ReservedCodeCacheSize/K, min_code_cache_size/K); status = false; } else if (ReservedCodeCacheSize > CODE_CACHE_SIZE_LIMIT) { // Code cache size larger than CODE_CACHE_SIZE_LIMIT is not supported. jio_fprintf(defaultStream::error_stream(), - "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M, + "Invalid ReservedCodeCacheSize=%zuM. Must be at most %zuM.\n", ReservedCodeCacheSize/M, CODE_CACHE_SIZE_LIMIT/M); status = false; } else if (NonNMethodCodeHeapSize < min_code_cache_size) { diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 1251329a1b610..0ce05e5d71be7 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -61,8 +61,8 @@ define_pd_global(intx, OnStackReplacePercentage, 0); define_pd_global(size_t, NewSizeThreadIncrease, 4*K); define_pd_global(bool, InlineClassNatives, true); define_pd_global(bool, InlineUnsafeOps, true); -define_pd_global(uintx, InitialCodeCacheSize, 160*K); -define_pd_global(uintx, ReservedCodeCacheSize, 32*M); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, ReservedCodeCacheSize, 32*M); define_pd_global(uintx, NonProfiledCodeHeapSize, 0); define_pd_global(uintx, ProfiledCodeHeapSize, 0); define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M); diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index a49116fd91d57..5b56c81a32dbc 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -2448,7 +2448,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, JVMFlagOrigin "Invalid maximum code cache size: %s.\n", option->optionString); return JNI_EINVAL; } - if (FLAG_SET_CMDLINE(ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize) != JVMFlag::SUCCESS) { + if (FLAG_SET_CMDLINE(ReservedCodeCacheSize, (size_t)long_ReservedCodeCacheSize) != JVMFlag::SUCCESS) { return JNI_EINVAL; } // -green diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index a85a398cf0ae5..868247dbbae52 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1516,7 +1516,7 @@ const int ObjectAlignmentInBytes = 8; range(1, 128) \ constraint(OptoLoopAlignmentConstraintFunc, AfterErgo) \ \ - product_pd(uintx, InitialCodeCacheSize, \ + product_pd(size_t, InitialCodeCacheSize, \ "Initial code cache size (in bytes)") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ @@ -1527,7 +1527,7 @@ const int ObjectAlignmentInBytes = 8; product(bool, SegmentedCodeCache, false, \ "Use a segmented code cache") \ \ - product_pd(uintx, ReservedCodeCacheSize, \ + product_pd(size_t, ReservedCodeCacheSize, \ "Reserved code cache size (in bytes) - maximum code cache size") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ diff --git a/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java b/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java index 72e605397d0e7..d86daf8763cd2 100644 --- a/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java +++ b/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java @@ -53,7 +53,7 @@ public class RandomAllocationTest implements Runnable { private static final long CODE_CACHE_SIZE - = Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize"); + = Helper.WHITE_BOX.getSizeTVMFlag("ReservedCodeCacheSize"); private static final int MAX_BLOB_SIZE = (int) (CODE_CACHE_SIZE >> 7); private static final BlobType[] BLOB_TYPES = BlobType.getAvailable().toArray(new BlobType[0]); diff --git a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java index c66c2a22f1456..1e743481e07d6 100644 --- a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java +++ b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java @@ -48,7 +48,7 @@ import java.util.ArrayList; public class ReturnBlobToWrongHeapTest { - private static final long largeBlobSize = Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize") >> 6; + private static final long largeBlobSize = Helper.WHITE_BOX.getSizeTVMFlag("ReservedCodeCacheSize") >> 6; private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getUintxVMFlag("CodeCacheMinBlockLength"); private static final BlobType[] BLOB_TYPES = BlobType.getAvailable().toArray(new BlobType[0]); diff --git a/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java b/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java index 29168a1e7e87e..301486e3d8db7 100644 --- a/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java @@ -54,7 +54,7 @@ public class AllocationCodeBlobTest { private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); private static final long CODE_CACHE_SIZE - = WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize"); + = WHITE_BOX.getSizeTVMFlag("ReservedCodeCacheSize"); private static final int SIZE = 1; public static void main(String[] args) { diff --git a/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java b/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java index defc9cba1be0b..1eb402f08ae4e 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java @@ -50,7 +50,7 @@ public class TestCodeCacheConfig { private final static String EVENT_NAME = EventNames.CodeCacheConfiguration; - private static final long CodeCacheExpectedSize = WhiteBox.getWhiteBox().getUintxVMFlag("ReservedCodeCacheSize"); + private static final long CodeCacheExpectedSize = WhiteBox.getWhiteBox().getSizeTVMFlag("ReservedCodeCacheSize"); public static void main(String[] args) throws Exception { Recording recording = new Recording(); From 6d982a60c220a57cae5cd260c303e614ceb7b40a Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 06:26:29 +0000 Subject: [PATCH 03/14] CodeCacheMinimumUseSpace --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 2 +- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 2 +- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 2 +- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 2 +- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 2 +- src/hotspot/cpu/s390/c1_globals_s390.hpp | 2 +- src/hotspot/cpu/s390/c2_globals_s390.hpp | 2 +- src/hotspot/cpu/x86/c1_globals_x86.hpp | 2 +- src/hotspot/cpu/x86/c2_globals_x86.hpp | 2 +- src/hotspot/share/compiler/compilerDefinitions.cpp | 6 +++--- src/hotspot/share/compiler/compiler_globals_pd.hpp | 2 +- src/hotspot/share/runtime/globals.hpp | 4 ++-- .../jtreg/compiler/codecache/CheckSegmentedCodeCache.java | 2 +- test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index ffbdd18cc47c8..c4af943abd7fe 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -51,7 +51,7 @@ define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t,MaxRAM, 1ULL*G); define_pd_global(bool, CICompileOSR, true ); diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index a4f84587a96f7..9f6f87334292b 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -74,7 +74,7 @@ define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags define_pd_global(bool, NeverActAsServerClassMachine, false); diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index 0098e9cddccd5..1924a7ea97c12 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -50,7 +50,7 @@ define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); define_pd_global(uint64_t, MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index b76c5b7bdcb41..834d99102b823 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -88,7 +88,7 @@ define_pd_global(uintx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); define_pd_global(uintx, CodeCacheMinBlockLength, 6); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, true); diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index baf81f3feed23..81564019d91c7 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -51,7 +51,7 @@ define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t, MaxRAM, 1ULL*G); define_pd_global(bool, CICompileOSR, true ); diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index 8daedd7e938de..ae8d8bb012020 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -74,7 +74,7 @@ define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); define_pd_global(intx, ProfiledCodeHeapSize, 22*M); define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags define_pd_global(bool, NeverActAsServerClassMachine, false); diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 1a7f51496bf7e..bb3ae8a91f1ff 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -50,7 +50,7 @@ define_pd_global(uintx, ProfiledCodeHeapSize, 14*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); define_pd_global(uint64_t, MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index 53f1ea6969132..8e99ca5c4efa1 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -77,7 +77,7 @@ define_pd_global(uintx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); define_pd_global(uintx, CodeCacheMinBlockLength, 4); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on z/Architecture. diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index 27ae018de06fc..38d8fc1d44b82 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -50,7 +50,7 @@ define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(uintx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1 ); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t, MaxRAM, 1ULL*G); define_pd_global(bool, CICompileOSR, true ); diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index 56f34f50f0c48..7115a3a8bfc61 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -84,7 +84,7 @@ define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on x86. diff --git a/src/hotspot/share/compiler/compilerDefinitions.cpp b/src/hotspot/share/compiler/compilerDefinitions.cpp index 2a4fdc9d456ff..fa894559fef7e 100644 --- a/src/hotspot/share/compiler/compilerDefinitions.cpp +++ b/src/hotspot/share/compiler/compilerDefinitions.cpp @@ -475,7 +475,7 @@ void CompilerConfig::set_jvmci_specific_flags() { bool CompilerConfig::check_args_consistency(bool status) { // Check lower bounds of the code cache // Template Interpreter code is approximately 3X larger in debug builds. - uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3); + size_t min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3); if (ReservedCodeCacheSize < InitialCodeCacheSize) { jio_fprintf(defaultStream::error_stream(), "Invalid ReservedCodeCacheSize: %zuK. Must be at least InitialCodeCacheSize=%zuK.\n", @@ -483,7 +483,7 @@ bool CompilerConfig::check_args_consistency(bool status) { status = false; } else if (ReservedCodeCacheSize < min_code_cache_size) { jio_fprintf(defaultStream::error_stream(), - "Invalid ReservedCodeCacheSize=%zuK. Must be at least %uK.\n", ReservedCodeCacheSize/K, + "Invalid ReservedCodeCacheSize=%zuK. Must be at least %zuK.\n", ReservedCodeCacheSize/K, min_code_cache_size/K); status = false; } else if (ReservedCodeCacheSize > CODE_CACHE_SIZE_LIMIT) { @@ -494,7 +494,7 @@ bool CompilerConfig::check_args_consistency(bool status) { status = false; } else if (NonNMethodCodeHeapSize < min_code_cache_size) { jio_fprintf(defaultStream::error_stream(), - "Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K, + "Invalid NonNMethodCodeHeapSize=%zuK. Must be at least %zuK.\n", NonNMethodCodeHeapSize/K, min_code_cache_size/K); status = false; } diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 0ce05e5d71be7..74b12fec85be4 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -69,7 +69,7 @@ define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 200*K); #ifndef ZERO define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(uint64_t,MaxRAM, 1ULL*G); diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 868247dbbae52..601cf5dceebde 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1520,9 +1520,9 @@ const int ObjectAlignmentInBytes = 8; "Initial code cache size (in bytes)") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ - develop_pd(uintx, CodeCacheMinimumUseSpace, \ + develop_pd(size_t, CodeCacheMinimumUseSpace, \ "Minimum code cache size (in bytes) required to start VM.") \ - range(0, max_uintx) \ + range(0, SIZE_MAX) \ \ product(bool, SegmentedCodeCache, false, \ "Use a segmented code cache") \ diff --git a/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java b/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java index 139ea6d76a275..06b51b1641d19 100644 --- a/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java +++ b/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java @@ -188,7 +188,7 @@ public static void main(String[] args) throws Exception { failsWith(pb, "Invalid code heap sizes"); // Fails if not enough space for VM internal code - long minUseSpace = WHITE_BOX.getUintxVMFlag("CodeCacheMinimumUseSpace"); + long minUseSpace = WHITE_BOX.getSizeTVMFlag("CodeCacheMinimumUseSpace"); // minimum size: CodeCacheMinimumUseSpace DEBUG_ONLY(* 3) long minSize = (Platform.isDebugBuild() ? 3 : 1) * minUseSpace; pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache", diff --git a/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java b/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java index 0996350adff52..514f830275a2e 100644 --- a/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java +++ b/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java @@ -37,7 +37,7 @@ public class UintxTest { private static final String FLAG_NAME = "VerifyGCStartAt"; - private static final String FLAG_DEBUG_NAME = "CodeCacheMinimumUseSpace"; + private static final String FLAG_DEBUG_NAME = "StopInterpreterAt"; private static final Long[] TESTS = {0L, 100L, (long) Integer.MAX_VALUE, (1L << 32L) - 1L, 1L << 32L}; private static final Long[] EXPECTED_64 = TESTS; From 81914e370d6723adfa3cfd46d58093e35200aaf6 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 07:15:58 +0000 Subject: [PATCH 04/14] various CodeHeapSize options --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 6 +++--- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 6 +++--- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 6 +++--- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 6 +++--- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 6 +++--- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 6 +++--- src/hotspot/cpu/s390/c1_globals_s390.hpp | 6 +++--- src/hotspot/cpu/s390/c2_globals_s390.hpp | 6 +++--- src/hotspot/cpu/x86/c1_globals_x86.hpp | 6 +++--- src/hotspot/cpu/x86/c2_globals_x86.hpp | 6 +++--- src/hotspot/share/compiler/compiler_globals_pd.hpp | 6 +++--- src/hotspot/share/runtime/globals.hpp | 10 +++++----- 12 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index c4af943abd7fe..ae4a7ad097669 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -45,9 +45,9 @@ define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(intx, NewSizeThreadIncrease, 4*K ); define_pd_global(size_t, InitialCodeCacheSize, 160*K); define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); -define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); +define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index 9f6f87334292b..48d3eaadc9f71 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -70,9 +70,9 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8); define_pd_global(bool, IdealizeClearArrayNode, true); define_pd_global(size_t, ReservedCodeCacheSize, 48*M); -define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(intx, ProfiledCodeHeapSize, 22*M); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index 1924a7ea97c12..986b28c54115e 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -45,9 +45,9 @@ define_pd_global(intx, CompileThreshold, 1000); define_pd_global(intx, OnStackReplacePercentage, 1400); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, ReservedCodeCacheSize, 32*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); +define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index 834d99102b823..45389a0caaa46 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -80,9 +80,9 @@ define_pd_global(bool, IdealizeClearArrayNode, true); define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(size_t, ReservedCodeCacheSize, 48*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 81564019d91c7..0bd2ce3c3b642 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -45,9 +45,9 @@ define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(intx, NewSizeThreadIncrease, 4*K ); define_pd_global(size_t, InitialCodeCacheSize, 160*K); define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); -define_pd_global(intx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); +define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(intx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index ae8d8bb012020..f185cb03ed9e4 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -70,9 +70,9 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, IdealizeClearArrayNode, true); define_pd_global(size_t, ReservedCodeCacheSize, 48*M); -define_pd_global(intx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(intx, ProfiledCodeHeapSize, 22*M); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index bb3ae8a91f1ff..488e771ae7fd7 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -45,9 +45,9 @@ define_pd_global(intx, CompileThreshold, 1000); define_pd_global(intx, OnStackReplacePercentage, 1400); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, ReservedCodeCacheSize, 32*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 14*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); +define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 14*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index 8e99ca5c4efa1..af08136b0006a 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -69,9 +69,9 @@ define_pd_global(bool, IdealizeClearArrayNode, false); // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(size_t, ReservedCodeCacheSize, 48*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); +define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M); define_pd_global(uintx, CodeCacheExpansionSize, 64*K); // Ergonomics related flags diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index 38d8fc1d44b82..689a743402b6a 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -44,9 +44,9 @@ define_pd_global(intx, OnStackReplacePercentage, 933 ); define_pd_global(size_t, NewSizeThreadIncrease, 4*K ); define_pd_global(size_t, InitialCodeCacheSize, 160*K); define_pd_global(size_t, ReservedCodeCacheSize, 32*M ); -define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); +define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(uintx, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1 ); diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index 7115a3a8bfc61..1c4977f1f9c63 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -80,9 +80,9 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16); define_pd_global(bool, IdealizeClearArrayNode, true); define_pd_global(size_t, ReservedCodeCacheSize, 48*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); +define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); +define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(uintx, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 74b12fec85be4..26a1ed7cb2d54 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -63,9 +63,9 @@ define_pd_global(bool, InlineClassNatives, true); define_pd_global(bool, InlineUnsafeOps, true); define_pd_global(size_t, InitialCodeCacheSize, 160*K); define_pd_global(size_t, ReservedCodeCacheSize, 32*M); -define_pd_global(uintx, NonProfiledCodeHeapSize, 0); -define_pd_global(uintx, ProfiledCodeHeapSize, 0); -define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M); +define_pd_global(size_t, NonProfiledCodeHeapSize, 0); +define_pd_global(size_t, ProfiledCodeHeapSize, 0); +define_pd_global(size_t, NonNMethodCodeHeapSize, 32*M); define_pd_global(uintx, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 601cf5dceebde..0ec576533e13a 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1531,15 +1531,15 @@ const int ObjectAlignmentInBytes = 8; "Reserved code cache size (in bytes) - maximum code cache size") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ - product_pd(uintx, NonProfiledCodeHeapSize, \ + product_pd(size_t, NonProfiledCodeHeapSize, \ "Size of code heap with non-profiled methods (in bytes)") \ - range(0, max_uintx) \ + range(0, SIZE_MAX) \ \ - product_pd(uintx, ProfiledCodeHeapSize, \ + product_pd(size_t, ProfiledCodeHeapSize, \ "Size of code heap with profiled methods (in bytes)") \ - range(0, max_uintx) \ + range(0, SIZE_MAX) \ \ - product_pd(uintx, NonNMethodCodeHeapSize, \ + product_pd(size_t, NonNMethodCodeHeapSize, \ "Size of code heap with non-nmethods (in bytes)") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ From bc99f0bf8096577bb01fdbcccf4855b2ecc7e13a Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 07:34:48 +0000 Subject: [PATCH 05/14] CodeCacheExpansionSize --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 2 +- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 2 +- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 2 +- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 2 +- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 2 +- src/hotspot/cpu/s390/c1_globals_s390.hpp | 2 +- src/hotspot/cpu/s390/c2_globals_s390.hpp | 2 +- src/hotspot/cpu/x86/c1_globals_x86.hpp | 2 +- src/hotspot/cpu/x86/c2_globals_x86.hpp | 4 ++-- src/hotspot/share/compiler/compiler_globals_pd.hpp | 2 +- src/hotspot/share/runtime/globals.hpp | 4 ++-- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index ae4a7ad097669..5219ed865f9ff 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -49,7 +49,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); -define_pd_global(intx, CodeCacheExpansionSize, 32*K ); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index 48d3eaadc9f71..4a984ebdc8fc6 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -52,7 +52,7 @@ define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(intx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t,MaxRAM, 128ULL*G); diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index 986b28c54115e..ba79d013dfcc1 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -48,7 +48,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 32*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index 45389a0caaa46..56f923e95a359 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -83,7 +83,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 0bd2ce3c3b642..5e5d7eef6c3df 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -49,7 +49,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); -define_pd_global(intx, CodeCacheExpansionSize, 32*K ); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index f185cb03ed9e4..a3ceaa047a179 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -52,7 +52,7 @@ define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopPercentProfileLimit, 10); // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(intx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t,MaxRAM, 128ULL*G); diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 488e771ae7fd7..65f55a49d50d2 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -48,7 +48,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 32*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M); -define_pd_global(uintx, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index af08136b0006a..b063bddb5b97b 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -72,7 +72,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M); -define_pd_global(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index 689a743402b6a..2465ed488810d 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -48,7 +48,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); -define_pd_global(uintx, CodeCacheExpansionSize, 32*K ); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); define_pd_global(uintx, CodeCacheMinBlockLength, 1 ); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index 1c4977f1f9c63..fe73b3cde9605 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -51,7 +51,7 @@ define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, LoopUnrollLimit, 60); // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); @@ -61,7 +61,7 @@ define_pd_global(size_t, NewSizeThreadIncrease, 4*K); define_pd_global(intx, LoopUnrollLimit, 50); // Design center runs on 1.3.1 // InitialCodeCacheSize derived from specjbb2000 run. define_pd_global(size_t, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize -define_pd_global(uintx, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 4ULL*G); diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 26a1ed7cb2d54..50975f14f44b8 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -67,7 +67,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 0); define_pd_global(size_t, ProfiledCodeHeapSize, 0); define_pd_global(size_t, NonNMethodCodeHeapSize, 32*M); -define_pd_global(uintx, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); define_pd_global(uintx, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 200*K); #ifndef ZERO diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 0ec576533e13a..470d250612e09 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1543,9 +1543,9 @@ const int ObjectAlignmentInBytes = 8; "Size of code heap with non-nmethods (in bytes)") \ constraint(VMPageSizeConstraintFunc, AtParse) \ \ - product_pd(uintx, CodeCacheExpansionSize, \ + product_pd(size_t, CodeCacheExpansionSize, \ "Code cache expansion size (in bytes)") \ - range(32*K, max_uintx) \ + range(32*K, SIZE_MAX) \ \ product_pd(uintx, CodeCacheMinBlockLength, DIAGNOSTIC, \ "Minimum number of segments in a code cache block") \ From 0f8b9e3fdb2cd5076112fe7789fa1c966d56d03c Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 08:19:34 +0000 Subject: [PATCH 06/14] CodeCacheMinBlockLength --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 2 +- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 2 +- src/hotspot/cpu/arm/c1_globals_arm.hpp | 2 +- src/hotspot/cpu/arm/c2_globals_arm.hpp | 2 +- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 2 +- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 2 +- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 2 +- src/hotspot/cpu/s390/c1_globals_s390.hpp | 2 +- src/hotspot/cpu/s390/c2_globals_s390.hpp | 2 +- src/hotspot/cpu/x86/c1_globals_x86.hpp | 2 +- src/hotspot/cpu/x86/c2_globals_x86.hpp | 2 +- src/hotspot/share/compiler/compiler_globals_pd.hpp | 2 +- src/hotspot/share/memory/heap.cpp | 2 +- src/hotspot/share/runtime/globals.hpp | 2 +- test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java | 2 +- .../compiler/codecache/stress/ReturnBlobToWrongHeapTest.java | 2 +- test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index 5219ed865f9ff..20b0eef9e7f45 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -50,7 +50,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t,MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index 4a984ebdc8fc6..ecec8697b8129 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -73,7 +73,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags diff --git a/src/hotspot/cpu/arm/c1_globals_arm.hpp b/src/hotspot/cpu/arm/c1_globals_arm.hpp index d22d39d6369cf..c113340c94493 100644 --- a/src/hotspot/cpu/arm/c1_globals_arm.hpp +++ b/src/hotspot/cpu/arm/c1_globals_arm.hpp @@ -51,7 +51,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(uint64_t, MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/arm/c2_globals_arm.hpp b/src/hotspot/cpu/arm/c2_globals_arm.hpp index abd3ef6aef5de..bb18e4ab48903 100644 --- a/src/hotspot/cpu/arm/c2_globals_arm.hpp +++ b/src/hotspot/cpu/arm/c2_globals_arm.hpp @@ -94,7 +94,7 @@ define_pd_global(size_t, CodeCacheExpansionSize, 32*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 4ULL*G); #endif -define_pd_global(uintx, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index ba79d013dfcc1..c1a06d00d6d1e 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -49,7 +49,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M ); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(size_t, CodeCacheExpansionSize, 32*K); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index 56f923e95a359..d2a0df9e25739 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -87,7 +87,7 @@ define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); -define_pd_global(uintx, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, true); diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 5e5d7eef6c3df..49543435b00d6 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -50,7 +50,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t, MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index a3ceaa047a179..707d2b7615c92 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -73,7 +73,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 65f55a49d50d2..46b5a545c6fe7 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -49,7 +49,7 @@ define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M); define_pd_global(size_t, ProfiledCodeHeapSize, 14*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M); define_pd_global(size_t, CodeCacheExpansionSize, 32*K); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true); define_pd_global(size_t, NewSizeThreadIncrease, 16*K); diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index b063bddb5b97b..a9961973c37af 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -76,7 +76,7 @@ define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); -define_pd_global(uintx, CodeCacheMinBlockLength, 4); +define_pd_global(size_t, CodeCacheMinBlockLength, 4); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on z/Architecture. diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index 2465ed488810d..f4a44e8e52acc 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -49,7 +49,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 14*M ); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); define_pd_global(bool, ProfileInterpreter, false); define_pd_global(size_t, CodeCacheExpansionSize, 32*K ); -define_pd_global(uintx, CodeCacheMinBlockLength, 1 ); +define_pd_global(size_t, CodeCacheMinBlockLength, 1 ); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uint64_t, MaxRAM, 1ULL*G); diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index fe73b3cde9605..840801d76c5cc 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -83,7 +83,7 @@ define_pd_global(size_t, ReservedCodeCacheSize, 48*M); define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M); define_pd_global(size_t, ProfiledCodeHeapSize, 22*M); define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinBlockLength, 6); define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on x86. diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 50975f14f44b8..0794b6af8a83d 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -68,7 +68,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 0); define_pd_global(size_t, NonNMethodCodeHeapSize, 32*M); define_pd_global(size_t, CodeCacheExpansionSize, 32*K); -define_pd_global(uintx, CodeCacheMinBlockLength, 1); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); define_pd_global(size_t, CodeCacheMinimumUseSpace, 200*K); #ifndef ZERO define_pd_global(bool, NeverActAsServerClassMachine, true); diff --git a/src/hotspot/share/memory/heap.cpp b/src/hotspot/share/memory/heap.cpp index b111c61f15aa5..a1333ed13e9b4 100644 --- a/src/hotspot/share/memory/heap.cpp +++ b/src/hotspot/share/memory/heap.cpp @@ -280,7 +280,7 @@ void* CodeHeap::allocate(size_t instance_size) { } // Ensure minimum size for allocation to the heap. - number_of_segments = MAX2((int)CodeCacheMinBlockLength, (int)number_of_segments); + number_of_segments = MAX2(CodeCacheMinBlockLength, number_of_segments); if (_next_segment + number_of_segments <= _number_of_committed_segments) { mark_segmap_as_used(_next_segment, _next_segment + number_of_segments, false); diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 470d250612e09..78dde63dabb20 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1547,7 +1547,7 @@ const int ObjectAlignmentInBytes = 8; "Code cache expansion size (in bytes)") \ range(32*K, SIZE_MAX) \ \ - product_pd(uintx, CodeCacheMinBlockLength, DIAGNOSTIC, \ + product_pd(size_t, CodeCacheMinBlockLength, DIAGNOSTIC, \ "Minimum number of segments in a code cache block") \ range(1, 100) \ \ diff --git a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java index 9c863b874fadf..01280b3423747 100644 --- a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java +++ b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java @@ -43,7 +43,7 @@ public final class CodeCacheUtils { public static final long SEGMENT_SIZE = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheSegmentSize"); public static final long MIN_BLOCK_LENGTH - = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheMinBlockLength"); + = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheMinBlockLength"); public static final long MIN_ALLOCATION = SEGMENT_SIZE * MIN_BLOCK_LENGTH; private CodeCacheUtils() { diff --git a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java index 1e743481e07d6..c0de0458632ab 100644 --- a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java +++ b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java @@ -49,7 +49,7 @@ public class ReturnBlobToWrongHeapTest { private static final long largeBlobSize = Helper.WHITE_BOX.getSizeTVMFlag("ReservedCodeCacheSize") >> 6; - private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getUintxVMFlag("CodeCacheMinBlockLength"); + private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getSizeTVMFlag("CodeCacheMinBlockLength"); private static final BlobType[] BLOB_TYPES = BlobType.getAvailable().toArray(new BlobType[0]); // Allocate blob in first code heap (the code heap with index 0). diff --git a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java index 37c52d24cd866..a4fc50b764d4f 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java @@ -66,7 +66,7 @@ public class TestCodeSweeper { private static final String pathFull = EventNames.CodeCacheFull; private static final String pathFailure = EventNames.CompilationFailure; public static final long SEGMENT_SIZE = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheSegmentSize"); - public static final long MIN_BLOCK_LENGTH = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheMinBlockLength"); + public static final long MIN_BLOCK_LENGTH = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheMinBlockLength"); public static final long MIN_ALLOCATION = SEGMENT_SIZE * MIN_BLOCK_LENGTH; private static final double CACHE_USAGE_COEF = 0.95d; From 0614971fdc014af501b0535b66be70a09292d09b Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 08:32:36 +0000 Subject: [PATCH 07/14] VMPageSizeConstraintFunc --- src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp | 4 ++-- src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp index efffa8ac753e6..e09b426a2e676 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp @@ -111,8 +111,8 @@ JVMFlag::Error PerfDataSamplingIntervalFunc(int value, bool verbose) { } } -JVMFlag::Error VMPageSizeConstraintFunc(uintx value, bool verbose) { - uintx min = (uintx)os::vm_page_size(); +JVMFlag::Error VMPageSizeConstraintFunc(size_t value, bool verbose) { + size_t min = os::vm_page_size(); if (value < min) { JVMFlag::printError(verbose, "%s %s=%zu is outside the allowed range [ %zu" diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp index 3040dafabc52d..b6317de321b75 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp @@ -40,7 +40,7 @@ f(int, ObjectAlignmentInBytesConstraintFunc) \ f(int, ContendedPaddingWidthConstraintFunc) \ f(int, PerfDataSamplingIntervalFunc) \ - f(uintx, VMPageSizeConstraintFunc) \ + f(size_t, VMPageSizeConstraintFunc) \ f(size_t, NUMAInterleaveGranularityConstraintFunc) RUNTIME_CONSTRAINTS(DECLARE_CONSTRAINT) From 9b96ebd1608497aca01240743ede30dbd8f4573e Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 11 Jun 2025 16:44:45 +0000 Subject: [PATCH 08/14] fix whitebox access to code cache size configs --- test/lib/jdk/test/whitebox/code/BlobType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/jdk/test/whitebox/code/BlobType.java b/test/lib/jdk/test/whitebox/code/BlobType.java index 24ce9d96a41a8..839c325b8bc3c 100644 --- a/test/lib/jdk/test/whitebox/code/BlobType.java +++ b/test/lib/jdk/test/whitebox/code/BlobType.java @@ -103,6 +103,6 @@ public static EnumSet getAvailable() { } public long getSize() { - return WhiteBox.getWhiteBox().getUintxVMFlag(sizeOptionName); + return WhiteBox.getWhiteBox().getSizeTVMFlag(sizeOptionName); } } From 566e8941ec2c5ee88c3d541229dd46fe79e81a7c Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 13 Jun 2025 18:37:06 +0000 Subject: [PATCH 09/14] remove leftover include --- src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp index e5e13b126a221..b6d919fdfe937 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp @@ -57,8 +57,6 @@ #include "gc/shenandoah/shenandoahHeapRegion.hpp" #endif -#include - int CompilerToVM::Data::oopDesc_klass_offset_in_bytes; int CompilerToVM::Data::arrayOopDesc_length_offset_in_bytes; From bd1923f6845b5e31d78728829884d13b67ca651c Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Fri, 13 Jun 2025 18:37:50 +0000 Subject: [PATCH 10/14] update copyrights --- src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp | 2 +- src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp | 2 +- src/hotspot/cpu/arm/c1_globals_arm.hpp | 2 +- src/hotspot/cpu/arm/c2_globals_arm.hpp | 2 +- src/hotspot/cpu/arm/globals_arm.hpp | 2 +- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 2 +- src/hotspot/cpu/ppc/globals_ppc.hpp | 2 +- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 2 +- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 2 +- src/hotspot/cpu/riscv/globals_riscv.hpp | 2 +- src/hotspot/cpu/s390/c1_globals_s390.hpp | 2 +- src/hotspot/cpu/s390/c2_globals_s390.hpp | 2 +- src/hotspot/cpu/s390/globals_s390.hpp | 2 +- src/hotspot/cpu/x86/c1_globals_x86.hpp | 2 +- src/hotspot/cpu/x86/c2_globals_x86.hpp | 2 +- src/hotspot/cpu/x86/globals_x86.hpp | 2 +- src/hotspot/cpu/zero/globals_zero.hpp | 2 +- src/hotspot/share/compiler/compiler_globals_pd.hpp | 2 +- src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp | 2 +- src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp | 2 +- test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java | 2 +- .../jtreg/compiler/codecache/stress/RandomAllocationTest.java | 2 +- .../compiler/codecache/stress/ReturnBlobToWrongHeapTest.java | 2 +- .../hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java | 2 +- test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java | 2 +- test/lib/jdk/test/whitebox/code/BlobType.java | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index 20b0eef9e7f45..a8a2fa8b2eedb 100644 --- a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp index ecec8697b8129..94a80dec3eae8 100644 --- a/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/c2_globals_aarch64.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/arm/c1_globals_arm.hpp b/src/hotspot/cpu/arm/c1_globals_arm.hpp index c113340c94493..396f206975b50 100644 --- a/src/hotspot/cpu/arm/c1_globals_arm.hpp +++ b/src/hotspot/cpu/arm/c1_globals_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/arm/c2_globals_arm.hpp b/src/hotspot/cpu/arm/c2_globals_arm.hpp index bb18e4ab48903..d739e67360a82 100644 --- a/src/hotspot/cpu/arm/c2_globals_arm.hpp +++ b/src/hotspot/cpu/arm/c2_globals_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/arm/globals_arm.hpp b/src/hotspot/cpu/arm/globals_arm.hpp index 0b6214dada5d4..363a9a2c25c26 100644 --- a/src/hotspot/cpu/arm/globals_arm.hpp +++ b/src/hotspot/cpu/arm/globals_arm.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index c1a06d00d6d1e..ab01428725077 100644 --- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp index d2a0df9e25739..706255d035aec 100644 --- a/src/hotspot/cpu/ppc/c2_globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/c2_globals_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2019 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index 794be9bbcb93b..65334bf038975 100644 --- a/src/hotspot/cpu/ppc/globals_ppc.hpp +++ b/src/hotspot/cpu/ppc/globals_ppc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2024 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 49543435b00d6..d64b3b66fa221 100644 --- a/src/hotspot/cpu/riscv/c1_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp index 707d2b7615c92..372865fc29194 100644 --- a/src/hotspot/cpu/riscv/c2_globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/c2_globals_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/riscv/globals_riscv.hpp b/src/hotspot/cpu/riscv/globals_riscv.hpp index 4a33d40ec6ceb..c78bfaa8ffdae 100644 --- a/src/hotspot/cpu/riscv/globals_riscv.hpp +++ b/src/hotspot/cpu/riscv/globals_riscv.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/s390/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 46b5a545c6fe7..1b2b698a73752 100644 --- a/src/hotspot/cpu/s390/c1_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c1_globals_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/s390/c2_globals_s390.hpp b/src/hotspot/cpu/s390/c2_globals_s390.hpp index a9961973c37af..94190c25f5bb5 100644 --- a/src/hotspot/cpu/s390/c2_globals_s390.hpp +++ b/src/hotspot/cpu/s390/c2_globals_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/s390/globals_s390.hpp b/src/hotspot/cpu/s390/globals_s390.hpp index aefe58f9e4432..07987ea346907 100644 --- a/src/hotspot/cpu/s390/globals_s390.hpp +++ b/src/hotspot/cpu/s390/globals_s390.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/cpu/x86/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index f4a44e8e52acc..be5c443a69522 100644 --- a/src/hotspot/cpu/x86/c1_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c1_globals_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/x86/c2_globals_x86.hpp b/src/hotspot/cpu/x86/c2_globals_x86.hpp index 840801d76c5cc..a25f5da5e5693 100644 --- a/src/hotspot/cpu/x86/c2_globals_x86.hpp +++ b/src/hotspot/cpu/x86/c2_globals_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/x86/globals_x86.hpp b/src/hotspot/cpu/x86/globals_x86.hpp index cabbc72eeeea3..103e22d0185e4 100644 --- a/src/hotspot/cpu/x86/globals_x86.hpp +++ b/src/hotspot/cpu/x86/globals_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/cpu/zero/globals_zero.hpp b/src/hotspot/cpu/zero/globals_zero.hpp index 66c9d5faab3bc..6b6c6ea983c60 100644 --- a/src/hotspot/cpu/zero/globals_zero.hpp +++ b/src/hotspot/cpu/zero/globals_zero.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff --git a/src/hotspot/share/compiler/compiler_globals_pd.hpp b/src/hotspot/share/compiler/compiler_globals_pd.hpp index 0794b6af8a83d..2cdda429a15e5 100644 --- a/src/hotspot/share/compiler/compiler_globals_pd.hpp +++ b/src/hotspot/share/compiler/compiler_globals_pd.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp index 265350b87412c..4544ad706fd78 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp index b6317de321b75..9b9d9d19c156f 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java index 01280b3423747..ab017a9ecf0ef 100644 --- a/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java +++ b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java b/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java index d86daf8763cd2..26d3556d10e87 100644 --- a/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java +++ b/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java index c0de0458632ab..a77b3681bf210 100644 --- a/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java +++ b/test/hotspot/jtreg/compiler/codecache/stress/ReturnBlobToWrongHeapTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java b/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java index 301486e3d8db7..e19e91fd8ce32 100644 --- a/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java b/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java index 514f830275a2e..79f8678a1e243 100644 --- a/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java +++ b/test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/lib/jdk/test/whitebox/code/BlobType.java b/test/lib/jdk/test/whitebox/code/BlobType.java index 839c325b8bc3c..a2290acc7b618 100644 --- a/test/lib/jdk/test/whitebox/code/BlobType.java +++ b/test/lib/jdk/test/whitebox/code/BlobType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From 733ea6745ed5656f66009974b99060d87a52dd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Wed, 18 Jun 2025 14:14:51 +0200 Subject: [PATCH 11/14] Clarify endif --- src/hotspot/share/compiler/compilationPolicy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index 5ca719d030957..fec2ee17eba55 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -591,7 +591,7 @@ void CompilationPolicy::initialize() { count = 3; FLAG_SET_ERGO(CICompilerCount, count); } -#endif +#endif // _LP64 if (c1_only) { // No C2 compiler threads are needed From 5e3089b5d1153635d4ed5b1ab9ac552f1eb90edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Wed, 18 Jun 2025 14:03:48 +0200 Subject: [PATCH 12/14] Caclulate how many compiler buffers fit into NonNMethodCodeHeap --- src/hotspot/share/compiler/compilationPolicy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index fec2ee17eba55..18503c9a2cbb9 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -572,7 +572,7 @@ void CompilationPolicy::initialize() { c2_size = C2Compiler::initial_code_buffer_size(); #endif size_t buffer_size = c1_only ? c1_size : (c1_size/3 + 2*c2_size/3); - size_t max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / buffer_size; + size_t max_count = (NonNMethodCodeHeapSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / buffer_size; if ((size_t)count > max_count) { // Lower the compiler count such that all buffers fit into the code cache count = MAX2((int)max_count, min_count); From 2cb4042865a370e7ec98c2dc2b22a6dc54957b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Wed, 18 Jun 2025 14:11:31 +0200 Subject: [PATCH 13/14] Calculate buffer size correctly for c2_only Co-authored-by: Aleksey Shipilev --- src/hotspot/share/compiler/compilationPolicy.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index 18503c9a2cbb9..8521631406695 100644 --- a/src/hotspot/share/compiler/compilationPolicy.cpp +++ b/src/hotspot/share/compiler/compilationPolicy.cpp @@ -571,7 +571,14 @@ void CompilationPolicy::initialize() { #ifdef COMPILER2 c2_size = C2Compiler::initial_code_buffer_size(); #endif - size_t buffer_size = c1_only ? c1_size : (c1_size/3 + 2*c2_size/3); + size_t buffer_size = 0; + if (c1_only) { + buffer_size = c1_size; + } else if (c2_only) { + buffer_size = c2_size; + } else { + buffer_size = c1_size / 3 + 2 * c2_size / 3; + } size_t max_count = (NonNMethodCodeHeapSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / buffer_size; if ((size_t)count > max_count) { // Lower the compiler count such that all buffers fit into the code cache From c6ab7deed0d254352e2aea169b30d251378a4d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=A4ssig?= Date: Thu, 19 Jun 2025 16:34:48 +0200 Subject: [PATCH 14/14] Fix merge conflict resolution --- .../runtime/flags/jvmFlagConstraintsRuntime.cpp | 12 ------------ .../runtime/flags/jvmFlagConstraintsRuntime.hpp | 1 - 2 files changed, 13 deletions(-) diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp index e09b426a2e676..9e0825339c9d8 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp @@ -99,18 +99,6 @@ JVMFlag::Error ContendedPaddingWidthConstraintFunc(int value, bool verbose) { } } -JVMFlag::Error PerfDataSamplingIntervalFunc(int value, bool verbose) { - if ((value % PeriodicTask::interval_gran != 0)) { - JVMFlag::printError(verbose, - "PerfDataSamplingInterval (%d) must be " - "evenly divisible by PeriodicTask::interval_gran (%d)\n", - value, PeriodicTask::interval_gran); - return JVMFlag::VIOLATES_CONSTRAINT; - } else { - return JVMFlag::SUCCESS; - } -} - JVMFlag::Error VMPageSizeConstraintFunc(size_t value, bool verbose) { size_t min = os::vm_page_size(); if (value < min) { diff --git a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp index 9b9d9d19c156f..5ca28a73fb039 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp @@ -39,7 +39,6 @@ f(ccstr, AOTModeConstraintFunc) \ f(int, ObjectAlignmentInBytesConstraintFunc) \ f(int, ContendedPaddingWidthConstraintFunc) \ - f(int, PerfDataSamplingIntervalFunc) \ f(size_t, VMPageSizeConstraintFunc) \ f(size_t, NUMAInterleaveGranularityConstraintFunc)