< prev index next >

src/hotspot/share/services/diagnosticFramework.cpp

Print this page
rev 50590 : [mq]: jcmd-cleanups
rev 50591 : [mq]: 8204958-jcmd-cleanups-delta


  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])) {




  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(line), _cmd_len(0), _args(NULL), _args_len(0)



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


< prev index next >