8315097: Rename createJavaProcessBuilder
Reviewed-by: lmesnik, dholmes, rriggs, stefank
This commit is contained in:
parent
957703b1f9
commit
d52a995f35
@ -69,7 +69,7 @@ public class JcstressRunner {
|
|||||||
}
|
}
|
||||||
Path out = Paths.get("jcstress.out").toAbsolutePath();
|
Path out = Paths.get("jcstress.out").toAbsolutePath();
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(getCmd(args))
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(getCmd(args))
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.redirectOutput(out.toFile());
|
.redirectOutput(out.toFile());
|
||||||
OutputAnalyzer oa = ProcessTools.executeProcess(pb);
|
OutputAnalyzer oa = ProcessTools.executeProcess(pb);
|
||||||
|
@ -109,7 +109,7 @@ public class TestGenerator {
|
|||||||
Path output;
|
Path output;
|
||||||
try {
|
try {
|
||||||
output = Files.createTempFile("jcstress", ".out");
|
output = Files.createTempFile("jcstress", ".out");
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-jar",
|
"-jar",
|
||||||
path.toAbsolutePath().toString(),
|
path.toAbsolutePath().toString(),
|
||||||
"-l");
|
"-l");
|
||||||
|
@ -48,7 +48,7 @@ public class Scimark {
|
|||||||
|
|
||||||
System.setProperty("test.noclasspath", "true");
|
System.setProperty("test.noclasspath", "true");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(ProcessTools.createTestJvm(
|
OutputAnalyzer output = new OutputAnalyzer(ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-cp", artifacts.get("gov.nist.math.scimark-2.0").toString(),
|
"-cp", artifacts.get("gov.nist.math.scimark-2.0").toString(),
|
||||||
"jnt.scimark2.commandline", "-large")
|
"jnt.scimark2.commandline", "-large")
|
||||||
.start());
|
.start());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -190,7 +190,7 @@ public class CheckCICompilerCount {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -338,7 +338,7 @@ public class CheckCompileThresholdScaling {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2022, Red Hat, Inc. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -61,7 +61,7 @@ public class TestCodeEntryAlignment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -62,14 +62,14 @@ public class TestOptoLoopAlignment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldNotHaveExitValue(0);
|
output.shouldNotHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
|
* Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -51,7 +51,7 @@ public class TestPrintOptoAssemblyLineNumbers {
|
|||||||
CheckC2OptoAssembly.class.getName()
|
CheckC2OptoAssembly.class.getName()
|
||||||
};
|
};
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
|
OutputAnalyzer oa = new OutputAnalyzer(pb.start());
|
||||||
oa.shouldHaveExitValue(0);
|
oa.shouldHaveExitValue(0);
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public class TestStressArrayCopy {
|
|||||||
for (String className : classNames) {
|
for (String className : classNames) {
|
||||||
// Start a new job
|
// Start a new job
|
||||||
{
|
{
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(mix(c, "-Xmx256m", className));
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(mix(c, "-Xmx256m", className));
|
||||||
Process p = pb.start();
|
Process p = pb.start();
|
||||||
OutputAnalyzer oa = new OutputAnalyzer(p);
|
OutputAnalyzer oa = new OutputAnalyzer(p);
|
||||||
forks.add(new Fork(p, oa));
|
forks.add(new Fork(p, oa));
|
||||||
|
@ -65,14 +65,14 @@ public class BlackholeExistingIntrinsicWarningTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -65,14 +65,14 @@ public class BlackholeExperimentalUnlockTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -134,7 +134,7 @@ public class BlackholeIntrinsicTest {
|
|||||||
cmdline.add("compiler.blackhole.BlackholeIntrinsicTest");
|
cmdline.add("compiler.blackhole.BlackholeIntrinsicTest");
|
||||||
cmdline.add(test);
|
cmdline.add(test);
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.stderrShouldBeEmpty();
|
output.stderrShouldBeEmpty();
|
||||||
|
@ -64,14 +64,14 @@ public class BlackholeNonEmptyWarningTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -64,14 +64,14 @@ public class BlackholeNonStaticWarningTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -64,14 +64,14 @@ public class BlackholeNonVoidWarningTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldFail(String... args) throws IOException {
|
public static void shouldFail(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldContain(MSG);
|
output.shouldContain(MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shouldPass(String... args) throws IOException {
|
public static void shouldPass(String... args) throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmdline(args));
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmdline(args));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
output.shouldNotContain(MSG);
|
output.shouldNotContain(MSG);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -54,7 +54,7 @@ public class TestRangeCheckEliminated {
|
|||||||
test_constant_array.class.getName()
|
test_constant_array.class.getName()
|
||||||
};
|
};
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
String output = new OutputAnalyzer(pb.start()).getOutput();
|
String output = new OutputAnalyzer(pb.start()).getOutput();
|
||||||
// should have 2 "can be fully eliminated"
|
// should have 2 "can be fully eliminated"
|
||||||
System.out.println(output);
|
System.out.println(output);
|
||||||
@ -74,7 +74,7 @@ public class TestRangeCheckEliminated {
|
|||||||
test_multi_constant_array.class.getName()
|
test_multi_constant_array.class.getName()
|
||||||
};
|
};
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
output = new OutputAnalyzer(pb.start()).getOutput();
|
output = new OutputAnalyzer(pb.start()).getOutput();
|
||||||
// should have 1 "can be fully eliminated"
|
// should have 1 "can be fully eliminated"
|
||||||
System.out.println(output);
|
System.out.println(output);
|
||||||
@ -94,7 +94,7 @@ public class TestRangeCheckEliminated {
|
|||||||
test_multi_new_array.class.getName()
|
test_multi_new_array.class.getName()
|
||||||
};
|
};
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
output = new OutputAnalyzer(pb.start()).getOutput();
|
output = new OutputAnalyzer(pb.start()).getOutput();
|
||||||
// should have 2 "can be fully eliminated"
|
// should have 2 "can be fully eliminated"
|
||||||
System.out.println(output);
|
System.out.println(output);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,7 +49,7 @@ public class TestBit {
|
|||||||
"-XX:CompileCommand=compileonly," + className + "::tst*",
|
"-XX:CompileCommand=compileonly," + className + "::tst*",
|
||||||
className, testName};
|
className, testName};
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
String expectedTestBitInstruction =
|
String expectedTestBitInstruction =
|
||||||
|
@ -95,7 +95,7 @@ public class TestFarJump {
|
|||||||
"-XX:+PrintAssembly",
|
"-XX:+PrintAssembly",
|
||||||
className};
|
className};
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
List<String> lines = output.asLines();
|
List<String> lines = output.asLines();
|
||||||
|
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright (c) 2020, Arm Limited. All rights reserved.
|
* Copyright (c) 2020, Arm Limited. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
* accompanied this code).
|
* accompanied this code).
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License version
|
* You should have received a copy of the GNU General Public License version
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
* questions.
|
* questions.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
@ -79,7 +79,7 @@ public class TestSVEWithJNI {
|
|||||||
Collections.addAll(vmopts, "-Dtest.jdk=" + testjdkPath);
|
Collections.addAll(vmopts, "-Dtest.jdk=" + testjdkPath);
|
||||||
Collections.addAll(vmopts, args);
|
Collections.addAll(vmopts, args);
|
||||||
Collections.addAll(vmopts, TestSVEWithJNI.class.getName(), mode);
|
Collections.addAll(vmopts, TestSVEWithJNI.class.getName(), mode);
|
||||||
return ProcessTools.createJavaProcessBuilder(vmopts.toArray(new String[vmopts.size()]));
|
return ProcessTools.createLimitedTestJavaProcessBuilder(vmopts.toArray(new String[vmopts.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String [] args) throws Exception {
|
public static void main(String [] args) throws Exception {
|
||||||
|
@ -57,7 +57,7 @@ public class TestTrampoline {
|
|||||||
command.add("-XX:ReservedCodeCacheSize=130M");
|
command.add("-XX:ReservedCodeCacheSize=130M");
|
||||||
command.add("-XX:+SegmentedCodeCache");
|
command.add("-XX:+SegmentedCodeCache");
|
||||||
command.add(testClassName);
|
command.add(testClassName);
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(command);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(command);
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
analyzer.shouldHaveExitValue(0);
|
analyzer.shouldHaveExitValue(0);
|
||||||
System.out.println(analyzer.getOutput());
|
System.out.println(analyzer.getOutput());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -132,7 +132,7 @@ public class TestVolatiles {
|
|||||||
|
|
||||||
|
|
||||||
public void runtest(String classname, String testType, boolean useCompressedOops, String[] procArgs) throws Throwable {
|
public void runtest(String classname, String testType, boolean useCompressedOops, String[] procArgs) throws Throwable {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
output.stderrShouldBeEmptyIgnoreVMWarnings();
|
output.stderrShouldBeEmptyIgnoreVMWarnings();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -177,11 +177,11 @@ public abstract class CiReplayBase {
|
|||||||
options.add("'" + getTestClass() + "'");
|
options.add("'" + getTestClass() + "'");
|
||||||
crashOut = ProcessTools.executeProcess(
|
crashOut = ProcessTools.executeProcess(
|
||||||
CoreUtils.addCoreUlimitCommand(
|
CoreUtils.addCoreUlimitCommand(
|
||||||
ProcessTools.createTestJvm(options.toArray(new String[0]))));
|
ProcessTools.createTestJavaProcessBuilder(options.toArray(new String[0]))));
|
||||||
} else {
|
} else {
|
||||||
options.add("-XX:CompileOnly=" + getTestClass() + "::" + getTestMethod());
|
options.add("-XX:CompileOnly=" + getTestClass() + "::" + getTestMethod());
|
||||||
options.add(getTestClass());
|
options.add(getTestClass());
|
||||||
crashOut = ProcessTools.executeProcess(ProcessTools.createTestJvm(options));
|
crashOut = ProcessTools.executeProcess(ProcessTools.createTestJavaProcessBuilder(options));
|
||||||
}
|
}
|
||||||
crashOutputString = crashOut.getOutput();
|
crashOutputString = crashOut.getOutput();
|
||||||
Asserts.assertNotEquals(crashOut.getExitValue(), 0, "Crash JVM exits gracefully");
|
Asserts.assertNotEquals(crashOut.getExitValue(), 0, "Crash JVM exits gracefully");
|
||||||
@ -288,7 +288,7 @@ public abstract class CiReplayBase {
|
|||||||
|
|
||||||
private String[] getTestJvmCommandlineWithPrefix(String prefix, String... args) {
|
private String[] getTestJvmCommandlineWithPrefix(String prefix, String... args) {
|
||||||
try {
|
try {
|
||||||
String cmd = ProcessTools.getCommandLine(ProcessTools.createTestJvm(args));
|
String cmd = ProcessTools.getCommandLine(ProcessTools.createTestJavaProcessBuilder(args));
|
||||||
return new String[]{"sh", "-c", prefix
|
return new String[]{"sh", "-c", prefix
|
||||||
+ (Platform.isWindows() ? cmd.replace('\\', '/').replace(";", "\\;").replace("|", "\\|") : cmd)};
|
+ (Platform.isWindows() ? cmd.replace('\\', '/').replace(";", "\\;").replace("|", "\\|") : cmd)};
|
||||||
} catch(Throwable t) {
|
} catch(Throwable t) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -79,7 +79,7 @@ public abstract class DumpReplayBase extends CiReplayBase {
|
|||||||
options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::" + getTestMethod());
|
options.add("-XX:CompileCommand=compileonly," + getTestClass() + "::" + getTestMethod());
|
||||||
options.add("-Xbatch");
|
options.add("-Xbatch");
|
||||||
options.add(getTestClass());
|
options.add(getTestClass());
|
||||||
oa = ProcessTools.executeProcess(ProcessTools.createTestJvm(options));
|
oa = ProcessTools.executeProcess(ProcessTools.createTestJavaProcessBuilder(options));
|
||||||
Asserts.assertEquals(oa.getExitValue(), 0, "Crash JVM exits gracefully");
|
Asserts.assertEquals(oa.getExitValue(), 0, "Crash JVM exits gracefully");
|
||||||
replayFiles = Files.list(Paths.get("."))
|
replayFiles = Files.list(Paths.get("."))
|
||||||
.map(Path::toFile)
|
.map(Path::toFile)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -71,7 +71,7 @@ public class SABase extends CiReplayBase {
|
|||||||
}
|
}
|
||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
try {
|
try {
|
||||||
pb = ProcessTools.createTestJvm("--add-modules", "jdk.hotspot.agent",
|
pb = ProcessTools.createTestJavaProcessBuilder("--add-modules", "jdk.hotspot.agent",
|
||||||
"--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED",
|
"--add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED",
|
||||||
"sun.jvm.hotspot.CLHSDB", JDKToolFinder.getTestJDKTool("java"),
|
"sun.jvm.hotspot.CLHSDB", JDKToolFinder.getTestJDKTool("java"),
|
||||||
TEST_CORE_FILE_NAME);
|
TEST_CORE_FILE_NAME);
|
||||||
|
@ -54,7 +54,7 @@ public class TestInvalidReplayFile {
|
|||||||
w.flush();
|
w.flush();
|
||||||
w.close();
|
w.close();
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
"-Xmx100M",
|
"-Xmx100M",
|
||||||
"-XX:+ReplayCompiles", "-XX:ReplayDataFile=./bogus-replay-file.txt");
|
"-XX:+ReplayCompiles", "-XX:ReplayDataFile=./bogus-replay-file.txt");
|
||||||
|
@ -66,9 +66,9 @@ public class CheckCodeCacheInfo {
|
|||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
|
|
||||||
pb = ProcessTools.createTestJvm("-XX:+PrintCodeCache",
|
pb = ProcessTools.createTestJavaProcessBuilder("-XX:+PrintCodeCache",
|
||||||
"-XX:+Verbose",
|
"-XX:+Verbose",
|
||||||
"-version");
|
"-version");
|
||||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
out.stdoutShouldMatch(VERBOSE_REGEXP);
|
out.stdoutShouldMatch(VERBOSE_REGEXP);
|
||||||
|
@ -50,7 +50,7 @@ public class CheckLargePages {
|
|||||||
final boolean largePages = WHITE_BOX.getBooleanVMFlag("UseLargePages");
|
final boolean largePages = WHITE_BOX.getBooleanVMFlag("UseLargePages");
|
||||||
final long largePageSize = WHITE_BOX.getVMLargePageSize();
|
final long largePageSize = WHITE_BOX.getVMLargePageSize();
|
||||||
if (largePages && (largePageSize == 1024 * 1024 * 1024)) {
|
if (largePages && (largePageSize == 1024 * 1024 * 1024)) {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UseLargePages",
|
"-XX:+UseLargePages",
|
||||||
"-XX:+SegmentedCodeCache",
|
"-XX:+SegmentedCodeCache",
|
||||||
"-XX:InitialCodeCacheSize=2g",
|
"-XX:InitialCodeCacheSize=2g",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,8 +42,8 @@ public class CheckReservedInitialCodeCacheSizeArgOrder {
|
|||||||
ProcessBuilder pb1, pb2;
|
ProcessBuilder pb1, pb2;
|
||||||
OutputAnalyzer out1, out2;
|
OutputAnalyzer out1, out2;
|
||||||
|
|
||||||
pb1 = ProcessTools.createJavaProcessBuilder("-XX:InitialCodeCacheSize=4m", "-XX:ReservedCodeCacheSize=8m", "-version");
|
pb1 = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:InitialCodeCacheSize=4m", "-XX:ReservedCodeCacheSize=8m", "-version");
|
||||||
pb2 = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=8m", "-XX:InitialCodeCacheSize=4m", "-version");
|
pb2 = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:ReservedCodeCacheSize=8m", "-XX:InitialCodeCacheSize=4m", "-version");
|
||||||
|
|
||||||
out1 = new OutputAnalyzer(pb1.start());
|
out1 = new OutputAnalyzer(pb1.start());
|
||||||
out2 = new OutputAnalyzer(pb2.start());
|
out2 = new OutputAnalyzer(pb2.start());
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -89,80 +89,80 @@ public class CheckSegmentedCodeCache {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
|
|
||||||
// Disabled with ReservedCodeCacheSize < 240MB
|
// Disabled with ReservedCodeCacheSize < 240MB
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=239m",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:ReservedCodeCacheSize=239m",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifySegmentedCodeCache(pb, false);
|
verifySegmentedCodeCache(pb, false);
|
||||||
|
|
||||||
// Disabled without TieredCompilation
|
// Disabled without TieredCompilation
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:-TieredCompilation",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:-TieredCompilation",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifySegmentedCodeCache(pb, false);
|
verifySegmentedCodeCache(pb, false);
|
||||||
|
|
||||||
// Enabled with TieredCompilation and ReservedCodeCacheSize >= 240MB
|
// Enabled with TieredCompilation and ReservedCodeCacheSize >= 240MB
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+TieredCompilation",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+TieredCompilation",
|
||||||
"-XX:ReservedCodeCacheSize=240m",
|
"-XX:ReservedCodeCacheSize=240m",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifySegmentedCodeCache(pb, true);
|
verifySegmentedCodeCache(pb, true);
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+TieredCompilation",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+TieredCompilation",
|
||||||
"-XX:ReservedCodeCacheSize=400m",
|
"-XX:ReservedCodeCacheSize=400m",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifySegmentedCodeCache(pb, true);
|
verifySegmentedCodeCache(pb, true);
|
||||||
|
|
||||||
// Always enabled if SegmentedCodeCache is set
|
// Always enabled if SegmentedCodeCache is set
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-XX:-TieredCompilation",
|
"-XX:-TieredCompilation",
|
||||||
"-XX:ReservedCodeCacheSize=239m",
|
"-XX:ReservedCodeCacheSize=239m",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifySegmentedCodeCache(pb, true);
|
verifySegmentedCodeCache(pb, true);
|
||||||
|
|
||||||
// The profiled and non-profiled code heaps should not be available in
|
// The profiled and non-profiled code heaps should not be available in
|
||||||
// interpreter-only mode
|
// interpreter-only mode
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-Xint",
|
"-Xint",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED);
|
verifyCodeHeapNotExists(pb, PROFILED, NON_PROFILED);
|
||||||
|
|
||||||
// If we stop compilation at CompLevel_none or CompLevel_simple we
|
// If we stop compilation at CompLevel_none or CompLevel_simple we
|
||||||
// don't need a profiled code heap.
|
// don't need a profiled code heap.
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-XX:TieredStopAtLevel=0",
|
"-XX:TieredStopAtLevel=0",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifyCodeHeapNotExists(pb, PROFILED);
|
verifyCodeHeapNotExists(pb, PROFILED);
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-XX:TieredStopAtLevel=1",
|
"-XX:TieredStopAtLevel=1",
|
||||||
"-XX:+PrintCodeCache",
|
"-XX:+PrintCodeCache",
|
||||||
"-version");
|
"-version");
|
||||||
verifyCodeHeapNotExists(pb, PROFILED);
|
verifyCodeHeapNotExists(pb, PROFILED);
|
||||||
|
|
||||||
// Fails with too small non-nmethod code heap size
|
// Fails with too small non-nmethod code heap size
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:NonNMethodCodeHeapSize=100K",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:NonNMethodCodeHeapSize=100K",
|
||||||
"-version");
|
"-version");
|
||||||
failsWith(pb, "Invalid NonNMethodCodeHeapSize");
|
failsWith(pb, "Invalid NonNMethodCodeHeapSize");
|
||||||
|
|
||||||
// Fails if code heap sizes do not add up
|
// Fails if code heap sizes do not add up
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-XX:ReservedCodeCacheSize=10M",
|
"-XX:ReservedCodeCacheSize=10M",
|
||||||
"-XX:NonNMethodCodeHeapSize=5M",
|
"-XX:NonNMethodCodeHeapSize=5M",
|
||||||
"-XX:ProfiledCodeHeapSize=5M",
|
"-XX:ProfiledCodeHeapSize=5M",
|
||||||
"-XX:NonProfiledCodeHeapSize=5M",
|
"-XX:NonProfiledCodeHeapSize=5M",
|
||||||
"-version");
|
"-version");
|
||||||
failsWith(pb, "Invalid code heap sizes");
|
failsWith(pb, "Invalid code heap sizes");
|
||||||
|
|
||||||
// Fails if not enough space for VM internal code
|
// Fails if not enough space for VM internal code
|
||||||
long minUseSpace = WHITE_BOX.getUintxVMFlag("CodeCacheMinimumUseSpace");
|
long minUseSpace = WHITE_BOX.getUintxVMFlag("CodeCacheMinimumUseSpace");
|
||||||
// minimum size: CodeCacheMinimumUseSpace DEBUG_ONLY(* 3)
|
// minimum size: CodeCacheMinimumUseSpace DEBUG_ONLY(* 3)
|
||||||
long minSize = (Platform.isDebugBuild() ? 3 : 1) * minUseSpace;
|
long minSize = (Platform.isDebugBuild() ? 3 : 1) * minUseSpace;
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
||||||
"-XX:ReservedCodeCacheSize=" + minSize,
|
"-XX:ReservedCodeCacheSize=" + minSize,
|
||||||
"-XX:InitialCodeCacheSize=100K",
|
"-XX:InitialCodeCacheSize=100K",
|
||||||
"-version");
|
"-version");
|
||||||
failsWith(pb, "Not enough space in non-nmethod code heap to run VM");
|
failsWith(pb, "Not enough space in non-nmethod code heap to run VM");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -41,7 +41,7 @@ public class CheckUpperLimit {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=2049m", "-version");
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:ReservedCodeCacheSize=2049m", "-version");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldContain("Invalid ReservedCodeCacheSize=");
|
out.shouldContain("Invalid ReservedCodeCacheSize=");
|
||||||
out.shouldHaveExitValue(1);
|
out.shouldHaveExitValue(1);
|
||||||
|
@ -63,7 +63,7 @@ public class CodeCacheFullCountTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void runTest() throws Throwable {
|
public static void runTest() throws Throwable {
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-XX:ReservedCodeCacheSize=2496k", "-XX:-UseCodeCacheFlushing", "-XX:-MethodFlushing", "CodeCacheFullCountTest", "WasteCodeCache");
|
"-XX:ReservedCodeCacheSize=2496k", "-XX:-UseCodeCacheFlushing", "-XX:-MethodFlushing", "CodeCacheFullCountTest", "WasteCodeCache");
|
||||||
OutputAnalyzer oa = ProcessTools.executeProcess(pb);
|
OutputAnalyzer oa = ProcessTools.executeProcess(pb);
|
||||||
// Ignore adapter creation failures
|
// Ignore adapter creation failures
|
||||||
|
@ -39,7 +39,7 @@ import jdk.test.lib.process.ProcessTools;
|
|||||||
|
|
||||||
public class TestConflictInlineCommands {
|
public class TestConflictInlineCommands {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:CompileCommand=inline,*TestConflictInlineCommands::caller",
|
"-XX:CompileCommand=inline,*TestConflictInlineCommands::caller",
|
||||||
"-XX:CompileCommand=dontinline,*TestConflictInlineCommands::caller",
|
"-XX:CompileCommand=dontinline,*TestConflictInlineCommands::caller",
|
||||||
"-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly,*Launcher::main",
|
"-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly,*Launcher::main",
|
||||||
@ -51,7 +51,7 @@ public class TestConflictInlineCommands {
|
|||||||
analyzer.shouldContain("disallowed by CompileCommand");
|
analyzer.shouldContain("disallowed by CompileCommand");
|
||||||
analyzer.shouldNotContain("force inline by CompileCommand");
|
analyzer.shouldNotContain("force inline by CompileCommand");
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-Xbatch",
|
"-Xbatch",
|
||||||
"-XX:CompileCommand=dontinline,*TestConflictInlineCommands::*caller",
|
"-XX:CompileCommand=dontinline,*TestConflictInlineCommands::*caller",
|
||||||
"-XX:CompileCommand=inline,*TestConflictInlineCommands::caller",
|
"-XX:CompileCommand=inline,*TestConflictInlineCommands::caller",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -41,7 +41,7 @@ public class RestoreMXCSR {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:+RestoreMXCSROnJNICalls", "-version");
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+RestoreMXCSROnJNICalls", "-version");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -58,7 +58,7 @@ public class TestGenerateStressSeed {
|
|||||||
"-Xcomp", "-XX:-TieredCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
"-Xcomp", "-XX:-TieredCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||||
"-XX:CompileOnly=" + className + "::sum", "-XX:+" + stressOpt,
|
"-XX:CompileOnly=" + className + "::sum", "-XX:+" + stressOpt,
|
||||||
"-XX:+LogCompilation", "-XX:LogFile=" + log, className, "10"};
|
"-XX:+LogCompilation", "-XX:LogFile=" + log, className, "10"};
|
||||||
new OutputAnalyzer(ProcessTools.createJavaProcessBuilder(procArgs).start())
|
new OutputAnalyzer(ProcessTools.createLimitedTestJavaProcessBuilder(procArgs).start())
|
||||||
.shouldHaveExitValue(0);
|
.shouldHaveExitValue(0);
|
||||||
new OutputAnalyzer(Paths.get(log))
|
new OutputAnalyzer(Paths.get(log))
|
||||||
.shouldContain("stress_test seed");
|
.shouldContain("stress_test seed");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -48,7 +48,7 @@ public class TestStressCM {
|
|||||||
"-XX:CompileOnly=" + className + "::sum",
|
"-XX:CompileOnly=" + className + "::sum",
|
||||||
"-XX:+TraceOptoPipelining", "-XX:+" + stressOpt,
|
"-XX:+TraceOptoPipelining", "-XX:+" + stressOpt,
|
||||||
"-XX:StressSeed=" + stressSeed, className, "10"};
|
"-XX:StressSeed=" + stressSeed, className, "10"};
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
// Extract the trace of our method (the last one after those of all
|
// Extract the trace of our method (the last one after those of all
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -48,7 +48,7 @@ public class TestStressIGVNAndCCP {
|
|||||||
"-XX:CompileOnly=" + className + "::sum", "-XX:+" + traceOption,
|
"-XX:CompileOnly=" + className + "::sum", "-XX:+" + traceOption,
|
||||||
"-XX:+" + stressOption, "-XX:StressSeed=" + stressSeed,
|
"-XX:+" + stressOption, "-XX:StressSeed=" + stressSeed,
|
||||||
className, "10"};
|
className, "10"};
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
|
||||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
return out.getStdout();
|
return out.getStdout();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,7 +42,7 @@ public class VerifyAdapterSharing {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-Xcomp", "-XX:+IgnoreUnrecognizedVMOptions",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xcomp", "-XX:+IgnoreUnrecognizedVMOptions",
|
||||||
"-XX:+VerifyAdapterSharing", "-version");
|
"-XX:+VerifyAdapterSharing", "-version");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,7 +39,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
public class TestIterativeEA {
|
public class TestIterativeEA {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-server", "-XX:-TieredCompilation", "-Xbatch", "-XX:+PrintEliminateAllocations",
|
"-server", "-XX:-TieredCompilation", "-Xbatch", "-XX:+PrintEliminateAllocations",
|
||||||
Launcher.class.getName());
|
Launcher.class.getName());
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -38,7 +38,7 @@ import jdk.test.lib.process.ProcessTools;
|
|||||||
|
|
||||||
public class InlineAccessors {
|
public class InlineAccessors {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-server", "-XX:-TieredCompilation", "-Xbatch",
|
"-server", "-XX:-TieredCompilation", "-Xbatch",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -40,7 +40,7 @@ import jdk.test.lib.process.ProcessTools;
|
|||||||
public class PrintInlining {
|
public class PrintInlining {
|
||||||
|
|
||||||
static void test(String option) throws Exception {
|
static void test(String option) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-server", "-XX:-TieredCompilation", "-Xbatch", "-XX:-UseOnStackReplacement",
|
"-server", "-XX:-TieredCompilation", "-Xbatch", "-XX:-UseOnStackReplacement",
|
||||||
"-XX:CompileCommand=dontinline,*::bar",
|
"-XX:CompileCommand=dontinline,*::bar",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,7 +42,7 @@ import java.io.IOException;
|
|||||||
public class ResolvedClassTest {
|
public class ResolvedClassTest {
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
static void testStatic() throws IOException {
|
static void testStatic() throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
||||||
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestStatic.class.getName() + "::test",
|
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestStatic.class.getName() + "::test",
|
||||||
@ -78,7 +78,7 @@ public class ResolvedClassTest {
|
|||||||
|
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
static void testStaticInit() throws IOException {
|
static void testStaticInit() throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
||||||
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestStaticInit.class.getName() + "::test",
|
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestStaticInit.class.getName() + "::test",
|
||||||
@ -115,7 +115,7 @@ public class ResolvedClassTest {
|
|||||||
|
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
static void testIndy() throws IOException {
|
static void testIndy() throws IOException {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
||||||
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestIndy.class.getName() + "::test",
|
"-Xbatch", "-XX:CompileCommand=quiet", "-XX:CompileCommand=compileonly," + TestIndy.class.getName() + "::test",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2021, Red Hat, Inc. All rights reserved.
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -127,7 +127,7 @@ public class TestChaCha20 {
|
|||||||
for (String className : classNames) {
|
for (String className : classNames) {
|
||||||
// Start a new job
|
// Start a new job
|
||||||
{
|
{
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
mix(c, "-Xmx256m", className));
|
mix(c, "-Xmx256m", className));
|
||||||
Process p = pb.start();
|
Process p = pb.start();
|
||||||
OutputAnalyzer oa = new OutputAnalyzer(p);
|
OutputAnalyzer oa = new OutputAnalyzer(p);
|
||||||
|
@ -61,7 +61,7 @@ public class ContinuousCallSiteTargetChange {
|
|||||||
argsList.add(test.getName());
|
argsList.add(test.getName());
|
||||||
argsList.add(Integer.toString(ITERATIONS));
|
argsList.add(Integer.toString(ITERATIONS));
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(argsList);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(argsList);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -47,7 +47,7 @@ import static jdk.test.lib.Asserts.assertEquals;
|
|||||||
|
|
||||||
public class MHInlineTest {
|
public class MHInlineTest {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:-TieredCompilation", "-Xbatch",
|
"-XX:-TieredCompilation", "-Xbatch",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -43,7 +43,7 @@ import java.lang.invoke.MethodType;
|
|||||||
|
|
||||||
public class PollutedTrapCounts {
|
public class PollutedTrapCounts {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions",
|
"-XX:+IgnoreUnrecognizedVMOptions",
|
||||||
"-XX:-TieredCompilation", "-Xbatch",
|
"-XX:-TieredCompilation", "-Xbatch",
|
||||||
"-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10",
|
"-XX:PerBytecodeRecompilationCutoff=10", "-XX:PerMethodRecompilationCutoff=10",
|
||||||
|
@ -84,7 +84,7 @@ public class TestEnableJVMCIProduct {
|
|||||||
String[] flags = {"-XX:+EnableJVMCIProduct", "-XX:+UseGraalJIT"};
|
String[] flags = {"-XX:+EnableJVMCIProduct", "-XX:+UseGraalJIT"};
|
||||||
String cwd = System.getProperty("user.dir");
|
String cwd = System.getProperty("user.dir");
|
||||||
for (String flag : flags) {
|
for (String flag : flags) {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions", flag, "-XX:-UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions", flag, "-XX:-UnlockExperimentalVMOptions",
|
||||||
explicitFlag,
|
explicitFlag,
|
||||||
"-XX:+PrintFlagsFinal",
|
"-XX:+PrintFlagsFinal",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -38,7 +38,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
public class TestInvalidJVMCIOption {
|
public class TestInvalidJVMCIOption {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+EagerJVMCI",
|
"-XX:+EagerJVMCI",
|
||||||
"-XX:+UseJVMCICompiler",
|
"-XX:+UseJVMCICompiler",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,7 +42,7 @@ public class TestJVMCIPrintProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void test(String enableFlag) throws Exception {
|
static void test(String enableFlag) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
enableFlag, "-Djvmci.Compiler=null",
|
enableFlag, "-Djvmci.Compiler=null",
|
||||||
"-XX:+JVMCIPrintProperties");
|
"-XX:+JVMCIPrintProperties");
|
||||||
|
@ -45,7 +45,7 @@ public class TestJVMCISavedProperties {
|
|||||||
System.out.println("DONE IN MAIN");
|
System.out.println("DONE IN MAIN");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+EagerJVMCI",
|
"-XX:+EagerJVMCI",
|
||||||
"-XX:+UseJVMCICompiler",
|
"-XX:+UseJVMCICompiler",
|
||||||
|
@ -83,7 +83,7 @@ public class TestUncaughtErrorInCompileMethod extends JVMCIServiceLocator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void testSubprocess(boolean fatalError) throws Exception {
|
static void testSubprocess(boolean fatalError) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+UseJVMCICompiler", "-Djvmci.Compiler=ErrorCompiler",
|
"-XX:+UseJVMCICompiler", "-Djvmci.Compiler=ErrorCompiler",
|
||||||
"-XX:-TieredCompilation",
|
"-XX:-TieredCompilation",
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -63,7 +63,7 @@ public class GetFlagValueTest {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+EnableJVMCI",
|
"-XX:+EnableJVMCI",
|
||||||
"-XX:+PrintFlagsFinal",
|
"-XX:+PrintFlagsFinal",
|
||||||
|
@ -167,7 +167,7 @@ public class TestHotSpotJVMCIRuntime {
|
|||||||
}
|
}
|
||||||
String[] names = {"translate", "attachCurrentThread", "registerNativeMethods"};
|
String[] names = {"translate", "attachCurrentThread", "registerNativeMethods"};
|
||||||
for (String name : names) {
|
for (String name : names) {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+EnableJVMCI",
|
"-XX:+EnableJVMCI",
|
||||||
"-XX:-UseJVMCICompiler",
|
"-XX:-UseJVMCICompiler",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -146,7 +146,7 @@ public class TestVMProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void start() {
|
private void start() {
|
||||||
ProcessBuilder process = ProcessTools.createJavaProcessBuilder(cmds);
|
ProcessBuilder process = ProcessTools.createLimitedTestJavaProcessBuilder(cmds);
|
||||||
try {
|
try {
|
||||||
// Calls 'main' of TestVM to run all specified tests with commands 'cmds'.
|
// Calls 'main' of TestVM to run all specified tests with commands 'cmds'.
|
||||||
// Use executeProcess instead of executeTestJvm as we have already added the JTreg VM and
|
// Use executeProcess instead of executeTestJvm as we have already added the JTreg VM and
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -41,7 +41,7 @@ public class TestLinkageErrorInGenerateOopMap {
|
|||||||
public static void main(String args[]) throws Exception {
|
public static void main(String args[]) throws Exception {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
// Spawn new VM instance to execute test
|
// Spawn new VM instance to execute test
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
"-XX:-BytecodeVerificationRemote",
|
"-XX:-BytecodeVerificationRemote",
|
||||||
"-XX:-BytecodeVerificationLocal",
|
"-XX:-BytecodeVerificationLocal",
|
||||||
|
@ -37,7 +37,7 @@ import jdk.test.lib.process.ProcessTools;
|
|||||||
public class CheckLoopStripMiningIterShortLoop {
|
public class CheckLoopStripMiningIterShortLoop {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", "-XX:+PrintFlagsFinal", "-version");
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+UseG1GC", "-XX:+PrintFlagsFinal", "-version");
|
||||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public class TestNoWarningLoopStripMiningIterSet {
|
|||||||
System.arraycopy(args, 0, cmds, 1, args.length);
|
System.arraycopy(args, 0, cmds, 1, args.length);
|
||||||
cmds[args.length + 1] = "-XX:+PrintFlagsFinal";
|
cmds[args.length + 1] = "-XX:+PrintFlagsFinal";
|
||||||
cmds[args.length + 2] = "-version";
|
cmds[args.length + 2] = "-version";
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmds);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(cmds);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2016 Azul Systems, Inc. All Rights Reserved.
|
* Copyright 2016 Azul Systems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -43,7 +43,7 @@ public class TestOnSpinWait {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// Test C2 compiler
|
// Test C2 compiler
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:-TieredCompilation", "-Xbatch",
|
"-XX:-TieredCompilation", "-Xbatch",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||||
|
@ -71,7 +71,7 @@ public class TestOnSpinWaitAArch64 {
|
|||||||
command.add("-XX:CompileCommand=compileonly," + Launcher.class.getName() + "::" + "test");
|
command.add("-XX:CompileCommand=compileonly," + Launcher.class.getName() + "::" + "test");
|
||||||
command.add(Launcher.class.getName());
|
command.add(Launcher.class.getName());
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(command);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(command);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -87,9 +87,9 @@ public class TestOnSpinWaitAArch64DefaultFlags {
|
|||||||
final String cpuModel = cpuFeatures.get(0);
|
final String cpuModel = cpuFeatures.get(0);
|
||||||
|
|
||||||
if (isCPUModelNeoverseN1(cpuModel)) {
|
if (isCPUModelNeoverseN1(cpuModel)) {
|
||||||
checkFinalFlagsEqualTo(ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintFlagsFinal", "-version"),
|
checkFinalFlagsEqualTo(ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintFlagsFinal", "-version"),
|
||||||
"isb", "1");
|
"isb", "1");
|
||||||
checkFinalFlagsEqualTo(ProcessTools.createJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions", "-XX:OnSpinWaitInstCount=2", "-XX:+PrintFlagsFinal", "-version"),
|
checkFinalFlagsEqualTo(ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+UnlockDiagnosticVMOptions", "-XX:OnSpinWaitInstCount=2", "-XX:+PrintFlagsFinal", "-version"),
|
||||||
"isb", "2");
|
"isb", "2");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Skip because no defaults for CPU model: " + cpuModel);
|
System.out.println("Skip because no defaults for CPU model: " + cpuModel);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* Copyright 2016 Azul Systems, Inc. All Rights Reserved.
|
* Copyright 2016 Azul Systems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
@ -45,7 +45,7 @@ public class TestOnSpinWaitC1 {
|
|||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
|
||||||
// Test C1 compiler
|
// Test C1 compiler
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
"-XX:+IgnoreUnrecognizedVMOptions", "-showversion",
|
||||||
"-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
|
"-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-Xbatch",
|
||||||
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+PrintCompilation", "-XX:+UnlockDiagnosticVMOptions",
|
||||||
|
@ -54,7 +54,7 @@ public class TestOnSpinWaitNoneAArch64 {
|
|||||||
command.add(Launcher.class.getName());
|
command.add(Launcher.class.getName());
|
||||||
|
|
||||||
// Test C2 compiler
|
// Test C2 compiler
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(command);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(command);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class TestOnSpinWaitRISCV64 {
|
|||||||
command.add("-Xbatch");
|
command.add("-Xbatch");
|
||||||
command.add(Launcher.class.getName());
|
command.add(Launcher.class.getName());
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(command);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(command);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ public class CheckCompileCommandOption {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
for (String expected_output : expected_outputs) {
|
for (String expected_output : expected_outputs) {
|
||||||
@ -266,7 +266,7 @@ public class CheckCompileCommandOption {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
out.shouldContain("CompileCommand: An error occurred during parsing");
|
out.shouldContain("CompileCommand: An error occurred during parsing");
|
||||||
@ -277,7 +277,7 @@ public class CheckCompileCommandOption {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
for (String expected_output : expected_outputs) {
|
for (String expected_output : expected_outputs) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -56,7 +56,7 @@ public class TestCompileCommand {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
for (String expected_output : expected_outputs) {
|
for (String expected_output : expected_outputs) {
|
||||||
|
@ -83,7 +83,7 @@ public class TestInvalidCompileCommand {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder(arguments);
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder(arguments);
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
for (String expected_output : expected_outputs) {
|
for (String expected_output : expected_outputs) {
|
||||||
|
@ -81,7 +81,7 @@ public class TestRangeCheckHoistingScaledIV {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"--add-modules", "jdk.incubator.vector",
|
"--add-modules", "jdk.incubator.vector",
|
||||||
"-Xbatch", "-XX:+TraceLoopPredicate", Launcher.class.getName());
|
"-Xbatch", "-XX:+TraceLoopPredicate", Launcher.class.getName());
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -30,7 +30,7 @@ public class Driver8015436 {
|
|||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
OutputAnalyzer oa;
|
OutputAnalyzer oa;
|
||||||
try {
|
try {
|
||||||
oa = ProcessTools.executeProcess(ProcessTools.createTestJvm(
|
oa = ProcessTools.executeProcess(ProcessTools.createTestJavaProcessBuilder(
|
||||||
Test8015436.class.getName()));
|
Test8015436.class.getName()));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new Error("TESTBUG: exception while running child process: " + ex, ex);
|
throw new Error("TESTBUG: exception while running child process: " + ex, ex);
|
||||||
|
@ -67,7 +67,7 @@ public class SharedStubToInterpTest {
|
|||||||
command.add("-XX:CompileCommand=dontinline," + testClassName + "::" + "log02");
|
command.add("-XX:CompileCommand=dontinline," + testClassName + "::" + "log02");
|
||||||
command.add(testClassName);
|
command.add(testClassName);
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(command);
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(command);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class SharedTrampolineTest {
|
|||||||
command.add(testClassName);
|
command.add(testClassName);
|
||||||
command.add("a");
|
command.add("a");
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(command);
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(command);
|
||||||
|
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,7 +42,7 @@ import jdk.test.lib.process.ProcessTools;
|
|||||||
public class NumCompilerThreadsCheck {
|
public class NumCompilerThreadsCheck {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:CICompilerCount=-1");
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:CICompilerCount=-1");
|
||||||
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
String expectedOutput = "outside the allowed range";
|
String expectedOutput = "outside the allowed range";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -44,10 +44,10 @@ import static jdk.test.lib.Asserts.assertTrue;
|
|||||||
|
|
||||||
public class SmallCodeCacheStartup {
|
public class SmallCodeCacheStartup {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m",
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m",
|
||||||
"-XX:CICompilerCount=64",
|
"-XX:CICompilerCount=64",
|
||||||
"-Xcomp",
|
"-Xcomp",
|
||||||
"-version");
|
"-version");
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
|
||||||
try {
|
try {
|
||||||
analyzer.shouldHaveExitValue(0);
|
analyzer.shouldHaveExitValue(0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2021, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -43,12 +43,12 @@ public class StartupOutput {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:+DisplayVMOutputToStdout", "-version");
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xint", "-XX:+DisplayVMOutputToStdout", "-version");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
out.shouldNotContain("no space to run compilers");
|
out.shouldNotContain("no space to run compilers");
|
||||||
out.shouldHaveExitValue(0);
|
out.shouldHaveExitValue(0);
|
||||||
|
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:ReservedCodeCacheSize=1770K", "-XX:InitialCodeCacheSize=4K", "-version");
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xint", "-XX:ReservedCodeCacheSize=1770K", "-XX:InitialCodeCacheSize=4K", "-version");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
// The VM should not crash but may return an error message because we don't have enough space for adapters
|
// The VM should not crash but may return an error message because we don't have enough space for adapters
|
||||||
int exitCode = out.getExitValue();
|
int exitCode = out.getExitValue();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2016, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -63,7 +63,7 @@ public class RTMTestBase {
|
|||||||
public static OutputAnalyzer executeRTMTest(CompilableTest test,
|
public static OutputAnalyzer executeRTMTest(CompilableTest test,
|
||||||
String... options) throws Exception {
|
String... options) throws Exception {
|
||||||
ProcessBuilder processBuilder
|
ProcessBuilder processBuilder
|
||||||
= ProcessTools.createJavaProcessBuilder(
|
= ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
RTMTestBase.prepareTestOptions(test, options));
|
RTMTestBase.prepareTestOptions(test, options));
|
||||||
OutputAnalyzer outputAnalyzer
|
OutputAnalyzer outputAnalyzer
|
||||||
= new OutputAnalyzer(processBuilder.start());
|
= new OutputAnalyzer(processBuilder.start());
|
||||||
@ -83,7 +83,7 @@ public class RTMTestBase {
|
|||||||
public static OutputAnalyzer executeRTMTest(String logFileName,
|
public static OutputAnalyzer executeRTMTest(String logFileName,
|
||||||
CompilableTest test, String... options) throws Exception {
|
CompilableTest test, String... options) throws Exception {
|
||||||
ProcessBuilder processBuilder
|
ProcessBuilder processBuilder
|
||||||
= ProcessTools.createJavaProcessBuilder(
|
= ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
RTMTestBase.prepareTestOptions(logFileName, test, options));
|
RTMTestBase.prepareTestOptions(logFileName, test, options));
|
||||||
OutputAnalyzer outputAnalyzer
|
OutputAnalyzer outputAnalyzer
|
||||||
= new OutputAnalyzer(processBuilder.start());
|
= new OutputAnalyzer(processBuilder.start());
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -86,7 +86,7 @@ public class OffTest {
|
|||||||
OPTIONS[TYPE_PROFILE_INDEX] = typeProfileLevel;
|
OPTIONS[TYPE_PROFILE_INDEX] = typeProfileLevel;
|
||||||
OPTIONS[USE_TYPE_SPECULATION_INDEX] = useTypeSpeculation;
|
OPTIONS[USE_TYPE_SPECULATION_INDEX] = useTypeSpeculation;
|
||||||
OPTIONS[PROFILING_TYPE_INDEX] = type.name();
|
OPTIONS[PROFILING_TYPE_INDEX] = type.name();
|
||||||
ProcessBuilder processBuilder = ProcessTools.createTestJvm(OPTIONS);
|
ProcessBuilder processBuilder = ProcessTools.createTestJavaProcessBuilder(OPTIONS);
|
||||||
OutputAnalyzer outputAnalyzer = new OutputAnalyzer(processBuilder.start());
|
OutputAnalyzer outputAnalyzer = new OutputAnalyzer(processBuilder.start());
|
||||||
outputAnalyzer.shouldHaveExitValue(0);
|
outputAnalyzer.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -224,11 +224,11 @@ public class TestBufferVectorization {
|
|||||||
ProcessBuilder pb;
|
ProcessBuilder pb;
|
||||||
OutputAnalyzer out;
|
OutputAnalyzer out;
|
||||||
try {
|
try {
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-XX:-BackgroundCompilation",
|
pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:-BackgroundCompilation",
|
||||||
"-XX:+TraceNewVectors",
|
"-XX:+TraceNewVectors",
|
||||||
"compiler.vectorization.TestBufferVectorization",
|
"compiler.vectorization.TestBufferVectorization",
|
||||||
testName,
|
testName,
|
||||||
"run");
|
"run");
|
||||||
out = new OutputAnalyzer(pb.start());
|
out = new OutputAnalyzer(pb.start());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(" Exception launching Java process: " + e);
|
throw new RuntimeException(" Exception launching Java process: " + e);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -67,7 +67,7 @@ public class PlainRead {
|
|||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
WhiteBox wb = WhiteBox.getWhiteBox();
|
WhiteBox wb = WhiteBox.getWhiteBox();
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:os+container=trace", "-version");
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Xlog:os+container=trace", "-version");
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
if (wb.isContainerized()) {
|
if (wb.isContainerized()) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -66,7 +66,7 @@ public class TestAgeOutput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void runTest(String gcArg) throws Exception {
|
public static void runTest(String gcArg) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-Xbootclasspath/a:.",
|
"-Xbootclasspath/a:.",
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -36,7 +36,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
|
|
||||||
public class TestAllocateHeapAt {
|
public class TestAllocateHeapAt {
|
||||||
public static void main(String args[]) throws Exception {
|
public static void main(String args[]) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-XX:AllocateHeapAt=" + System.getProperty("test.dir", "."),
|
"-XX:AllocateHeapAt=" + System.getProperty("test.dir", "."),
|
||||||
"-Xlog:gc+heap=info",
|
"-Xlog:gc+heap=info",
|
||||||
"-Xmx32m",
|
"-Xmx32m",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -45,7 +45,7 @@ public class TestAllocateHeapAtError {
|
|||||||
f = new File(test_dir, UUID.randomUUID().toString());
|
f = new File(test_dir, UUID.randomUUID().toString());
|
||||||
} while(f.exists());
|
} while(f.exists());
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-XX:AllocateHeapAt=" + f.getName(),
|
"-XX:AllocateHeapAt=" + f.getName(),
|
||||||
"-Xlog:gc+heap=info",
|
"-Xlog:gc+heap=info",
|
||||||
"-Xmx32m",
|
"-Xmx32m",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -60,7 +60,7 @@ public class TestAllocateHeapAtMultiple {
|
|||||||
"-Xlog:gc+heap=info",
|
"-Xlog:gc+heap=info",
|
||||||
"-version"});
|
"-version"});
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(flags);
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(flags);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
System.out.println("Output:\n" + output.getOutput());
|
System.out.println("Output:\n" + output.getOutput());
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,7 +42,7 @@ public class TestCardTablePageCommits {
|
|||||||
// because of 8kB pages, assume 4 KB pages for all other CPUs.
|
// because of 8kB pages, assume 4 KB pages for all other CPUs.
|
||||||
String Xmx = "-Xmx4m";
|
String Xmx = "-Xmx4m";
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
Xmx,
|
Xmx,
|
||||||
"-XX:NativeMemoryTracking=detail",
|
"-XX:NativeMemoryTracking=detail",
|
||||||
"-XX:+UseParallelGC",
|
"-XX:+UseParallelGC",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -58,7 +58,7 @@ public class TestNumWorkerOutput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void runTest(String gcArg) throws Exception {
|
public static void runTest(String gcArg) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
"-Xbootclasspath/a:.",
|
"-Xbootclasspath/a:.",
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -48,7 +48,7 @@ public class TestPLABAdaptToMinTLABSize {
|
|||||||
Collections.addAll(testArguments, extraArgs);
|
Collections.addAll(testArguments, extraArgs);
|
||||||
testArguments.add("-version");
|
testArguments.add("-version");
|
||||||
|
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(testArguments);
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(testArguments);
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -96,7 +96,7 @@ public class TestSmallHeap {
|
|||||||
|
|
||||||
private static void verifySmallHeapSize(String gc, long expectedMaxHeap) throws Exception {
|
private static void verifySmallHeapSize(String gc, long expectedMaxHeap) throws Exception {
|
||||||
long minMaxHeap = 4 * 1024 * 1024;
|
long minMaxHeap = 4 * 1024 * 1024;
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||||
gc,
|
gc,
|
||||||
"-Xmx" + minMaxHeap,
|
"-Xmx" + minMaxHeap,
|
||||||
"-XX:+PrintFlagsFinal",
|
"-XX:+PrintFlagsFinal",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2020, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -37,7 +37,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
|
|
||||||
public class TestVerifyDuringStartup {
|
public class TestVerifyDuringStartup {
|
||||||
public static void main(String args[]) throws Exception {
|
public static void main(String args[]) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(
|
||||||
"-XX:-UseTLAB",
|
"-XX:-UseTLAB",
|
||||||
"-XX:+UnlockDiagnosticVMOptions",
|
"-XX:+UnlockDiagnosticVMOptions",
|
||||||
"-XX:+VerifyDuringStartup",
|
"-XX:+VerifyDuringStartup",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2020, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -57,7 +57,7 @@ public class TestVerifySilently {
|
|||||||
"-XX:+VerifyAfterGC",
|
"-XX:+VerifyAfterGC",
|
||||||
(verifySilently ? "-Xlog:gc":"-Xlog:gc+verify=debug"),
|
(verifySilently ? "-Xlog:gc":"-Xlog:gc+verify=debug"),
|
||||||
TestVerifySilentlyRunSystemGC.class.getName()});
|
TestVerifySilentlyRunSystemGC.class.getName()});
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(vmOpts);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(vmOpts);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
System.out.println("Output:\n" + output.getOutput());
|
System.out.println("Output:\n" + output.getOutput());
|
||||||
|
@ -59,7 +59,7 @@ public class TestVerifySubSet {
|
|||||||
"-Xlog:gc+verify=debug",
|
"-Xlog:gc+verify=debug",
|
||||||
"-XX:VerifySubSet="+subset,
|
"-XX:VerifySubSet="+subset,
|
||||||
TestVerifySubSetRunSystemGC.class.getName()});
|
TestVerifySubSetRunSystemGC.class.getName()});
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(vmOpts);
|
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(vmOpts);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
System.out.println("Output:\n" + output.getOutput());
|
System.out.println("Output:\n" + output.getOutput());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2019, 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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -66,19 +66,19 @@ public final class GCArguments {
|
|||||||
return augmented.toArray(new String[augmented.size()]);
|
return augmented.toArray(new String[augmented.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public ProcessBuilder createJavaProcessBuilder(List<String> arguments) {
|
static public ProcessBuilder createLimitedTestJavaProcessBuilder(List<String> arguments) {
|
||||||
return createJavaProcessBuilder(arguments.toArray(String[]::new));
|
return createLimitedTestJavaProcessBuilder(arguments.toArray(String[]::new));
|
||||||
}
|
}
|
||||||
|
|
||||||
static public ProcessBuilder createJavaProcessBuilder(String... arguments) {
|
static public ProcessBuilder createLimitedTestJavaProcessBuilder(String... arguments) {
|
||||||
return ProcessTools.createJavaProcessBuilder(withDefaults(arguments));
|
return ProcessTools.createLimitedTestJavaProcessBuilder(withDefaults(arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
static public ProcessBuilder createTestJvm(List<String> arguments) {
|
static public ProcessBuilder createTestJavaProcessBuilder(List<String> arguments) {
|
||||||
return createTestJvm(arguments.toArray(String[]::new));
|
return createTestJavaProcessBuilder(arguments.toArray(String[]::new));
|
||||||
}
|
}
|
||||||
|
|
||||||
static public ProcessBuilder createTestJvm(String... arguments) {
|
static public ProcessBuilder createTestJavaProcessBuilder(String... arguments) {
|
||||||
return ProcessTools.createTestJvm(withDefaults(arguments));
|
return ProcessTools.createTestJavaProcessBuilder(withDefaults(arguments));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ public class TestAggressiveHeap {
|
|||||||
" *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}";
|
" *bool +UseParallelGC *= *true +\\{product\\} *\\{command line\\}";
|
||||||
|
|
||||||
private static void testFlag() throws Exception {
|
private static void testFlag() throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(
|
||||||
option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version");
|
option, heapSizeOption, "-XX:+PrintFlagsFinal", "-version");
|
||||||
|
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
@ -51,7 +51,7 @@ public class TestCompressedClassFlags {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static OutputAnalyzer runJava(String ... args) throws Exception {
|
private static OutputAnalyzer runJava(String ... args) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(args);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(args);
|
||||||
return new OutputAnalyzer(pb.start());
|
return new OutputAnalyzer(pb.start());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,13 +40,13 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
public class TestDisableDefaultGC {
|
public class TestDisableDefaultGC {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// Start VM, disabling all possible default GCs
|
// Start VM, disabling all possible default GCs
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm("-XX:-UseSerialGC",
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder("-XX:-UseSerialGC",
|
||||||
"-XX:-UseParallelGC",
|
"-XX:-UseParallelGC",
|
||||||
"-XX:-UseG1GC",
|
"-XX:-UseG1GC",
|
||||||
"-XX:-UseZGC",
|
"-XX:-UseZGC",
|
||||||
"-XX:+UnlockExperimentalVMOptions",
|
"-XX:+UnlockExperimentalVMOptions",
|
||||||
"-XX:-UseShenandoahGC",
|
"-XX:-UseShenandoahGC",
|
||||||
"-version");
|
"-version");
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldMatch("Garbage collector not selected");
|
output.shouldMatch("Garbage collector not selected");
|
||||||
output.shouldHaveExitValue(1);
|
output.shouldHaveExitValue(1);
|
||||||
|
@ -78,7 +78,7 @@ public class TestG1ConcMarkStepDurationMillis {
|
|||||||
|
|
||||||
Collections.addAll(vmOpts, "-XX:+UseG1GC", "-XX:G1ConcMarkStepDurationMillis="+expectedValue, "-XX:+PrintFlagsFinal", "-version");
|
Collections.addAll(vmOpts, "-XX:+UseG1GC", "-XX:G1ConcMarkStepDurationMillis="+expectedValue, "-XX:+PrintFlagsFinal", "-version");
|
||||||
|
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(vmOpts);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(vmOpts);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
output.shouldHaveExitValue(expectedResult == PASS ? 0 : 1);
|
output.shouldHaveExitValue(expectedResult == PASS ? 0 : 1);
|
||||||
|
@ -69,7 +69,7 @@ public class TestG1ConcRefinementThreads {
|
|||||||
}
|
}
|
||||||
Collections.addAll(vmOpts, "-XX:+UseG1GC", "-XX:+PrintFlagsFinal", "-version");
|
Collections.addAll(vmOpts, "-XX:+UseG1GC", "-XX:+PrintFlagsFinal", "-version");
|
||||||
|
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(vmOpts);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(vmOpts);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
|
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
@ -53,7 +53,7 @@ public class TestG1HeapRegionSize {
|
|||||||
flagList.add("-XX:+PrintFlagsFinal");
|
flagList.add("-XX:+PrintFlagsFinal");
|
||||||
flagList.add("-version");
|
flagList.add("-version");
|
||||||
|
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(flagList);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(flagList);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(exitValue);
|
output.shouldHaveExitValue(exitValue);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ public class TestG1PercentageOptions {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private static void check(String flag, boolean is_valid) throws Exception {
|
private static void check(String flag, boolean is_valid) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm("-XX:+UseG1GC", flag, "-version");
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder("-XX:+UseG1GC", flag, "-version");
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
if (is_valid) {
|
if (is_valid) {
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
@ -48,7 +48,7 @@ public class TestG1RemSetFlags {
|
|||||||
flagList.add("-XX:+PrintFlagsFinal");
|
flagList.add("-XX:+PrintFlagsFinal");
|
||||||
flagList.add("-version");
|
flagList.add("-version");
|
||||||
|
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(flagList);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(flagList);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(exitValue);
|
output.shouldHaveExitValue(exitValue);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public class TestHeapFreeRatio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void testMinMaxFreeRatio(String min, String max, Validation type) throws Exception {
|
private static void testMinMaxFreeRatio(String min, String max, Validation type) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(
|
||||||
"-Xminf" + min,
|
"-Xminf" + min,
|
||||||
"-Xmaxf" + max,
|
"-Xmaxf" + max,
|
||||||
"-version");
|
"-version");
|
||||||
|
@ -41,7 +41,7 @@ import jdk.test.lib.process.OutputAnalyzer;
|
|||||||
public class TestInitialTenuringThreshold {
|
public class TestInitialTenuringThreshold {
|
||||||
|
|
||||||
public static void runWithThresholds(int initial, int max, boolean shouldfail) throws Exception {
|
public static void runWithThresholds(int initial, int max, boolean shouldfail) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(
|
||||||
"-XX:+UseParallelGC",
|
"-XX:+UseParallelGC",
|
||||||
"-XX:InitialTenuringThreshold=" + String.valueOf(initial),
|
"-XX:InitialTenuringThreshold=" + String.valueOf(initial),
|
||||||
"-XX:MaxTenuringThreshold=" + String.valueOf(max),
|
"-XX:MaxTenuringThreshold=" + String.valueOf(max),
|
||||||
@ -58,7 +58,7 @@ public class TestInitialTenuringThreshold {
|
|||||||
|
|
||||||
|
|
||||||
public static void main(String args[]) throws Exception {
|
public static void main(String args[]) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(
|
||||||
// some value below the default value of InitialTenuringThreshold of 7
|
// some value below the default value of InitialTenuringThreshold of 7
|
||||||
"-XX:+UseParallelGC",
|
"-XX:+UseParallelGC",
|
||||||
"-XX:MaxTenuringThreshold=1",
|
"-XX:MaxTenuringThreshold=1",
|
||||||
|
@ -115,7 +115,7 @@ class TestMaxHeapSizeTools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void getNewOldSize(String gcflag, long[] values) throws Exception {
|
private static void getNewOldSize(String gcflag, long[] values) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(gcflag,
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(gcflag,
|
||||||
"-XX:+PrintFlagsFinal", "-version");
|
"-XX:+PrintFlagsFinal", "-version");
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
@ -208,7 +208,7 @@ class TestMaxHeapSizeTools {
|
|||||||
finalargs.add(classname);
|
finalargs.add(classname);
|
||||||
finalargs.addAll(Arrays.asList(arguments));
|
finalargs.addAll(Arrays.asList(arguments));
|
||||||
|
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(finalargs.toArray(String[]::new));
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(finalargs.toArray(String[]::new));
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ class TestMaxHeapSizeTools {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void expect(String[] flags, boolean hasWarning, boolean hasError, int errorcode) throws Exception {
|
private static void expect(String[] flags, boolean hasWarning, boolean hasError, int errorcode) throws Exception {
|
||||||
ProcessBuilder pb = GCArguments.createTestJvm(flags);
|
ProcessBuilder pb = GCArguments.createTestJavaProcessBuilder(flags);
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
shouldContainOrNot(output, hasWarning, "Warning");
|
shouldContainOrNot(output, hasWarning, "Warning");
|
||||||
shouldContainOrNot(output, hasError, "Error");
|
shouldContainOrNot(output, hasError, "Error");
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -98,7 +98,7 @@ public class TestMaxMinHeapFreeRatioFlags {
|
|||||||
Boolean.toString(shrinkHeapInSteps)
|
Boolean.toString(shrinkHeapInSteps)
|
||||||
);
|
);
|
||||||
|
|
||||||
ProcessBuilder procBuilder = GCArguments.createJavaProcessBuilder(vmOptions);
|
ProcessBuilder procBuilder = GCArguments.createLimitedTestJavaProcessBuilder(vmOptions);
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(procBuilder.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(procBuilder.start());
|
||||||
analyzer.shouldHaveExitValue(0);
|
analyzer.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ public class TestMaxMinHeapFreeRatioFlags {
|
|||||||
"--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
|
"--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
|
||||||
"-version"
|
"-version"
|
||||||
);
|
);
|
||||||
ProcessBuilder procBuilder = GCArguments.createJavaProcessBuilder(vmOptions);
|
ProcessBuilder procBuilder = GCArguments.createLimitedTestJavaProcessBuilder(vmOptions);
|
||||||
OutputAnalyzer analyzer = new OutputAnalyzer(procBuilder.start());
|
OutputAnalyzer analyzer = new OutputAnalyzer(procBuilder.start());
|
||||||
analyzer.shouldHaveExitValue(1);
|
analyzer.shouldHaveExitValue(1);
|
||||||
analyzer.shouldContain("Error: Could not create the Java Virtual Machine.");
|
analyzer.shouldContain("Error: Could not create the Java Virtual Machine.");
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user