Skip to content
Closed
12 changes: 9 additions & 3 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ <h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
<h4 id="jobs">JOBS</h4>
<p>Currently only applies to JTReg.</p>
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
<p>Currently only applies to JTReg.</p>
<p>Currently only applies to <a href="#timeout_factor-1">JTReg
-timeoutFactor</a>.</p>
<h4 id="java_options">JAVA_OPTIONS</h4>
<p>Applies to JTReg, GTest and Micro.</p>
<h4 id="vm_options">VM_OPTIONS</h4>
Expand Down Expand Up @@ -443,8 +444,13 @@ <h4 id="jobs-1">JOBS</h4>
<em>number of CPU cores/2</em>, but never more than <em>memory size in
GB/2</em>.</p>
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
<p>Defaults to 4.</p>
<p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
itself (<code>-timeoutFactor</code>). Also, some test cases that
programmatically wait a certain amount of time will apply this factor.
If we run in forced compilation mode (<code>-Xcomp</code>), <a
href="../make/RunTests.gmk">RunTest.gmk</a> will automatically adjust
this factor to compensate for the interpreter not being as fast as JITed
code. Defaults to 1.</p>
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
default value is 0. This is only valid if the failure handler is
Expand Down
11 changes: 7 additions & 4 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Currently only applies to JTReg.

#### TIMEOUT_FACTOR

Currently only applies to JTReg.
Currently only applies to [JTReg -timeoutFactor](#timeout_factor-1).

#### JAVA_OPTIONS

Expand Down Expand Up @@ -379,9 +379,12 @@ never more than *memory size in GB/2*.

#### TIMEOUT_FACTOR

The timeout factor (`-timeoutFactor`).

Defaults to 4.
The `TIMEOUT_FACTOR` is forwarded to JTReg framework itself
(`-timeoutFactor`). Also, some test cases that programmatically wait a
certain amount of time will apply this factor. If we run in
forced compilation mode (`-Xcomp`), [RunTest.gmk](../make/RunTests.gmk)
will automatically adjust this factor to compensate for the
interpreter not being as fast as JITed code. Defaults to 1.

#### FAILURE_HANDLER_TIMEOUT

Expand Down
3 changes: 2 additions & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,8 @@ define SetupRunJtregTestBody
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)

JTREG_AUTO_PROBLEM_LISTS :=
JTREG_AUTO_TIMEOUT_FACTOR := 4
# Please reach consensus before changing this. It was not easy changing it to a `1`.
JTREG_AUTO_TIMEOUT_FACTOR := 1

ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
*
* @run main/othervm/timeout=7200
* @run main/othervm/timeout=28800
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* compiler.arraycopy.stress.TestStressArrayCopy
*/
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/compiler/c1/TestConcurrentPatching.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @test
* @bug 8340313
* @summary Test that concurrent patching of oop immediates is thread-safe in C1.
* @run main/othervm/timeout=480 -Xcomp -XX:CompileCommand=compileonly,TestConcurrentPatching::* -XX:TieredStopAtLevel=1 TestConcurrentPatching
* @run main/othervm/timeout=1920 -Xcomp -XX:CompileCommand=compileonly,TestConcurrentPatching::* -XX:TieredStopAtLevel=1 TestConcurrentPatching
*/

class MyClass { }
Expand Down
2 changes: 1 addition & 1 deletion test/hotspot/jtreg/compiler/c1/TestPinnedIntrinsics.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @test
* @bug 8184271
* @summary Test correct scheduling of System.nanoTime C1 intrinsic.
* @run main/othervm -XX:TieredStopAtLevel=1 -Xbatch
* @run main/othervm/timeout=480 -XX:TieredStopAtLevel=1 -Xbatch
* -XX:CompileCommand=dontinline,compiler.c1.TestPinnedIntrinsics::checkNanoTime
* compiler.c1.TestPinnedIntrinsics
*/
Expand Down
6 changes: 3 additions & 3 deletions test/hotspot/jtreg/compiler/c2/TestMergeStores.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @summary Test merging of consecutive stores
* @modules java.base/jdk.internal.misc
* @library /test/lib /
* @run main compiler.c2.TestMergeStores aligned
* @run main/timeout=480 compiler.c2.TestMergeStores aligned
*/

/*
Expand All @@ -46,7 +46,7 @@
* @summary Test merging of consecutive stores
* @modules java.base/jdk.internal.misc
* @library /test/lib /
* @run main compiler.c2.TestMergeStores unaligned
* @run main/timeout=480 compiler.c2.TestMergeStores unaligned
*/

/*
Expand All @@ -55,7 +55,7 @@
* @summary Test merging of consecutive stores
* @modules java.base/jdk.internal.misc
* @library /test/lib /
* @run main compiler.c2.TestMergeStores StressIGVN
* @run main/timeout=480 compiler.c2.TestMergeStores StressIGVN
*/

public class TestMergeStores {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
* @library /test/lib /
* @requires vm.debug & vm.compiler2.enabled
* @compile -XDstringConcat=inline TestScalarReplacementMaxLiveNodes.java
* @run main/othervm compiler.c2.TestScalarReplacementMaxLiveNodes
* @run main/othervm -Xbatch -XX:-OptimizeStringConcat -XX:-TieredCompilation
* @run main/othervm/timeout=480 compiler.c2.TestScalarReplacementMaxLiveNodes
* @run main/othervm/timeout=480 -Xbatch -XX:-OptimizeStringConcat -XX:-TieredCompilation
* -XX:+UnlockDiagnosticVMOptions -XX:+ReduceAllocationMerges
* -XX:CompileCommand=dontinline,compiler.c2.TestScalarReplacementMaxLiveNodes::test
* -XX:CompileCommand=compileonly,*TestScalarReplacementMaxLiveNodes*::*test*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8245801
* @requires vm.debug
* @summary Test running with StressRecompilation enabled.
* @run main/othervm -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+StressRecompilation
* @run main/othervm/timeout=480 -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+StressRecompilation
* compiler.c2.TestStressRecompilation
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
* @bug 8163511 8230402
* @summary Test overloading the C1 and C2 compile queues with tasks.
* @requires !vm.graal.enabled
* @run main/othervm/timeout=300 -XX:-TieredCompilation -XX:CompileThreshold=2 -XX:CICompilerCount=1
* @run main/othervm/timeout=1200 -XX:-TieredCompilation -XX:CompileThreshold=2 -XX:CICompilerCount=1
* compiler.classUnloading.methodUnloading.TestOverloadCompileQueues
* @run main/othervm/timeout=300 -XX:TieredCompileTaskTimeout=1000 -XX:CompileThresholdScaling=0.001 -XX:CICompilerCount=2
* @run main/othervm/timeout=1200 -XX:TieredCompileTaskTimeout=1000 -XX:CompileThresholdScaling=0.001 -XX:CICompilerCount=2
* compiler.classUnloading.methodUnloading.TestOverloadCompileQueues
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @test
* @bug 8333258
* @summary C2: high memory usage in PhaseCFG::raise_above_anti_dependences()
* @run main/othervm -XX:CompileOnly=TestAntiDependenciesHighMemUsage2::test1 -XX:-ClipInlining
* @run main/othervm/timeout=480 -XX:CompileOnly=TestAntiDependenciesHighMemUsage2::test1 -XX:-ClipInlining
* -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement TestAntiDependenciesHighMemUsage2
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
*
* @run main/othervm -Xbatch
* @run main/othervm/timeout=480 -Xbatch
* -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
* compiler.codegen.aes.TestCipherBlockChainingEncrypt
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @summary C2: Load can bypass subtype check that enforces it's from the right object type
* @requires vm.gc.Parallel
* @requires vm.compiler2.enabled
* @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileOnly=TestLoadBypassesClassCast::test
* @run main/othervm/timeout=480 -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileOnly=TestLoadBypassesClassCast::test
* -XX:CompileThreshold=20000 -XX:LoopMaxUnroll=1 -XX:-LoopUnswitching -XX:+UseParallelGC TestLoadBypassesClassCast
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @summary Regression test for passing float args to a synchronized jni function.
*
*
* @run main/othervm/native compiler.floatingpoint.TestFloatSyncJNIArgs
* @run main/othervm/native/timeout=480 compiler.floatingpoint.TestFloatSyncJNIArgs
*/

package compiler.floatingpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @summary Test intrinsic for divideUnsigned() and remainderUnsigned() methods for Long
* @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="riscv64" | os.arch=="aarch64"
* @library /test/lib /
* @run driver compiler.intrinsics.TestLongUnsignedDivMod
* @run driver/timeout=480 compiler.intrinsics.TestLongUnsignedDivMod
*/

package compiler.intrinsics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run driver/timeout=180 compiler.jsr292.ContinuousCallSiteTargetChange
* @run driver/timeout=720 compiler.jsr292.ContinuousCallSiteTargetChange
*/

package compiler.jsr292;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* jdk.attach
* @requires vm.jvmti
*
* @run main/othervm -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles
* @run main/othervm/timeout=480 -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles
*/

package compiler.jsr292;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* jdk.internal.vm.ci/jdk.vm.ci.runtime
* jdk.attach
* java.base/jdk.internal.misc
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler -Djdk.attach.allowAttachSelf jdk.vm.ci.runtime.test.RedefineClassTest
* @run junit/othervm/timeout=480 -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler -Djdk.attach.allowAttachSelf jdk.vm.ci.runtime.test.RedefineClassTest
*/

package jdk.vm.ci.runtime.test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* java.base/jdk.internal.misc
* java.base/jdk.internal.vm
* java.base/sun.reflect.annotation
* @run junit/othervm/timeout=240 -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.runtime.test.TestResolvedJavaMethod
* @run junit/othervm/timeout=960 -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler jdk.vm.ci.runtime.test.TestResolvedJavaMethod
*/

package jdk.vm.ci.runtime.test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8284944
* @requires vm.compiler2.enabled
* @summary triggers the loop optimization phase `LoopOptsCount` many times
* @run main/othervm -Xcomp -XX:-PartialPeelLoop -XX:CompileCommand=compileonly,TestMaxLoopOptsCountReached::test TestMaxLoopOptsCountReached
* @run main/othervm/timeout=480 -Xcomp -XX:-PartialPeelLoop -XX:CompileCommand=compileonly,TestMaxLoopOptsCountReached::test TestMaxLoopOptsCountReached
*/

import java.lang.System.Logger.Level;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @test id=Xbatch
* @bug 8332920
* @summary Tests partial peeling at unsigned tests with limit being negative in exit tests "i >u limit".
* @run main/othervm -Xbatch -XX:-TieredCompilation
* @run main/othervm/timeout=480 -Xbatch -XX:-TieredCompilation
* -XX:CompileOnly=*TestPartialPeel*::original*,*TestPartialPeel*::test*
* compiler.loopopts.TestPartialPeelAtUnsignedTestsNegativeLimit
*/
Expand All @@ -34,7 +34,7 @@
* @test id=Xcomp-run-inline
* @bug 8332920
* @summary Tests partial peeling at unsigned tests with limit being negative in exit tests "i >u limit".
* @run main/othervm -Xcomp -XX:-TieredCompilation
* @run main/othervm/timeout=480 -Xcomp -XX:-TieredCompilation
* -XX:CompileOnly=*TestPartialPeel*::original*,*TestPartialPeel*::run*,*TestPartialPeel*::test*
* -XX:CompileCommand=inline,*TestPartialPeelAtUnsignedTestsNegativeLimit::test*
* -XX:CompileCommand=dontinline,*TestPartialPeelAtUnsignedTestsNegativeLimit::check
Expand All @@ -45,7 +45,7 @@
* @test id=Xcomp-compile-test
* @bug 8332920
* @summary Tests partial peeling at unsigned tests with limit being negative in exit tests "i >u limit".
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:CompileOnly=*TestPartialPeel*::original*,*TestPartialPeel*::test*
* @run main/othervm/timeout=480 -Xcomp -XX:-TieredCompilation -XX:CompileOnly=*TestPartialPeel*::original*,*TestPartialPeel*::test*
* compiler.loopopts.TestPartialPeelAtUnsignedTestsNegativeLimit
*/

Expand All @@ -55,7 +55,7 @@
* @requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)
* @summary Tests partial peeling at unsigned tests with limit being negative in exit tests "i >u limit".
* Only run this test with C2 since it is time-consuming and only tests a C2 issue.
* @run main compiler.loopopts.TestPartialPeelAtUnsignedTestsNegativeLimit
* @run main/timeout=480 compiler.loopopts.TestPartialPeelAtUnsignedTestsNegativeLimit
*/

package compiler.loopopts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test
* @library /test/lib /
* @run driver compiler.loopopts.superword.ProdRed_Double
* @run driver/timeout=480 compiler.loopopts.superword.ProdRed_Double
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test
* @library /test/lib /
* @run driver compiler.loopopts.superword.ProdRed_Float
* @run driver/timeout=480 compiler.loopopts.superword.ProdRed_Float
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : int test
* @library /test/lib /
* @run driver compiler.loopopts.superword.ProdRed_Int
* @run driver/timeout=480 compiler.loopopts.superword.ProdRed_Int
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8138583
* @summary Add C2 AArch64 Superword support for scalar sum reduction optimizations : double abs & neg test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRedAbsNeg_Double
* @run driver/timeout=480 compiler.loopopts.superword.SumRedAbsNeg_Double
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8138583
* @summary Add C2 AArch64 Superword support for scalar sum reduction optimizations : float abs & neg test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRedAbsNeg_Float
* @run driver/timeout=480 compiler.loopopts.superword.SumRedAbsNeg_Float
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8135028
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double sqrt test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRedSqrt_Double
* @run driver/timeout=480 compiler.loopopts.superword.SumRedSqrt_Double
*/


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRed_Double
* @run driver/timeout=480 compiler.loopopts.superword.SumRed_Double
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : float test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRed_Float
* @run driver/timeout=480 compiler.loopopts.superword.SumRed_Float
*/

package compiler.loopopts.superword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : int test
* @library /test/lib /
* @run driver compiler.loopopts.superword.SumRed_Int
* @run driver/timeout=480 compiler.loopopts.superword.SumRed_Int
*/

package compiler.loopopts.superword;
Expand Down
Loading