From 7bc0d82450e210b14c9f89687582d78a0a50ee54 Mon Sep 17 00:00:00 2001 From: Kim Barrett Date: Wed, 18 Jun 2025 18:05:18 +0000 Subject: [PATCH] 8359227: Code cache/heap size options should be size_t Reviewed-by: mhaessig, tschatzl --- .../cpu/aarch64/c1_globals_aarch64.hpp | 18 ++++++------- .../cpu/aarch64/c2_globals_aarch64.hpp | 18 ++++++------- src/hotspot/cpu/aarch64/globals_aarch64.hpp | 2 +- src/hotspot/cpu/arm/c1_globals_arm.hpp | 4 +-- src/hotspot/cpu/arm/c2_globals_arm.hpp | 4 +-- src/hotspot/cpu/arm/globals_arm.hpp | 8 +++--- src/hotspot/cpu/ppc/c1_globals_ppc.hpp | 18 ++++++------- src/hotspot/cpu/ppc/c2_globals_ppc.hpp | 18 ++++++------- src/hotspot/cpu/ppc/globals_ppc.hpp | 10 +++---- src/hotspot/cpu/riscv/c1_globals_riscv.hpp | 18 ++++++------- src/hotspot/cpu/riscv/c2_globals_riscv.hpp | 18 ++++++------- src/hotspot/cpu/riscv/globals_riscv.hpp | 4 +-- src/hotspot/cpu/s390/c1_globals_s390.hpp | 18 ++++++------- src/hotspot/cpu/s390/c2_globals_s390.hpp | 18 ++++++------- src/hotspot/cpu/s390/globals_s390.hpp | 4 +-- src/hotspot/cpu/x86/c1_globals_x86.hpp | 18 ++++++------- src/hotspot/cpu/x86/c2_globals_x86.hpp | 22 ++++++++-------- src/hotspot/cpu/x86/globals_x86.hpp | 4 +-- src/hotspot/cpu/zero/globals_zero.hpp | 10 +++---- src/hotspot/share/code/codeCache.cpp | 6 ++--- .../share/compiler/compilationPolicy.cpp | 6 ++--- .../share/compiler/compilerDefinitions.cpp | 12 ++++----- .../share/compiler/compiler_globals_pd.hpp | 18 ++++++------- .../share/jvmci/jvmciCompilerToVMInit.cpp | 17 ++++++------ src/hotspot/share/memory/heap.cpp | 2 +- src/hotspot/share/runtime/arguments.cpp | 2 +- .../flags/jvmFlagConstraintsCompiler.cpp | 8 +++--- .../flags/jvmFlagConstraintsCompiler.hpp | 4 +-- .../flags/jvmFlagConstraintsRuntime.cpp | 4 +-- .../flags/jvmFlagConstraintsRuntime.hpp | 4 +-- src/hotspot/share/runtime/globals.hpp | 26 +++++++++---------- .../codecache/CheckSegmentedCodeCache.java | 2 +- .../codecache/jmx/CodeCacheUtils.java | 6 ++--- .../stress/RandomAllocationTest.java | 4 +-- .../stress/ReturnBlobToWrongHeapTest.java | 6 ++--- .../whitebox/AllocationCodeBlobTest.java | 4 +-- .../event/compiler/TestCodeCacheConfig.java | 2 +- .../jfr/event/compiler/TestCodeSweeper.java | 4 +-- .../jdk/test/whitebox/vm_flags/UintxTest.java | 4 +-- test/lib/jdk/test/whitebox/code/BlobType.java | 4 +-- 40 files changed, 190 insertions(+), 189 deletions(-) diff --git a/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp b/src/hotspot/cpu/aarch64/c1_globals_aarch64.hpp index c2d1405b005..a8a2fa8b2ee 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. * @@ -43,15 +43,15 @@ 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(intx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +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(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, CodeCacheExpansionSize, 32*K ); +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); 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 6c5c469ca27..94a80dec3ea 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. * @@ -51,8 +51,8 @@ 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(intx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t,MaxRAM, 128ULL*G); @@ -69,12 +69,12 @@ 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(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, 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(size_t, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags define_pd_global(bool, NeverActAsServerClassMachine, false); diff --git a/src/hotspot/cpu/aarch64/globals_aarch64.hpp b/src/hotspot/cpu/aarch64/globals_aarch64.hpp index b316103d656..d195af8cef4 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/c1_globals_arm.hpp b/src/hotspot/cpu/arm/c1_globals_arm.hpp index d22d39d6369..396f206975b 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 @@ -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 abd3ef6aef5..d739e67360a 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 @@ -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/arm/globals_arm.hpp b/src/hotspot/cpu/arm/globals_arm.hpp index 9c4b8500e18..363a9a2c25c 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 @@ -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/c1_globals_ppc.hpp b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp index 23604b5c083..ab014287250 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. * @@ -44,17 +44,17 @@ 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(uintx, NonProfiledCodeHeapSize, 13*M ); -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, 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(size_t, CodeCacheExpansionSize, 32*K); +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); 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 3e83ac4f3a4..706255d035a 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. * @@ -78,17 +78,17 @@ 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(uintx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); -define_pd_global(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize +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(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(uintx, CodeCacheMinimumUseSpace, 400*K); +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/ppc/globals_ppc.hpp b/src/hotspot/cpu/ppc/globals_ppc.hpp index f944408fe29..65334bf0389 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. * @@ -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/c1_globals_riscv.hpp b/src/hotspot/cpu/riscv/c1_globals_riscv.hpp index 311405dbc2b..d64b3b66fa2 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. * @@ -43,15 +43,15 @@ 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(intx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(intx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(intx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +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(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, CodeCacheExpansionSize, 32*K ); +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); 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 79bdc4917c9..372865fc291 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. * @@ -51,8 +51,8 @@ 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(intx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t,MaxRAM, 128ULL*G); @@ -69,12 +69,12 @@ 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(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, 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(size_t, CodeCacheMinBlockLength, 6); +define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K); // Ergonomics related flags define_pd_global(bool, NeverActAsServerClassMachine, false); diff --git a/src/hotspot/cpu/riscv/globals_riscv.hpp b/src/hotspot/cpu/riscv/globals_riscv.hpp index d67e05bbb6d..c78bfaa8ffd 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. * @@ -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/c1_globals_s390.hpp b/src/hotspot/cpu/s390/c1_globals_s390.hpp index 130a53ad084..1b2b698a737 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. * @@ -44,17 +44,17 @@ 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(uintx, NonProfiledCodeHeapSize, 13*M); -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, 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(size_t, CodeCacheExpansionSize, 32*K); +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); 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 b8b45cbc80e..94190c25f5b 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. * @@ -67,17 +67,17 @@ 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(uintx, NonProfiledCodeHeapSize, 21*M); -define_pd_global(uintx, ProfiledCodeHeapSize, 22*M); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M); -define_pd_global(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize +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(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(uintx, CodeCacheMinimumUseSpace, 400*K); +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/s390/globals_s390.hpp b/src/hotspot/cpu/s390/globals_s390.hpp index cf4be20397c..07987ea3469 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. * @@ -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/c1_globals_x86.hpp b/src/hotspot/cpu/x86/c1_globals_x86.hpp index b2085a0b4b3..be5c443a695 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 @@ -42,15 +42,15 @@ 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(uintx, NonProfiledCodeHeapSize, 13*M ); -define_pd_global(uintx, ProfiledCodeHeapSize, 14*M ); -define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M ); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +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(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, CodeCacheExpansionSize, 32*K ); +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); 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 64dda0a8947..a25f5da5e56 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 @@ -50,8 +50,8 @@ 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(uintx, CodeCacheExpansionSize, 64*K); +define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, CodeCacheExpansionSize, 64*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 128ULL*G); @@ -60,8 +60,8 @@ 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(uintx, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); // Ergonomics related flags define_pd_global(uint64_t, MaxRAM, 4ULL*G); @@ -79,12 +79,12 @@ 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(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, 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(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/cpu/x86/globals_x86.hpp b/src/hotspot/cpu/x86/globals_x86.hpp index a1d4a71874f..103e22d0185 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 @@ -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 76f9692e202..6b6c6ea983c 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. * @@ -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 3a5da1d7cd2..9d505df8b72 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)", @@ -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/compiler/compilationPolicy.cpp b/src/hotspot/share/compiler/compilationPolicy.cpp index bab437eaade..5ca719d0309 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 f82e96be6ae..fa894559fef 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). @@ -475,26 +475,26 @@ 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: %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 %zuK.\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) { 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 f27033c0607..90edd952c77 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) 2025, 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 @@ -61,15 +61,15 @@ 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(uintx, NonProfiledCodeHeapSize, 0); -define_pd_global(uintx, ProfiledCodeHeapSize, 0); -define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M); +define_pd_global(size_t, InitialCodeCacheSize, 160*K); +define_pd_global(size_t, ReservedCodeCacheSize, 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); -define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K); +define_pd_global(size_t, CodeCacheExpansionSize, 32*K); +define_pd_global(size_t, CodeCacheMinBlockLength, 1); +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/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp index 1beb1917b9a..b6d919fdfe9 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp @@ -343,7 +343,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 +354,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 +541,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/memory/heap.cpp b/src/hotspot/share/memory/heap.cpp index b111c61f15a..a1333ed13e9 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/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index a49116fd91d..5b56c81a32d 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/flags/jvmFlagConstraintsCompiler.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp index 18aa4a56d71..0d93b380384 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 cfca8ecf8ee..4544ad706fd 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 @@ -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/flags/jvmFlagConstraintsRuntime.cpp b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp index f49b7f66690..9e0825339c9 100644 --- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp +++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp @@ -99,8 +99,8 @@ JVMFlag::Error ContendedPaddingWidthConstraintFunc(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 ddd2bae1914..5ca28a73fb0 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 @@ -39,7 +39,7 @@ f(ccstr, AOTModeConstraintFunc) \ f(int, ObjectAlignmentInBytesConstraintFunc) \ f(int, ContendedPaddingWidthConstraintFunc) \ - f(uintx, VMPageSizeConstraintFunc) \ + f(size_t, VMPageSizeConstraintFunc) \ f(size_t, NUMAInterleaveGranularityConstraintFunc) RUNTIME_CONSTRAINTS(DECLARE_CONSTRAINT) diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 75736d0dc7d..dc2889e5358 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) \ @@ -1516,38 +1516,38 @@ 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) \ \ - 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") \ \ - product_pd(uintx, ReservedCodeCacheSize, \ + product_pd(size_t, ReservedCodeCacheSize, \ "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) \ \ - 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, \ + 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/CheckSegmentedCodeCache.java b/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java index 139ea6d76a2..06b51b1641d 100644 --- a/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java +++ b/test/hotspot/jtreg/compiler/codecache/CheckSegmentedCodeCache.java @@ -188,7 +188,7 @@ public class CheckSegmentedCodeCache { 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/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java b/test/hotspot/jtreg/compiler/codecache/jmx/CodeCacheUtils.java index 340021bb993..ab017a9ecf0 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 @@ -41,9 +41,9 @@ 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"); + = 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/RandomAllocationTest.java b/test/hotspot/jtreg/compiler/codecache/stress/RandomAllocationTest.java index 72e605397d0..26d3556d10e 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 @@ -53,7 +53,7 @@ import jdk.test.lib.Utils; 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 c66c2a22f14..a77b3681bf2 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 @@ -48,8 +48,8 @@ import jdk.test.whitebox.code.BlobType; import java.util.ArrayList; public class ReturnBlobToWrongHeapTest { - private static final long largeBlobSize = Helper.WHITE_BOX.getUintxVMFlag("ReservedCodeCacheSize") >> 6; - private static final long codeCacheMinBlockLength = Helper.WHITE_BOX.getUintxVMFlag("CodeCacheMinBlockLength"); + private static final long largeBlobSize = Helper.WHITE_BOX.getSizeTVMFlag("ReservedCodeCacheSize") >> 6; + 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/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java b/test/hotspot/jtreg/compiler/whitebox/AllocationCodeBlobTest.java index 29168a1e7e8..e19e91fd8ce 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 @@ -54,7 +54,7 @@ import java.util.EnumSet; 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 defc9cba1be..1eb402f08ae 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCodeCacheConfig.java @@ -50,7 +50,7 @@ import jdk.test.whitebox.WhiteBox; 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(); diff --git a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java index dd227489a0c..a4fc50b764d 100644 --- a/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java +++ b/test/jdk/jdk/jfr/event/compiler/TestCodeSweeper.java @@ -65,8 +65,8 @@ 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 MIN_BLOCK_LENGTH = WhiteBox.getWhiteBox().getUintxVMFlag("CodeCacheMinBlockLength"); + public static final long SEGMENT_SIZE = WhiteBox.getWhiteBox().getSizeTVMFlag("CodeCacheSegmentSize"); + 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; 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 0996350adff..79f8678a1e2 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 @@ -37,7 +37,7 @@ import jdk.test.lib.Platform; 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; diff --git a/test/lib/jdk/test/whitebox/code/BlobType.java b/test/lib/jdk/test/whitebox/code/BlobType.java index 24ce9d96a41..a2290acc7b6 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 @@ -103,6 +103,6 @@ public enum BlobType { } public long getSize() { - return WhiteBox.getWhiteBox().getUintxVMFlag(sizeOptionName); + return WhiteBox.getWhiteBox().getSizeTVMFlag(sizeOptionName); } }