]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Set HEAP_PROFILE_INUSE_INTERVAL based on conf
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 4 Nov 2010 21:11:41 +0000 (14:11 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 4 Nov 2010 21:11:41 +0000 (14:11 -0700)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/common/common_init.cc
src/mds/MDS.cc
src/osd/OSD.cc

index 4a8fee28eb2b859f16d220d364f973d02e9a9e8a..f634247f8cbdad33cd6a73508de47c82985903f5 100644 (file)
@@ -37,7 +37,7 @@ void common_init(std::vector<const char*>& 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;
index a3d5bcb081b54f41a1967101db3c8f90cb5da12e..2c6cde34cdac00bca1225327b192fa939d567567 100644 (file)
@@ -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);
index 52cdab959df16f7ec4527f5a12d6cd8738e550a3..122931af14cce2b6b90f35ffcc2f151f520f1aaa 100644 (file)
@@ -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);