diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 35b46099e1b6d..2f0fd1b9109e8 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -1985,7 +1985,7 @@ bool FileMapHeader::validate() { if (_bci_profile_width != BciProfileWidth) { MetaspaceShared::report_loading_error("The %s's BciProfileWidth setting (%d)" " does not equal the current BciProfileWidth setting (%d).", file_type, - (int)_bci_profile_width, (int)BciProfileWidth); + _bci_profile_width, BciProfileWidth); return false; } if (_type_profile_casts != TypeProfileCasts) { diff --git a/src/hotspot/share/cds/filemap.hpp b/src/hotspot/share/cds/filemap.hpp index 02390874f3979..540ae8b3f93c3 100644 --- a/src/hotspot/share/cds/filemap.hpp +++ b/src/hotspot/share/cds/filemap.hpp @@ -152,7 +152,7 @@ class FileMapHeader: private CDSFileMapHeaderBase { int _type_profile_args_limit; int _type_profile_parms_limit; intx _type_profile_width; - intx _bci_profile_width; + int _bci_profile_width; bool _profile_traps; bool _type_profile_casts; int _spec_trap_limit_extra_entries; diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp index b6d919fdfe937..52a0b3f199961 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp @@ -350,7 +350,7 @@ JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) { do_int_flag(AllocatePrefetchLines) \ do_int_flag(AllocatePrefetchStepSize) \ do_int_flag(AllocatePrefetchStyle) \ - do_intx_flag(BciProfileWidth) \ + do_int_flag(BciProfileWidth) \ do_bool_flag(BootstrapJVMCI) \ do_bool_flag(CITime) \ do_bool_flag(CITimeEach) \ diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 91dadd05180c5..fee810c4001e7 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1351,8 +1351,9 @@ const int ObjectAlignmentInBytes = 8; "Number of receiver types to record in call/cast profile") \ range(0, 8) \ \ - develop(intx, BciProfileWidth, 2, \ + develop(int, BciProfileWidth, 2, \ "Number of return bci's to record in ret profile") \ + range(0, AARCH64_ONLY(1000) NOT_AARCH64(5000)) \ \ product(intx, PerMethodRecompilationCutoff, 400, \ "After recompiling N times, stay in the interpreter (-1=>'Inf')") \ diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java index a7c2e2bccb7ee..f20370cc96022 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/MethodData.java @@ -143,7 +143,7 @@ private static synchronized void initialize(TypeDataBase db) throws WrongTypeExc if (flag.getName().equals("TypeProfileWidth")) { TypeProfileWidth = (int)flag.getIntx(); } else if (flag.getName().equals("BciProfileWidth")) { - BciProfileWidth = (int)flag.getIntx(); + BciProfileWidth = (int)flag.getInt(); } else if (flag.getName().equals("CompileThreshold")) { CompileThreshold = (int)flag.getIntx(); } diff --git a/test/lib-test/jdk/test/whitebox/vm_flags/IntxTest.java b/test/lib-test/jdk/test/whitebox/vm_flags/IntxTest.java index 2de4028ba6cdf..fce2e0821b10e 100644 --- a/test/lib-test/jdk/test/whitebox/vm_flags/IntxTest.java +++ b/test/lib-test/jdk/test/whitebox/vm_flags/IntxTest.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 @@ -36,9 +36,9 @@ import jdk.test.lib.Platform; public class IntxTest { private static final String FLAG_NAME = "OnStackReplacePercentage"; - private static final String FLAG_DEBUG_NAME = "BciProfileWidth"; private static final long COMPILE_THRESHOLD = VmFlagTest.WHITE_BOX.getIntxVMFlag("CompileThreshold"); private static final Long[] TESTS = {0L, 100L, (long)(Integer.MAX_VALUE>>3)*100L}; + private static final String FLAG_DEBUG_NAME = "BinarySwitchThreshold"; public static void main(String[] args) throws Exception { find_and_set_max_osrp();