8140359: get_locked_message_ext() should return Flag::MsgType
authorgziemski
Mon, 19 Mar 2018 14:20:28 -0500
changeset 49462 00992d4e8a23
parent 49461 6e9e88d82781
child 49463 ccb003941743
8140359: get_locked_message_ext() should return Flag::MsgType Summary: Changed get_locked_message_ext() to return Flag::MsgType Reviewed-by: coleenp, rehn
src/hotspot/share/runtime/globals.cpp
src/hotspot/share/runtime/globals.hpp
src/hotspot/share/runtime/globals_ext.hpp
--- a/src/hotspot/share/runtime/globals.cpp	Mon Mar 19 13:57:08 2018 -0500
+++ b/src/hotspot/share/runtime/globals.cpp	Mon Mar 19 14:20:28 2018 -0500
@@ -447,8 +447,7 @@
                  _name);
     return Flag::NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD;
   }
-  get_locked_message_ext(buf, buflen);
-  return Flag::NONE;
+  return get_locked_message_ext(buf, buflen);
 }
 
 bool Flag::is_writeable() const {
--- a/src/hotspot/share/runtime/globals.hpp	Mon Mar 19 13:57:08 2018 -0500
+++ b/src/hotspot/share/runtime/globals.hpp	Mon Mar 19 14:20:28 2018 -0500
@@ -184,7 +184,9 @@
     DIAGNOSTIC_FLAG_BUT_LOCKED,
     EXPERIMENTAL_FLAG_BUT_LOCKED,
     DEVELOPER_FLAG_BUT_PRODUCT_BUILD,
-    NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD
+    NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD,
+    COMMERCIAL_FLAG_BUT_DISABLED,
+    COMMERCIAL_FLAG_BUT_LOCKED
   };
 
   const char* _type;
@@ -285,7 +287,7 @@
   void clear_diagnostic();
 
   Flag::MsgType get_locked_message(char*, int) const;
-  void get_locked_message_ext(char*, int) const;
+  Flag::MsgType get_locked_message_ext(char*, int) const;
 
   // printRanges will print out flags type, name and range values as expected by -XX:+PrintFlagsRanges
   void print_on(outputStream* st, bool withComments = false, bool printRanges = false);
--- a/src/hotspot/share/runtime/globals_ext.hpp	Mon Mar 19 13:57:08 2018 -0500
+++ b/src/hotspot/share/runtime/globals_ext.hpp	Mon Mar 19 14:20:28 2018 -0500
@@ -61,9 +61,10 @@
   return false;
 }
 
-inline void Flag::get_locked_message_ext(char* buf, int buflen) const {
+inline Flag::MsgType Flag::get_locked_message_ext(char* buf, int buflen) const {
   assert(buf != NULL, "Buffer cannot be NULL");
   buf[0] = '\0';
+  return Flag::NONE;
 }
 
 #endif // SHARE_VM_RUNTIME_GLOBALS_EXT_HPP