Building Perf with Babeltrace (for Perf to CTF Conversion)

风格不统一 提交于 2019-12-03 20:14:36

You need to build perf linked with Babeltrace for perf data convert support (AFAIK). Yes you need your kernel source tree to do this (your exact version).

  1. Get your Linux kernel's source tree. You should probably use your distribution's kernel source tree: this could include patches which modify the mainline project. For example, see Obtaining the kernel sources for an Ubuntu release using git.

    For the mainline kernel:

    git clone https://github.com/torvalds/linux.git
    

    Don't forget to check out the appropriate branch/tag/commit.

  2. Make sure Babeltrace is installed to some location, either using your distribution's package (apt-get, etc.) or by building it from source (./configure; make; make install).

  3. In tools/perf from the kernel source tree's root, run:

    LIBBABELTRACE=1 make
    

    If Babeltrace is not installed in a system directory, use LIBBABELTRACE_DIR to specify a custom Babeltrace installation directory:

    LIBBABELTRACE=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/ make
    

tools/perf/perf is your perf utility, built for your specific kernel with CTF conversion support.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!