perf_to_profile

将 Linux perf 文件转换为 pprof 使用的 profile.proto 格式的工具。「Tool to convert Linux perf files to the profile.proto format used by pprof」

  • 所有者: google/perf_data_converter
  • 平台: Linux
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Introduction

The perf_to_profile binary can be used to turn a perf.data file, which is
generated by the linux profiler, perf, into a profile.proto file which can be
visualized using the tool pprof.

For details on pprof, see https://github.com/google/pprof

THIS IS NOT AN OFFICIAL GOOGLE PRODUCT

Prerequisites to build

  • Install dependencies

    sudo apt-get -y install g++ git libelf-dev libcap-dev
    

Compile and Test

To install all dependences and build the binary, run the following commands.
These were tested on Ubuntu 14.04 LTS:

Compile

  • Install bazel by following the instructions here.

  • Install dependencies and build perf_to_profile using bazel

    git clone https://github.com/google/perf_data_converter.git
    cd perf_data_converter
    bazel build src:perf_to_profile
    

Place the perf_to_profile binary in a place accessible from your PATH (e.g. /usr/local/bin).

Running tests

  • There are a small number of tests that verify the basic functionality.
    To run these, after successful compilation, run:

    bazel test src:all
    bazel test src/quipper:all
    

Note: Executables generated using bazel build are available under the
directory bazel-bin/.

Usage

  • Profile a command using perf, for example:

    perf record /bin/ls
    
  • Recent versions of pprof will automatically invoke perf_to_profile:

    pprof -web perf.data
    

Contribution

We appreciate your help!

Note that perf data converter and quipper projects do not use GitHub pull
requests, and that we use the issue tracker for bug reports.

主要指標

概覽
名稱與所有者google/perf_data_converter
主編程語言C++
編程語言C++ (語言數: 4)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2016-09-21 20:00:54
推送於2025-10-15 19:04:02
最后一次提交2025-09-13 03:58:06
發布數0
用户参与
星數326
關注者數30
派生數63
提交數267
已啟用問題?
問題數32
打開的問題數12
拉請求數119
打開的拉請求數0
關閉的拉請求數35
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?