From e6a751bda5770b695cad51bbba32a24247267409 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Thu, 4 Nov 2010 14:11:41 -0700 Subject: [PATCH] Set HEAP_PROFILE_INUSE_INTERVAL based on conf Signed-off-by: Colin McCabe --- src/common/common_init.cc | 2 +- src/mds/MDS.cc | 2 +- src/osd/OSD.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 4a8fee28eb2b8..f634247f8cbda 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -37,7 +37,7 @@ void common_init(std::vector& args, const char *module_type, bool i sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); generic_dout(0) << "turning on heap profiler with prefix " << profile_name << dendl; g_conf.profiler_start(profile_name); delete profile_name; diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index a3d5bcb081b54..2c6cde34cdac0 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -754,7 +754,7 @@ void MDS::handle_command(MMonCommand *m) sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); stringstream ss; ss << g_conf.name << " set heap variables from current config"; logclient.log(LOG_INFO, ss); diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 52cdab959df16..122931af14cce 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1836,7 +1836,7 @@ void OSD::handle_command(MMonCommand *m) sprintf(val, "%i", g_conf.profiler_allocation_interval); setenv("HEAP_PROFILE_ALLOCATION_INTERVAL", val, g_conf.profiler_allocation_interval); sprintf(val, "%i", g_conf.profiler_highwater_interval); - setenv("HEAP_PROFILE_INUSE_INTERVAL", "", g_conf.profiler_highwater_interval); + setenv("HEAP_PROFILE_INUSE_INTERVAL", val, g_conf.profiler_highwater_interval); stringstream ss; ss << g_conf.name << " set heap variables from current config"; logclient.log(LOG_INFO, ss); -- 2.39.5