标签:rip png indent 9.png git lib col normal 正文
1、交叉编译zlib
#!/bin/bash export CC=arm-linux-gcc .././../Third_Part/Zlib/zlib-1.2.11/configure --prefix=`pwd` make make install
2、交叉编译elfutils
export LDFLAGS=-L/home/pengdonglin/disk_ext/TQ2440/zlib/lib export CPPFLAGS=-I/home/pengdonglin/disk_ext/TQ2440/zlib/include export LIBS=-lz ../configure --host=arm-linux --prefix=`pwd` make make install
3、编译perf
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 32a64e6..dd85078 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -1,3 +1,7 @@ +export EXTLIBS =--static -lelf -lebl -L/home/pengdonglin/disk_ext/TQ2440/zlib/lib -L/home/pengdonglin/disk_ext/TQ2440/elfutils-0.170/build/lib +export ARCH=arm +export CROSS_COMPILE=arm-linux- + # # This is a simple wrapper Makefile that calls the main Makefile.perf # with a -j option to do parallel builds
然后在linux-4.10.17/tools/perf执行make,最后就会在该目录下编译生成一个名为perf的文件。
4、配置内核,支持perf
5、测试
perf record -F 180 -p 1021 -g -- sleep 120
perf script > out.perf
~/disk_ext/FlameGraph/stackcollapse-perf.pl out.perf > out.folded
~/disk_ext/FlameGraph/flamegraph.pl out.folded > kernel.svg
标签:rip png indent 9.png git lib col normal 正文
原文地址:http://www.cnblogs.com/pengdonglin137/p/7787191.html