Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests #12104

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessBoolean
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessBoolean
* @run testng/othervm -Diters=20000 VarHandleTestAccessBoolean
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessBoolean
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessBoolean
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessBoolean
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessBoolean
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessBoolean
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessBoolean recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessByte
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessByte
* @run testng/othervm -Diters=20000 VarHandleTestAccessByte
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessByte
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessByte
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessByte
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessByte
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessByte
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessByte recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessChar
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessChar
* @run testng/othervm -Diters=20000 VarHandleTestAccessChar
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessChar
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessChar
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessChar
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessChar
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessChar
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessChar recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessDouble
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessDouble
* @run testng/othervm -Diters=20000 VarHandleTestAccessDouble
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessDouble
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessDouble
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessDouble
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessDouble
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessDouble
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessDouble recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessFloat
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessFloat
* @run testng/othervm -Diters=20000 VarHandleTestAccessFloat
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessFloat
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessFloat
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessFloat
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessFloat
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessFloat
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessFloat recv, VarHandle vh) {
// Plain
{
Expand Down
17 changes: 9 additions & 8 deletions test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessInt.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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessInt
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessInt
* @run testng/othervm -Diters=20000 VarHandleTestAccessInt
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessInt
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessInt
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessInt
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessInt
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessInt
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessInt recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessLong
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessLong
* @run testng/othervm -Diters=20000 VarHandleTestAccessLong
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessLong
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessLong
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessLong
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessLong
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessLong
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessLong recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessShort
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessShort
* @run testng/othervm -Diters=20000 VarHandleTestAccessShort
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessShort
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessShort
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessShort
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessShort
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessShort
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -289,9 +293,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessShort recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -23,10 +23,14 @@

/*
* @test
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessString
* @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestAccessString
* @run testng/othervm -Diters=20000 VarHandleTestAccessString
* @run testng/othervm -Diters=20000 -XX:-TieredCompilation VarHandleTestAccessString
* @run testng/othervm -Diters=10 -Xint VarHandleTestAccessString
*
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
*
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestAccessString
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestAccessString
* @run testng/othervm -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestAccessString
*/

import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -296,9 +300,6 @@ public <T> void testAccess(String desc, AccessTestCase<T> atc) throws Throwable
}
}




static void testInstanceFinalField(VarHandleTestAccessString recv, VarHandle vh) {
// Plain
{
Expand Down
@@ -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
Expand All @@ -24,9 +24,11 @@
/*
* @test
* @bug 8154556
* @run testng/othervm/timeout=360 -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsChar
* @run testng/othervm/timeout=360 -Diters=20000 VarHandleTestByteArrayAsChar
* @run testng/othervm/timeout=360 -Diters=20000 -XX:-TieredCompilation VarHandleTestByteArrayAsChar
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsChar
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestByteArrayAsChar
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestByteArrayAsChar
*/

import org.testng.annotations.DataProvider;
Expand Down
@@ -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
Expand All @@ -24,9 +24,11 @@
/*
* @test
* @bug 8154556
* @run testng/othervm/timeout=360 -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsDouble
* @run testng/othervm/timeout=360 -Diters=20000 VarHandleTestByteArrayAsDouble
* @run testng/othervm/timeout=360 -Diters=20000 -XX:-TieredCompilation VarHandleTestByteArrayAsDouble
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsDouble
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestByteArrayAsDouble
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestByteArrayAsDouble
*/

import org.testng.annotations.DataProvider;
Expand Down
@@ -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
Expand All @@ -24,9 +24,11 @@
/*
* @test
* @bug 8154556
* @run testng/othervm/timeout=360 -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsFloat
* @run testng/othervm/timeout=360 -Diters=20000 VarHandleTestByteArrayAsFloat
* @run testng/othervm/timeout=360 -Diters=20000 -XX:-TieredCompilation VarHandleTestByteArrayAsFloat
* @comment Set CompileThresholdScaling to 0.1 so that the warmup loop sets to 2000 iterations
* to hit compilation thresholds
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsFloat
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 VarHandleTestByteArrayAsFloat
* @run testng/othervm/timeout=360 -Diters=2000 -XX:CompileThresholdScaling=0.1 -XX:-TieredCompilation VarHandleTestByteArrayAsFloat
*/

import org.testng.annotations.DataProvider;
Expand Down