]> git-server-git.apps.pok.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)
committerSage Weil <sage@inktank.com>
Tue, 24 Sep 2013 16:02:36 +0000 (09:02 -0700)
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>
(cherry picked from commit 238fe272c6bdb62d4e57fd8555c0136de99c8129)

src/mds/MDS.cc

index e70d6fd4dff8f41706f697597392f84c09911326..70c5efbec585c027c7e1118c2c51668b6d363389 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;