mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-30 13:08:24 +00:00
8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
TieredCompilation not validated when CICompilerCount is processed Reviewed-by: kvn, gziemski
This commit is contained in:
parent
e834a48100
commit
c030d4e363
@ -71,7 +71,10 @@ Flag::Error CICompilerCountConstraintFunc(bool verbose, intx* value) {
|
||||
#endif
|
||||
|
||||
// The default CICompilerCount's value is CI_COMPILER_COUNT.
|
||||
assert(min_number_of_compiler_threads <= CI_COMPILER_COUNT, "minimum should be less or equal default number");
|
||||
// With a client VM, -XX:+TieredCompilation causes TieredCompilation
|
||||
// to be true here (the option is validated later) and
|
||||
// min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
|
||||
min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
|
||||
|
||||
if (*value < (intx)min_number_of_compiler_threads) {
|
||||
if (verbose == true) {
|
||||
|
||||
@ -26,6 +26,7 @@ import jdk.test.lib.*;
|
||||
/*
|
||||
* @test CheckCheckCICompilerCount
|
||||
* @bug 8130858
|
||||
* @bug 8132525
|
||||
* @summary Check that correct range of values for CICompilerCount are allowed depending on whether tiered is enabled or not
|
||||
* @library /testlibrary
|
||||
* @modules java.base/sun.misc
|
||||
@ -36,12 +37,28 @@ import jdk.test.lib.*;
|
||||
public class CheckCICompilerCount {
|
||||
private static final String[][] NON_TIERED_ARGUMENTS = {
|
||||
{
|
||||
"-server",
|
||||
"-XX:-TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=0",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-server",
|
||||
"-XX:-TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=1",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-client",
|
||||
"-XX:-TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=0",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-client",
|
||||
"-XX:-TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=1",
|
||||
@ -50,6 +67,13 @@ public class CheckCICompilerCount {
|
||||
};
|
||||
|
||||
private static final String[][] NON_TIERED_EXPECTED_OUTPUTS = {
|
||||
{
|
||||
"CICompilerCount=0 must be at least 1",
|
||||
"Improperly specified VM option 'CICompilerCount=0'"
|
||||
},
|
||||
{
|
||||
"intx CICompilerCount := 1 {product}"
|
||||
},
|
||||
{
|
||||
"CICompilerCount=0 must be at least 1",
|
||||
"Improperly specified VM option 'CICompilerCount=0'"
|
||||
@ -60,18 +84,36 @@ public class CheckCICompilerCount {
|
||||
};
|
||||
|
||||
private static final int[] NON_TIERED_EXIT = {
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
};
|
||||
|
||||
private static final String[][] TIERED_ARGUMENTS = {
|
||||
{
|
||||
"-server",
|
||||
"-XX:+TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=1",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-server",
|
||||
"-XX:+TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=2",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-client",
|
||||
"-XX:+TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=1",
|
||||
"-version"
|
||||
},
|
||||
{
|
||||
"-client",
|
||||
"-XX:+TieredCompilation",
|
||||
"-XX:+PrintFlagsFinal",
|
||||
"-XX:CICompilerCount=2",
|
||||
@ -80,6 +122,13 @@ public class CheckCICompilerCount {
|
||||
};
|
||||
|
||||
private static final String[][] TIERED_EXPECTED_OUTPUTS = {
|
||||
{
|
||||
"CICompilerCount=1 must be at least 2",
|
||||
"Improperly specified VM option 'CICompilerCount=1'"
|
||||
},
|
||||
{
|
||||
"intx CICompilerCount := 2 {product}"
|
||||
},
|
||||
{
|
||||
"CICompilerCount=1 must be at least 2",
|
||||
"Improperly specified VM option 'CICompilerCount=1'"
|
||||
@ -90,6 +139,8 @@ public class CheckCICompilerCount {
|
||||
};
|
||||
|
||||
private static final int[] TIERED_EXIT = {
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user