2014-02-25 12:52:37 +00:00
|
|
|
/*
|
2021-04-27 23:54:09 +00:00
|
|
|
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
2014-02-25 12:52:37 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* 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
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* 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,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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
|
|
|
|
* questions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @test
|
|
|
|
* @bug 8034775
|
|
|
|
* @summary Ensures correct minimal number of compiler threads (provided by -XX:CICompilerCount=)
|
2016-08-19 14:06:30 +00:00
|
|
|
* @library /test/lib
|
2021-04-27 23:54:09 +00:00
|
|
|
* @requires vm.flagless
|
2016-04-09 22:03:39 +00:00
|
|
|
* @modules java.base/jdk.internal.misc
|
2015-03-26 15:36:56 +00:00
|
|
|
* java.management
|
2016-07-12 15:24:48 +00:00
|
|
|
*
|
|
|
|
* @run driver compiler.startup.NumCompilerThreadsCheck
|
2014-02-25 12:52:37 +00:00
|
|
|
*/
|
2016-07-12 15:24:48 +00:00
|
|
|
|
|
|
|
package compiler.startup;
|
|
|
|
|
2016-08-19 14:06:30 +00:00
|
|
|
import jdk.test.lib.process.OutputAnalyzer;
|
2016-07-12 15:24:48 +00:00
|
|
|
import jdk.test.lib.Platform;
|
2016-08-19 14:06:30 +00:00
|
|
|
import jdk.test.lib.process.ProcessTools;
|
2014-02-25 12:52:37 +00:00
|
|
|
|
|
|
|
public class NumCompilerThreadsCheck {
|
2014-05-02 04:24:39 +00:00
|
|
|
|
2014-02-25 12:52:37 +00:00
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:CICompilerCount=-1");
|
|
|
|
OutputAnalyzer out = new OutputAnalyzer(pb.start());
|
|
|
|
|
2015-06-18 19:39:38 +00:00
|
|
|
String expectedOutput = "outside the allowed range";
|
2014-02-25 12:52:37 +00:00
|
|
|
out.shouldContain(expectedOutput);
|
2014-05-02 04:24:39 +00:00
|
|
|
}
|
|
|
|
|
2014-02-25 12:52:37 +00:00
|
|
|
}
|