linux下的 c 和 c++ 开发工具及linux内核开发工具 2 微信公众号

继续工具的介绍:

  1. ftrace   ftrace 除了 trace-cmd 这个命令行前端工具之外,还有一个图形化显示前端工具叫 kernelshark,非常好用,有时间片显示和过滤功能。kernelshark 和 trace-cmd 都可以使用apt安装。使用方法是先用trace-cmd产生trace.dat文件,然后用kernelshark打开。一般情况下,trace-cmd 需要在板子上运行,因此需要交叉编译,它依赖libtraceevent 和 libtracefs这两个库,各自的下载地址为:
    https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
    https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
    git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
    链接 trace-cmd 的时候最好使用 libtraceevent 和 libtracefs 的静态库。
    有关ftrace的资料:
    1. https://blogs.vmware.com/opensource/2019/11/12/ftrace-linux-kernel/
    2. https://alex.dzyoba.com/blog/ftrace/
    3. https://andreasch.com/2017/12/06/ftrace/
    4. https://jvns.ca/blog/2017/03/19/getting-started-with-ftrace/
    5. https://www.brendangregg.com/blog/2014-08-30/ftrace-the-hidden-light-switch.html
    6. https://lwn.net/Articles/365835/
    7. https://lwn.net/Articles/366796/
    8. https://lwn.net/Articles/370423/
    9. https://lwn.net/Articles/410200/
    10. https://www.kernel.org/doc/Documentation/trace/ftrace.txt
    11. https://jvns.ca/blog/2017/03/19/getting-started-with-ftrace/
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

微信公众号:  共鸣圈
欢迎讨论,邮件:  924948$qq.com       请把$改成@
QQ群:263132197
QQ:    924948

良辰美景补天漏,风雨雷电洗地尘
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
原文地址:https://www.cnblogs.com/welhzh/p/15573573.html