Set HEAP_PROFILE_INUSE_INTERVAL based on conf

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
This commit is contained in:
Colin Patrick McCabe 2010-11-04 14:11:41 -07:00
parent 8c8bfdb3e2
commit e6a751bda5
3 changed files with 3 additions and 3 deletions

View 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;

View 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);

View 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);