File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
test/hotspot/jtreg/compiler/whitebox Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 2828 * @library /test/lib /
2929 * @modules java.base/jdk.internal.misc java.management
3030 * @requires vm.opt.DeoptimizeALot != true
31+ * @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
32+ * @requires !vm.emulatedClient
3133 * @build jdk.test.whitebox.WhiteBox
3234 * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
3335 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch -XX:+SegmentedCodeCache
@@ -55,8 +57,8 @@ public static void main(String [] args) throws Exception {
5557 // Verify not initially compiled
5658 CompilerWhiteBoxTest .checkNotCompiled (method , false );
5759
58- // Call function enough to compile
59- callFunction ( );
60+ // Enqueue method for compilation. This will block since background compilation is disabled
61+ WHITE_BOX . enqueueMethodForCompilation ( method , CompilerWhiteBoxTest . COMP_LEVEL_FULL_OPTIMIZATION );
6062
6163 // Verify now compiled
6264 CompilerWhiteBoxTest .checkCompiled (method , false );
@@ -91,13 +93,6 @@ public static void main(String [] args) throws Exception {
9193 function ();
9294 }
9395
94- // Call function multiple times to trigger compilation
95- private static void callFunction () {
96- for (int i = 0 ; i < CompilerWhiteBoxTest .THRESHOLD ; i ++) {
97- function ();
98- }
99- }
100-
10196 public static void function () {
10297 FUNCTION_RESULT = Math .random ();
10398 }
You can’t perform that action at this time.
0 commit comments