8152929: Remove UNSUPPORTED_GC_OPTION, use UNSUPPORTED_OPTION instead
Reviewed-by: brutisso, jmasa
--- a/hotspot/src/share/vm/runtime/arguments.cpp Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Tue Apr 05 09:05:19 2016 +0200
@@ -66,16 +66,6 @@
#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
#define DEFAULT_JAVA_LAUNCHER "generic"
-#define UNSUPPORTED_GC_OPTION(gc) \
- do { \
- if (gc) { \
- if (FLAG_IS_CMDLINE(gc)) { \
- warning("-XX:+" #gc " not supported in this VM"); \
- } \
- FLAG_SET_DEFAULT(gc, false); \
- } \
- } while(0)
-
char* Arguments::_jvm_flags_file = NULL;
char** Arguments::_jvm_flags_array = NULL;
int Arguments::_num_jvm_flags = 0;
@@ -1988,11 +1978,11 @@
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
}
#else
- UNSUPPORTED_GC_OPTION(UseG1GC);
- UNSUPPORTED_GC_OPTION(UseParallelGC);
- UNSUPPORTED_GC_OPTION(UseParallelOldGC);
- UNSUPPORTED_GC_OPTION(UseConcMarkSweepGC);
- UNSUPPORTED_GC_OPTION(UseParNewGC);
+ UNSUPPORTED_OPTION(UseG1GC);
+ UNSUPPORTED_OPTION(UseParallelGC);
+ UNSUPPORTED_OPTION(UseParallelOldGC);
+ UNSUPPORTED_OPTION(UseConcMarkSweepGC);
+ UNSUPPORTED_OPTION(UseParNewGC);
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
#endif // INCLUDE_ALL_GCS
}
@@ -3671,7 +3661,7 @@
#ifndef TIERED
// Tiered compilation is undefined.
- UNSUPPORTED_OPTION(TieredCompilation, "TieredCompilation");
+ UNSUPPORTED_OPTION(TieredCompilation);
#endif
// If we are running in a headless jre, force java.awt.headless property
@@ -4360,7 +4350,7 @@
}
#if defined(_ALLBSD_SOURCE) || defined(AIX) // UseLargePages is not yet supported on BSD and AIX.
- UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
+ UNSUPPORTED_OPTION(UseLargePages);
#endif
ArgumentsExt::report_unsupported_options();
--- a/hotspot/src/share/vm/runtime/arguments.hpp Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.hpp Tue Apr 05 09:05:19 2016 +0200
@@ -734,14 +734,14 @@
// Disable options not supported in this release, with a warning if they
// were explicitly requested on the command-line
-#define UNSUPPORTED_OPTION(opt, description) \
-do { \
- if (opt) { \
- if (FLAG_IS_CMDLINE(opt)) { \
- warning(description " is disabled in this release."); \
- } \
- FLAG_SET_DEFAULT(opt, false); \
- } \
+#define UNSUPPORTED_OPTION(opt) \
+do { \
+ if (opt) { \
+ if (FLAG_IS_CMDLINE(opt)) { \
+ warning("-XX:+" #opt " not supported in this VM"); \
+ } \
+ FLAG_SET_DEFAULT(opt, false); \
+ } \
} while(0)
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
--- a/hotspot/test/compiler/arguments/CheckCICompilerCount.java Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/test/compiler/arguments/CheckCICompilerCount.java Tue Apr 05 09:05:19 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -160,7 +160,7 @@
} catch (RuntimeException e) {
// Check if tiered compilation is available in this JVM
// Version. Throw exception only if it is available.
- if (!(tiered && out.getOutput().contains("TieredCompilation is disabled in this release."))) {
+ if (!(tiered && out.getOutput().contains("-XX:+TieredCompilation not supported in this VM"))) {
throw new RuntimeException(e);
}
}
--- a/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java Tue Apr 05 09:05:19 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -344,7 +344,7 @@
} catch (RuntimeException e) {
// Check if tiered compilation is available in this JVM
// Version. Throw exception only if it is available.
- if (!(tiered && out.getOutput().contains("TieredCompilation is disabled in this release."))) {
+ if (!(tiered && out.getOutput().contains("-XX:+TieredCompilation not supported in this VM"))) {
throw new RuntimeException(e);
}
}
--- a/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java Tue Apr 05 09:05:19 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
out.shouldContain(NON_METHOD);
} catch (RuntimeException e) {
// Check if TieredCompilation is disabled (in a client VM)
- if(!out.getOutput().contains("TieredCompilation is disabled in this release.")) {
+ if(!out.getOutput().contains("-XX:+TieredCompilation not supported in this VM")) {
// Code cache is not segmented
throw new RuntimeException("No code cache segmentation.");
}
--- a/hotspot/test/gc/g1/Test2GbHeap.java Tue Apr 05 00:41:55 2016 +0200
+++ b/hotspot/test/gc/g1/Test2GbHeap.java Tue Apr 05 09:05:19 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@
if (output.getOutput().contains("Could not reserve enough space for 2097152KB object heap")) {
// Will fail on machines with too little memory (and Windows 32-bit VM), ignore such failures.
output.shouldHaveExitValue(1);
- } else if (output.getOutput().contains("G1 GC is disabled in this release")) {
+ } else if (output.getOutput().contains("-XX:+UseG1GC not supported in this VM")) {
// G1 is not supported on embedded, ignore such failures.
output.shouldHaveExitValue(1);
} else {