下载工具
PC端编译安装
./configure \
prefix=$(pwd)/output
ARM版本安装
重新解压一份,编译运行
./configure \
prefix=$(pwd)/output \
CFLAGS="-fPIC" \
--hos=arm-linux \
CC=/home/leo/workspace/ssd20x/toolchain/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc \
CXX=/home/leo/workspace/ssd20x/toolchain/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ \`
添加动态库环境变量
export LD_PRELOAD=tmp/nfs/ssd20x/gdbserver/tcmalloc/gperftools-2.10/output/lib/libtcmalloc.so.4.5.10
运行调试的程序
env HEAPCHECK=normal /tmp/nfs/ssd20x/project/build/SAT_SSD20X.BIN
调试日志
./pprof SAT_SSD20X.BIN "SAT_SSD20X.BIN.1489._main_-end.heap" --lines --heapcheck --edgefraction=1e-10 --nodefraction=1e-10 --text