Skip to content

Commit

Permalink
mon,mds: call ceph_heap_profiler_init() at boot time
Browse files Browse the repository at this point in the history
So that the CEPH_HEAP_PROFILER_INIT environment variable can be used to
start profiling.

Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
Loic Dachary committed Oct 8, 2014
1 parent 472a4b3 commit 6f6e7e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ using namespace std;

#include "auth/KeyRing.h"

#include "perfglue/heap_profiler.h"

#include "include/assert.h"

#define dout_subsys ceph_subsys_mds
Expand Down Expand Up @@ -92,6 +94,7 @@ int main(int argc, const char **argv)
env_to_vec(args);

global_init(NULL, args, CEPH_ENTITY_TYPE_MDS, CODE_ENVIRONMENT_DAEMON, 0);
ceph_heap_profiler_init();

// mds specific args
MDSMap::DaemonState shadow = MDSMap::STATE_NULL;
Expand Down
3 changes: 3 additions & 0 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ using namespace std;
#include "global/global_init.h"
#include "global/signal_handler.h"

#include "perfglue/heap_profiler.h"

#include "include/assert.h"

#include "erasure-code/ErasureCodePlugin.h"
Expand Down Expand Up @@ -257,6 +259,7 @@ int main(int argc, const char **argv)

global_init(&def_args, args,
CEPH_ENTITY_TYPE_MON, CODE_ENVIRONMENT_DAEMON, flags);
ceph_heap_profiler_init();

uuid_d fsid;
std::string val;
Expand Down

0 comments on commit 6f6e7e2

Please sign in to comment.