< prev index next >

src/hotspot/share/services/diagnosticFramework.cpp

Print this page
rev 50556 : [mq]: jcmd-cleanups
rev 50557 : [mq]: 8204958-jcmd-cleanups-delta


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "memory/oopFactory.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/handles.inline.hpp"
  31 #include "runtime/javaCalls.hpp"
  32 #include "runtime/mutexLocker.hpp"
  33 #include "services/diagnosticArgument.hpp"
  34 #include "services/diagnosticFramework.hpp"
  35 #include "services/management.hpp"
  36 
  37 CmdLine::CmdLine(const char* line, size_t len, bool no_command_name) {





  38   assert(line != NULL, "Command line string should not be NULL");
  39   const char* line_end;
  40   const char* cmd_end;
  41 
  42   _cmd = line;
  43   line_end = &line[len];
  44 
  45   // Skip whitespace in the beginning of the line.
  46   while (_cmd < line_end && isspace((int) _cmd[0])) {
  47     _cmd++;
  48   }
  49   cmd_end = _cmd;
  50 
  51   if (no_command_name) {
  52     _cmd = NULL;
  53     _cmd_len = 0;
  54   } else {
  55     // Look for end of the command name
  56     while (cmd_end < line_end && !isspace((int) cmd_end[0])) {
  57       cmd_end++;




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "memory/oopFactory.hpp"
  28 #include "memory/resourceArea.hpp"
  29 #include "oops/oop.inline.hpp"
  30 #include "runtime/handles.inline.hpp"
  31 #include "runtime/javaCalls.hpp"
  32 #include "runtime/mutexLocker.hpp"
  33 #include "services/diagnosticArgument.hpp"
  34 #include "services/diagnosticFramework.hpp"
  35 #include "services/management.hpp"
  36 
  37 CmdLine::CmdLine(const char* line, size_t len, bool no_command_name)
  38   : _cmd(NULL)
  39   , _cmd_len(0)
  40   , _args(NULL)
  41   , _args_len(0)
  42 {
  43   assert(line != NULL, "Command line string should not be NULL");
  44   const char* line_end;
  45   const char* cmd_end;
  46 
  47   _cmd = line;
  48   line_end = &line[len];
  49 
  50   // Skip whitespace in the beginning of the line.
  51   while (_cmd < line_end && isspace((int) _cmd[0])) {
  52     _cmd++;
  53   }
  54   cmd_end = _cmd;
  55 
  56   if (no_command_name) {
  57     _cmd = NULL;
  58     _cmd_len = 0;
  59   } else {
  60     // Look for end of the command name
  61     while (cmd_end < line_end && !isspace((int) cmd_end[0])) {
  62       cmd_end++;


< prev index next >