7122880: Extend vendor-specific command interface to include manageable switches

Mon, 19 Dec 2011 15:50:47 -0500

author
phh
date
Mon, 19 Dec 2011 15:50:47 -0500
changeset 3342
6c995c08526c
parent 3329
3b688d6ff3d0
child 3343
4502fd5c7698

7122880: Extend vendor-specific command interface to include manageable switches
Summary: Add Flag::external_ext()/writable_ext(), both return false.
Reviewed-by: coleenp, zgu

src/share/vm/runtime/globals.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/globals.hpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/globals_ext.hpp file | annotate | diff | comparison | revisions
src/share/vm/services/management.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/globals.cpp	Wed Dec 14 04:30:57 2011 -0800
     1.2 +++ b/src/share/vm/runtime/globals.cpp	Mon Dec 19 15:50:47 2011 -0500
     1.3 @@ -82,16 +82,19 @@
     1.4  }
     1.5  
     1.6  bool Flag::is_writeable() const {
     1.7 -  return (strcmp(kind, "{manageable}") == 0 || strcmp(kind, "{product rw}") == 0);
     1.8 +  return strcmp(kind, "{manageable}") == 0 ||
     1.9 +         strcmp(kind, "{product rw}") == 0 ||
    1.10 +         is_writeable_ext();
    1.11  }
    1.12  
    1.13 -// All flags except "manageable" are assumed internal flags.
    1.14 +// All flags except "manageable" are assumed to be internal flags.
    1.15  // Long term, we need to define a mechanism to specify which flags
    1.16  // are external/stable and change this function accordingly.
    1.17  bool Flag::is_external() const {
    1.18 -  return (strcmp(kind, "{manageable}") == 0);
    1.19 +  return strcmp(kind, "{manageable}") == 0 || is_external_ext();
    1.20  }
    1.21  
    1.22 +
    1.23  // Length of format string (e.g. "%.1234s") for printing ccstr below
    1.24  #define FORMAT_BUFFER_LEN 16
    1.25  
     2.1 --- a/src/share/vm/runtime/globals.hpp	Wed Dec 14 04:30:57 2011 -0800
     2.2 +++ b/src/share/vm/runtime/globals.hpp	Mon Dec 19 15:50:47 2011 -0500
     2.3 @@ -245,6 +245,8 @@
     2.4  
     2.5    bool is_unlocker_ext() const;
     2.6    bool is_unlocked_ext() const;
     2.7 +  bool is_writeable_ext() const;
     2.8 +  bool is_external_ext() const;
     2.9  
    2.10    void print_on(outputStream* st, bool withComments = false );
    2.11    void print_as_flag(outputStream* st);
     3.1 --- a/src/share/vm/runtime/globals_ext.hpp	Wed Dec 14 04:30:57 2011 -0800
     3.2 +++ b/src/share/vm/runtime/globals_ext.hpp	Mon Dec 19 15:50:47 2011 -0500
     3.3 @@ -53,4 +53,12 @@
     3.4    return true;
     3.5  }
     3.6  
     3.7 +inline bool Flag::is_writeable_ext() const {
     3.8 +  return false;
     3.9 +}
    3.10 +
    3.11 +inline bool Flag::is_external_ext() const {
    3.12 +  return false;
    3.13 +}
    3.14 +
    3.15  #endif // SHARE_VM_RUNTIME_GLOBALS_EXT_HPP
     4.1 --- a/src/share/vm/services/management.cpp	Wed Dec 14 04:30:57 2011 -0800
     4.2 +++ b/src/share/vm/services/management.cpp	Mon Dec 19 15:50:47 2011 -0500
     4.3 @@ -33,6 +33,7 @@
     4.4  #include "oops/objArrayKlass.hpp"
     4.5  #include "oops/oop.inline.hpp"
     4.6  #include "runtime/arguments.hpp"
     4.7 +#include "runtime/globals.hpp"
     4.8  #include "runtime/handles.inline.hpp"
     4.9  #include "runtime/interfaceSupport.hpp"
    4.10  #include "runtime/javaCalls.hpp"

mercurial