]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: MDS: pass only heap profiler commands instead of the whole cmd vector
authorJoao Eduardo Luis <jecluis@gmail.com>
Fri, 20 Sep 2013 15:43:27 +0000 (16:43 +0100)
committerJoao Eduardo Luis <jecluis@gmail.com>
Fri, 20 Sep 2013 16:51:21 +0000 (17:51 +0100)
The heap profiler doesn't care, nor should it, what our command name is.
It only cares about the commands it handles.

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
src/mds/MDS.cc

index fc05ca0ecb73594b183c7b122e0feaa89a070b2b..c2e0bbbe3691602cbb559f906af05a53d7f16d0d 100644 (file)
@@ -800,7 +800,9 @@ void MDS::handle_command(MMonCommand *m)
      clog.info() << "tcmalloc not enabled, can't use heap profiler commands\n";
    else {
      ostringstream ss;
-     ceph_heap_profiler_handle_command(m->cmd, ss);
+     vector<std::string> cmdargs;
+     cmdargs.insert(cmdargs.begin(), m->cmd.begin()+1, m->cmd.end());
+     ceph_heap_profiler_handle_command(cmdargs, ss);
      clog.info() << ss.str();
    }
  } else dout(0) << "unrecognized command! " << m->cmd << dendl;