【初体验】valgrind分析程序性能

wget https://fossies.org/linux/misc/valgrind-3.15.0.tar.bz2

tar -jxvf valgrind-3.15.0.tar.bz2

cd valgrind-3.15.0

./configure

make

make install

#

/usr/local/bin/valgrind --tool=callgrind ./my_program

# 执行完成后,下载 callgrind.out.94104 这个文件到本地

# 下载:https://nchc.dl.sourceforge.net/project/qcachegrindwin/0.7.4/qcachegrind074-32bit-x86.zip 这个windows程序

# 解压

# 双击 qcachegrind.exe

在程序中打开 callgrind.out.94104,看到以下画面:

不明觉厉!

原文地址:https://www.cnblogs.com/ahfuzhang/p/10822026.html