8067460: G1: TestResourceManagementFlagWithCommercialBuild.java failed on embedded platform
authoraharlap
Wed, 04 Feb 2015 13:14:27 -0500
changeset 28838 da47c3cc5c98
parent 28837 fda2ab610119
child 28839 627c26f2e54b
8067460: G1: TestResourceManagementFlagWithCommercialBuild.java failed on embedded platform Summary: Added extension point to detect unsupported options Reviewed-by: dholmes, bdelsart
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/arguments.hpp
hotspot/src/share/vm/runtime/arguments_ext.hpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Feb 04 10:18:28 2015 -0500
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Wed Feb 04 13:14:27 2015 -0500
@@ -57,18 +57,6 @@
 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
 #define DEFAULT_JAVA_LAUNCHER  "generic"
 
-// 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);                               \
-  }                                                             \
-} while(0)
-
 #define UNSUPPORTED_GC_OPTION(gc)                                     \
 do {                                                                  \
   if (gc) {                                                           \
@@ -3854,6 +3842,8 @@
   #endif
 #endif
 
+  ArgumentsExt::report_unsupported_options();
+
 #ifndef PRODUCT
   if (TraceBytecodesAt != 0) {
     TraceBytecodes = true;
--- a/hotspot/src/share/vm/runtime/arguments.hpp	Wed Feb 04 10:18:28 2015 -0500
+++ b/hotspot/src/share/vm/runtime/arguments.hpp	Wed Feb 04 13:14:27 2015 -0500
@@ -632,4 +632,16 @@
   return check_gc_consistency_user();
 }
 
+// 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);                               \
+  }                                                             \
+} while(0)
+
 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP
--- a/hotspot/src/share/vm/runtime/arguments_ext.hpp	Wed Feb 04 10:18:28 2015 -0500
+++ b/hotspot/src/share/vm/runtime/arguments_ext.hpp	Wed Feb 04 13:14:27 2015 -0500
@@ -37,6 +37,7 @@
   // no additional parsing needed in Arguments::parse() for the option.
   // Otherwise returns false.
   static inline bool process_options(const JavaVMOption *option) { return false; }
+  static inline void report_unsupported_options() { }
 };
 
 void ArgumentsExt::select_gc_ergonomically() {