diff hotspot/src/share/vm/runtime/arguments.hpp @ 28838:da47c3cc5c98

8067460: G1: TestResourceManagementFlagWithCommercialBuild.java failed on embedded platform Summary: Added extension point to detect unsupported options Reviewed-by: dholmes, bdelsart
author aharlap
date Wed, 04 Feb 2015 13:14:27 -0500
parents 772aaab2582f
children 4a5f7c1e6ed7
line wrap: on
line diff
--- 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