src/share/vm/services/diagnosticCommand.cpp

changeset 4520
8f696cf1a0fb
parent 4497
16fb9f942703
child 4544
3c9bc17b9403
     1.1 --- a/src/share/vm/services/diagnosticCommand.cpp	Sat Feb 02 20:13:27 2013 +0100
     1.2 +++ b/src/share/vm/services/diagnosticCommand.cpp	Sun Feb 03 22:28:08 2013 +0400
     1.3 @@ -464,7 +464,32 @@
     1.4  
     1.5    _jmxremote_ssl_config_file
     1.6    ("jmxremote.ssl.config.file",
     1.7 -   "set com.sun.management.jmxremote.ssl_config_file", "STRING", false)
     1.8 +   "set com.sun.management.jmxremote.ssl_config_file", "STRING", false),
     1.9 +
    1.10 +// JDP Protocol support
    1.11 +  _jmxremote_autodiscovery
    1.12 +  ("jmxremote.autodiscovery",
    1.13 +   "set com.sun.management.jmxremote.autodiscovery", "STRING", false),
    1.14 +
    1.15 +   _jdp_port
    1.16 +  ("jdp.port",
    1.17 +   "set com.sun.management.jdp.port", "INT", false),
    1.18 +
    1.19 +   _jdp_address
    1.20 +  ("jdp.address",
    1.21 +   "set com.sun.management.jdp.address", "STRING", false),
    1.22 +
    1.23 +   _jdp_source_addr
    1.24 +  ("jdp.source_addr",
    1.25 +   "set com.sun.management.jdp.source_addr", "STRING", false),
    1.26 +
    1.27 +   _jdp_ttl
    1.28 +  ("jdp.ttl",
    1.29 +   "set com.sun.management.jdp.ttl", "INT", false),
    1.30 +
    1.31 +   _jdp_pause
    1.32 +  ("jdp.pause",
    1.33 +   "set com.sun.management.jdp.pause", "INT", false)
    1.34  
    1.35    {
    1.36      _dcmdparser.add_dcmd_option(&_config_file);
    1.37 @@ -480,6 +505,12 @@
    1.38      _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols);
    1.39      _dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth);
    1.40      _dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file);
    1.41 +    _dcmdparser.add_dcmd_option(&_jmxremote_autodiscovery);
    1.42 +    _dcmdparser.add_dcmd_option(&_jdp_port);
    1.43 +    _dcmdparser.add_dcmd_option(&_jdp_address);
    1.44 +    _dcmdparser.add_dcmd_option(&_jdp_source_addr);
    1.45 +    _dcmdparser.add_dcmd_option(&_jdp_ttl);
    1.46 +    _dcmdparser.add_dcmd_option(&_jdp_pause);
    1.47  }
    1.48  
    1.49  
    1.50 @@ -494,7 +525,6 @@
    1.51    }
    1.52  }
    1.53  
    1.54 -
    1.55  void JMXStartRemoteDCmd::execute(TRAPS) {
    1.56      ResourceMark rm(THREAD);
    1.57      HandleMark hm(THREAD);
    1.58 @@ -524,7 +554,9 @@
    1.59      // file.
    1.60  #define PUT_OPTION(a) \
    1.61      if ( (a).is_set() ){ \
    1.62 -        options.print("%scom.sun.management.%s=%s", comma, (a).name(), (a).value()); \
    1.63 +        options.print(\
    1.64 +               ( *((a).type()) == 'I' ) ? "%scom.sun.management.%s=%d" : "%scom.sun.management.%s=%s",\
    1.65 +                comma, (a).name(), (a).value()); \
    1.66          comma[0] = ','; \
    1.67      }
    1.68  
    1.69 @@ -541,6 +573,12 @@
    1.70      PUT_OPTION(_jmxremote_ssl_enabled_protocols);
    1.71      PUT_OPTION(_jmxremote_ssl_need_client_auth);
    1.72      PUT_OPTION(_jmxremote_ssl_config_file);
    1.73 +    PUT_OPTION(_jmxremote_autodiscovery);
    1.74 +    PUT_OPTION(_jdp_port);
    1.75 +    PUT_OPTION(_jdp_address);
    1.76 +    PUT_OPTION(_jdp_source_addr);
    1.77 +    PUT_OPTION(_jdp_ttl);
    1.78 +    PUT_OPTION(_jdp_pause);
    1.79  
    1.80  #undef PUT_OPTION
    1.81  

mercurial