From 923207073af985a1b72de3c777d55b0c2d392b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lund=C3=A9n?= Date: Tue, 21 Nov 2023 10:58:09 +0000 Subject: [PATCH] 8318480: Obsolete UseCounterDecay and remove CounterDecayMinIntervalLength Reviewed-by: thartmann, lmesnik, dholmes --- src/hotspot/share/runtime/arguments.cpp | 7 +------ src/hotspot/share/runtime/globals.hpp | 7 ------- .../compilerToVM/MaterializeVirtualObjectTest.java | 10 +++++----- .../tiered/ConstantGettersTransitionsTest.java | 4 ++-- .../jtreg/compiler/tiered/Level2RecompilationTest.java | 4 ++-- .../jtreg/compiler/tiered/LevelTransitionTest.java | 4 ++-- .../jtreg/compiler/tiered/NonTieredLevelsTest.java | 4 ++-- .../jtreg/compiler/tiered/TieredLevelsTest.java | 4 ++-- .../jtreg/compiler/whitebox/ClearMethodStateTest.java | 4 ++-- .../jtreg/compiler/whitebox/CompilerWhiteBoxTest.java | 7 +------ .../jtreg/compiler/whitebox/DeoptimizeAllTest.java | 4 ++-- .../jtreg/compiler/whitebox/DeoptimizeFramesTest.java | 6 +++--- .../jtreg/compiler/whitebox/DeoptimizeMethodTest.java | 4 ++-- .../whitebox/EnqueueMethodForCompilationTest.java | 4 ++-- .../jtreg/compiler/whitebox/ForceNMethodSweepTest.java | 4 ++-- .../jtreg/compiler/whitebox/GetNMethodTest.java | 4 ++-- .../compiler/whitebox/IsMethodCompilableTest.java | 4 ++-- .../jtreg/compiler/whitebox/LockCompilationTest.java | 4 ++-- .../compiler/whitebox/MakeMethodNotCompilableTest.java | 4 ++-- test/hotspot/jtreg/testlibrary/ctw/Makefile | 2 +- .../ctw/src/sun/hotspot/tools/ctw/CtwRunner.java | 1 - 21 files changed, 39 insertions(+), 57 deletions(-) diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index c2e42e31dbb..ded0d655ff4 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -529,6 +529,7 @@ static SpecialFlag const special_jvm_flags[] = { { "RefDiscoveryPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() }, { "MetaspaceReclaimPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() }, { "DoReserveCopyInSuperWord", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) }, + { "UseCounterDecay", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) }, #ifdef LINUX { "UseHugeTLBFS", JDK_Version::undefined(), JDK_Version::jdk(22), JDK_Version::jdk(23) }, @@ -3909,12 +3910,6 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) { if (TraceBytecodesAt != 0) { TraceBytecodes = true; } - if (CountCompiledCalls) { - if (UseCounterDecay) { - warning("UseCounterDecay disabled because CountCalls is set"); - UseCounterDecay = false; - } - } #endif // PRODUCT if (ScavengeRootsInCode == 0) { diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index 17dfaee8a76..b780b040f94 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -1220,16 +1220,9 @@ const int ObjectAlignmentInBytes = 8; product(bool, UseCompiler, true, \ "Use Just-In-Time compilation") \ \ - product(bool, UseCounterDecay, true, \ - "Adjust recompilation counters") \ - \ develop(intx, CounterHalfLifeTime, 30, \ "Half-life time of invocation counters (in seconds)") \ \ - develop(intx, CounterDecayMinIntervalLength, 500, \ - "The minimum interval (in milliseconds) between invocation of " \ - "CounterDecay") \ - \ product(bool, AlwaysCompileLoopMethods, false, \ "When using recompilation, never interpret methods " \ "containing loops") \ diff --git a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java index 443dc9187d8..5855440d0b2 100644 --- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2023, 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 @@ * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3 - * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -XX:+DoEscapeAnalysis * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest @@ -63,7 +63,7 @@ * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3 - * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -XX:+DoEscapeAnalysis * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=false * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest @@ -75,7 +75,7 @@ * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3 - * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -XX:+DoEscapeAnalysis * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=true * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest @@ -87,7 +87,7 @@ * -XX:CompileCommand=dontinline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame2 * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::recurse * -XX:CompileCommand=inline,compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest::testFrame3 - * -XX:+DoEscapeAnalysis -XX:-UseCounterDecay + * -XX:+DoEscapeAnalysis * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.materializeFirst=false * -Dcompiler.jvmci.compilerToVM.MaterializeVirtualObjectTest.invalidate=true * compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest diff --git a/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java b/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java index e5fb2825aa7..8f5032b9c9f 100644 --- a/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java +++ b/test/hotspot/jtreg/compiler/tiered/ConstantGettersTransitionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -32,7 +32,7 @@ * compiler.tiered.ConstantGettersTransitionsTest * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:+TieredCompilation -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -XX:+TieredCompilation * -XX:CompileCommand=compileonly,compiler.tiered.ConstantGettersTransitionsTest$ConstantGettersTestCase$TrivialMethods::* * compiler.tiered.ConstantGettersTransitionsTest */ diff --git a/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java b/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java index 33a9a07b6ce..9cdba8c7bea 100644 --- a/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java +++ b/test/hotspot/jtreg/compiler/tiered/Level2RecompilationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation - * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * -XX:CompileCommand=print,compiler.whitebox.SimpleTestCaseHelper::* * compiler.tiered.Level2RecompilationTest diff --git a/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java b/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java index b18b304a9bc..b3a2c7ab5db 100644 --- a/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java +++ b/test/hotspot/jtreg/compiler/tiered/LevelTransitionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -33,7 +33,7 @@ * compiler.tiered.LevelTransitionTest * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:+TieredCompilation -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -XX:+TieredCompilation * -XX:-BackgroundCompilation * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * -XX:CompileCommand=compileonly,compiler.tiered.LevelTransitionTest$ExtendedTestCase$CompileMethodHolder::* diff --git a/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java b/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java index 57098440fce..d23b13a65e4 100644 --- a/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java +++ b/test/hotspot/jtreg/compiler/tiered/NonTieredLevelsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -31,7 +31,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation - * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.tiered.NonTieredLevelsTest */ diff --git a/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java b/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java index 4fe36dc7e86..98e112927c6 100644 --- a/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java +++ b/test/hotspot/jtreg/compiler/tiered/TieredLevelsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -31,7 +31,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation - * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.tiered.TieredLevelsTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java b/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java index ee62d9f229c..33abc23c17a 100644 --- a/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/ClearMethodStateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -XX:+PrintCompilation * compiler.whitebox.ClearMethodStateTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java index 407aac7868e..f87292be019 100644 --- a/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/CompilerWhiteBoxTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -62,8 +62,6 @@ public abstract class CompilerWhiteBoxTest { /** Value of {@code -XX:BackgroundCompilation} */ protected static final boolean BACKGROUND_COMPILATION = Boolean.valueOf(getVMOption("BackgroundCompilation", "true")); - protected static final boolean USE_COUNTER_DECAY - = Boolean.valueOf(getVMOption("UseCounterDecay", "true")); /** Value of {@code -XX:TieredCompilation} */ protected static final boolean TIERED_COMPILATION = Boolean.valueOf(getVMOption("TieredCompilation", "false")); @@ -367,9 +365,6 @@ public abstract class CompilerWhiteBoxTest { * @see #compile(int) */ protected final int compile() throws Exception { - if (USE_COUNTER_DECAY) { - throw new Exception("Tests using compile method must turn off counter decay for reliability"); - } if (testCase.isOsr()) { return compile(1); } else { diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java index a110603c0b3..33f350b136c 100644 --- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeAllTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.whitebox.DeoptimizeAllTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java index 0a3691eb4df..1d9c8169d04 100644 --- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeFramesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -34,12 +34,12 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -Xmixed * -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot * compiler.whitebox.DeoptimizeFramesTest true * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -Xmixed * -XX:CompileCommand=compileonly,compiler.whitebox.DeoptimizeFramesTest$TestCaseImpl::method * -XX:CompileCommand=dontinline,java.util.concurrent.Phaser::* * -XX:+IgnoreUnrecognizedVMOptions -XX:-DeoptimizeRandom -XX:-DeoptimizeALot diff --git a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java index 87c5d7f2cb0..a684c9f1e29 100644 --- a/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/DeoptimizeMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -31,7 +31,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.whitebox.DeoptimizeMethodTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java b/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java index 0ad26762508..fc2c4e4db81 100644 --- a/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/EnqueueMethodForCompilationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:+PrintCompilation -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -XX:+PrintCompilation * compiler.whitebox.EnqueueMethodForCompilationTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java b/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java index 9d6f1a074e7..e55bc33b6ee 100644 --- a/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/ForceNMethodSweepTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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,7 +36,7 @@ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions * -XX:-TieredCompilation -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* - * -XX:-BackgroundCompilation -XX:-UseCounterDecay + * -XX:-BackgroundCompilation * -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI * compiler.whitebox.ForceNMethodSweepTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java b/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java index 297b068e166..4968a9eb7ee 100644 --- a/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/GetNMethodTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.whitebox.GetNMethodTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java b/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java index b4e1ccedbcb..19f577067e7 100644 --- a/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/IsMethodCompilableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=2400 -XX:-TieredCompilation -Xmixed * -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI - * -XX:PerMethodRecompilationCutoff=3 -XX:-UseCounterDecay + * -XX:PerMethodRecompilationCutoff=3 * -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::* * compiler.whitebox.IsMethodCompilableTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java index 4a45229c380..2945f86a2e3 100644 --- a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2023, 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 @@ -31,7 +31,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI * -XX:CompileCommand=compileonly,*SimpleTestCaseHelper::method * compiler.whitebox.LockCompilationTest */ diff --git a/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java b/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java index eba0d342c64..2491c504b11 100644 --- a/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/MakeMethodNotCompilableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2023, 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 @@ -34,7 +34,7 @@ * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions - * -XX:+WhiteBoxAPI -Xmixed -XX:-UseCounterDecay + * -XX:+WhiteBoxAPI -Xmixed * compiler.whitebox.MakeMethodNotCompilableTest */ diff --git a/test/hotspot/jtreg/testlibrary/ctw/Makefile b/test/hotspot/jtreg/testlibrary/ctw/Makefile index 8998765fe2a..5ba3bbb659a 100644 --- a/test/hotspot/jtreg/testlibrary/ctw/Makefile +++ b/test/hotspot/jtreg/testlibrary/ctw/Makefile @@ -77,7 +77,7 @@ $(DST_DIR): @mkdir -p $@ $(DST_DIR)/ctw.sh: $(DST_DIR) - echo '$${JAVA_HOME}/bin/java $${JAVA_OPTIONS} $(EXPORTS) -XX:-UseCounterDecay -Xbatch "-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*" -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar $$@' > $@ + echo '$${JAVA_HOME}/bin/java $${JAVA_OPTIONS} $(EXPORTS) -Xbatch "-XX:CompileCommand=exclude,java/lang/invoke/MethodHandle.*" -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:wb.jar -jar ctw.jar $$@' > $@ chmod a+x $@ $(DST_DIR)/ctwrunner.sh: $(DST_DIR) diff --git a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java index 478b74c2741..d9c64b89138 100644 --- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java +++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java @@ -270,7 +270,6 @@ public class CtwRunner { ArrayList Args = new ArrayList(Arrays.asList( "-Xbatch", - "-XX:-UseCounterDecay", "-XX:-ShowMessageBoxOnError", "-XX:+UnlockDiagnosticVMOptions", // redirect VM output to cerr so it won't collide w/ ctw output