]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cpu_profiler: drop start, stop commands
authorSage Weil <sage@inktank.com>
Fri, 17 Aug 2012 17:58:24 +0000 (10:58 -0700)
committerSage Weil <sage@inktank.com>
Fri, 17 Aug 2012 17:58:32 +0000 (10:58 -0700)
These don't appear to work.  Setting CPUPROFILE=path on startup does.

Signed-off-by: Sage Weil <sage@inktank.com>
src/perfglue/cpu_profiler.cc

index 756c220b5b962a5cb14dcc45ce3741eb4fb39a7e..8ba15b0af1a9830da00b28ff330da486ffcdae62 100644 (file)
 void cpu_profiler_handle_command(const std::vector<std::string> &cmd,
                                 ostream& out)
 {
-  if (cmd[1] == "start") {
-    if (cmd.size() < 3) {
-      out << "cpu_profiler: you must give an argument to start: a "
-         << "file name to log to.";
-      return;
-    }
-    const char *file = cmd[2].c_str();
-    int r = ProfilerStart(file);
-    out << "cpu_profiler: starting logging to " << file
-       << ", r=" << r;
-  }
-  else if (cmd[1] == "status") {
+  if (cmd[1] == "status") {
     ProfilerState st;
     ProfilerGetCurrentState(&st);
     out << "cpu_profiler " << (st.enabled ? "enabled":"not enabled")
@@ -43,13 +32,8 @@ void cpu_profiler_handle_command(const std::vector<std::string> &cmd,
     ProfilerFlush();
     out << "cpu_profiler: flushed";
   }
-  else if (cmd[1] == "stop") {
-    ProfilerFlush();
-    ProfilerStop();
-    out << "cpu_profiler: flushed and stopped";
-  }
   else {
     out << "cpu_profiler: unrecognized command " << cmd
-       << "; expected one of start, status, flush, stop.";
+       << "; expected one of status, flush.";
   }
 }