From 6f6e7e25532f6c59a2a5872fb35309a0a0ecb955 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Thu, 2 Oct 2014 15:14:21 +0200 Subject: [PATCH] mon,mds: call ceph_heap_profiler_init() at boot time So that the CEPH_HEAP_PROFILER_INIT environment variable can be used to start profiling. Signed-off-by: Loic Dachary --- src/ceph_mds.cc | 3 +++ src/ceph_mon.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/ceph_mds.cc b/src/ceph_mds.cc index b1ab386cc67..8b857c73648 100644 --- a/src/ceph_mds.cc +++ b/src/ceph_mds.cc @@ -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 @@ -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; diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index ef0a99c4504..3bd6022b81c 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -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" @@ -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; -- 2.47.3