aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphh <none@none>2011-12-19 15:50:47 -0500
committerphh <none@none>2011-12-19 15:50:47 -0500
commit722739dcbee200c9d807b90e5b4c1f195c3334df (patch)
treeb4ad9b407a9798f8609899bcadd56536c86e4f06
parent98718dbe217bb690acdb2a941ec8d9a58b599139 (diff)
7122880: Extend vendor-specific command interface to include manageable switches
Summary: Add Flag::external_ext()/writable_ext(), both return false. Reviewed-by: coleenp, zgu
-rw-r--r--src/share/vm/runtime/globals.cpp9
-rw-r--r--src/share/vm/runtime/globals.hpp2
-rw-r--r--src/share/vm/runtime/globals_ext.hpp8
-rw-r--r--src/share/vm/services/management.cpp1
4 files changed, 17 insertions, 3 deletions
diff --git a/src/share/vm/runtime/globals.cpp b/src/share/vm/runtime/globals.cpp
index 028b0958d..12efebcfc 100644
--- a/src/share/vm/runtime/globals.cpp
+++ b/src/share/vm/runtime/globals.cpp
@@ -82,16 +82,19 @@ bool Flag::is_unlocked() const {
}
bool Flag::is_writeable() const {
- return (strcmp(kind, "{manageable}") == 0 || strcmp(kind, "{product rw}") == 0);
+ return strcmp(kind, "{manageable}") == 0 ||
+ strcmp(kind, "{product rw}") == 0 ||
+ is_writeable_ext();
}
-// All flags except "manageable" are assumed internal flags.
+// All flags except "manageable" are assumed to be internal flags.
// Long term, we need to define a mechanism to specify which flags
// are external/stable and change this function accordingly.
bool Flag::is_external() const {
- return (strcmp(kind, "{manageable}") == 0);
+ return strcmp(kind, "{manageable}") == 0 || is_external_ext();
}
+
// Length of format string (e.g. "%.1234s") for printing ccstr below
#define FORMAT_BUFFER_LEN 16
diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp
index 519152558..e583295ed 100644
--- a/src/share/vm/runtime/globals.hpp
+++ b/src/share/vm/runtime/globals.hpp
@@ -245,6 +245,8 @@ struct Flag {
bool is_unlocker_ext() const;
bool is_unlocked_ext() const;
+ bool is_writeable_ext() const;
+ bool is_external_ext() const;
void print_on(outputStream* st, bool withComments = false );
void print_as_flag(outputStream* st);
diff --git a/src/share/vm/runtime/globals_ext.hpp b/src/share/vm/runtime/globals_ext.hpp
index a0f94bc7d..15191df60 100644
--- a/src/share/vm/runtime/globals_ext.hpp
+++ b/src/share/vm/runtime/globals_ext.hpp
@@ -53,4 +53,12 @@ inline bool Flag::is_unlocked_ext() const {
return true;
}
+inline bool Flag::is_writeable_ext() const {
+ return false;
+}
+
+inline bool Flag::is_external_ext() const {
+ return false;
+}
+
#endif // SHARE_VM_RUNTIME_GLOBALS_EXT_HPP
diff --git a/src/share/vm/services/management.cpp b/src/share/vm/services/management.cpp
index 1ef1cf1d0..217836c4f 100644
--- a/src/share/vm/services/management.cpp
+++ b/src/share/vm/services/management.cpp
@@ -33,6 +33,7 @@
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/arguments.hpp"
+#include "runtime/globals.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/javaCalls.hpp"