From 4061f0db584e17f8ff09d04285f2384219d782fc Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 6 Mar 2014 16:31:40 +0800 Subject: [PATCH] refine the profiler --- trunk/research/gperftools/heap-profiler/heap_profiler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/research/gperftools/heap-profiler/heap_profiler.cc b/trunk/research/gperftools/heap-profiler/heap_profiler.cc index fb38ef632..7c88a8df4 100644 --- a/trunk/research/gperftools/heap-profiler/heap_profiler.cc +++ b/trunk/research/gperftools/heap-profiler/heap_profiler.cc @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. set the pprof path if not set: export PPROF_PATH=`pwd`/../../../objs/pprof to do mem profile: - make && rm -f srs.*.heap && env ./heap_profiler + make && rm -f srs.*.heap && env HEAPPROFILE=./srs ./heap_profiler $PPROF_PATH --text heap_profiler ./*.heap */ #include @@ -56,7 +56,7 @@ int main(int argc, char** argv) { signal(SIGINT, handler); // must start profiler manually. - HeapProfilerStart("srs"); + HeapProfilerStart(NULL); memory_alloc_profile(); // not neccessary to call stop.