I am trying to use jemalloc to do memory profiling.
I run my program with
prof:true,prof_active:false
and I use mallctl call to change prof.interval
to 1, and set prof.activate
to true. And I expect that the program could keep dumping *.heap file. However, no heap file is dumped.
After that, I re-run my program with the following. And after the program is started, it will use mallctl call to change prof.activate
to true. This time, the program could dump *.heap file regularly.
prof:true,prof_active:false,lg_prof_interval:18
If I set lg_prof_interval in MALLOC_CONF, then I can’t control the rate at runtime. I actually wish that I could change the value of lg_prof_interval
through mallctl at runtime, however, I failed for now. I wonder why.