github地址
1 | https://github.com/gperftools/gperftools |
1 | git clone https://github.com/gperftools/gperftools.git |
HEAP PROFILER
1 | 1) Link your executable with -ltcmalloc |
CPU PROFILER
1 | 1) Link your executable with -lprofiler |
生成PDF文件
1 | pprof --pdf ./executable pprof.out > pprof.pdf |