1 一. 安裝cmakehtml
cmake是一種跨平臺的編譯工具,安裝過程以下:linux
2 二. 安裝llvm7.0git
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local -DLLVM_TARGETS_TO_BUILD="BPF;AArch64" -DCMAKE_BUILD_TYPE=Release ../llvm-7.0.0.src/github
3 三. 安裝其餘庫bootstrap
4 四. 安裝bcc-toolsubuntu
編譯挺快的。
安裝完成時候就能夠到 /usr/share/bcc/tools 目下體驗bbc-tools的強大了。bash
參考:https://blog.csdn.net/didi8206050/article/details/72621499工具
Llvm和clang(cfe)下載:http://releases.llvm.org/flex
還有/lib/modules/`uname -r`/build,沒有該目錄須要安裝(那只是由於系統缺乏內核頭文件),或者/usr/src/下有對應版本,創建軟鏈接。ui
root@ubuntu31:~# ls -l /lib/modules/4.16.2-rc1/
total 5156
lrwxrwxrwx 1 root root 49 Oct 24 16:21 build -> /home/kernel/linux-4.16.2-devm.1.2.aarch64.dongbo
bcc-tools的功能參見:https://github.com/iovisor/bcc
https://zhuanlan.zhihu.com/p/32027979