Development¶
Development¶
Installation Guide¶
You'll need to install perf in your system. perf uses CPU performance counters (Performance Monitoring Counters or PMCs).
-
Install Required Packages like libelf-dev libdw-dev binutils-dev libaudit-dev by using the following command
sh sudo apt-get install build-essential libelf-dev libdw-dev binutils-dev \ libaudit-dev libtraceevent-dev systemtap-sdt-dev libunwind-dev libslang2-dev libperl-dev libzstd-dev libbabeltrace-ctf-dev flex bison -
Download the latest perf-tools Source code using the following command
sh git clone https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/ -
Install
perf.perfcommand is available in packages linux-tools-common, linux-intel-iotg-tools-common, etc. Hence, install any of these. -
Run
makecommand to build the project-
It may show an error since the config file is not set and has to be changed. Run the following command.
sh make xconfig -
We will also need to install qt5 for this. Install it using
sudo apt-get install qtbase5-devORsudo apt install qt5*and set the path usingsh export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig -
Check if qt5 has been installed properly using qmake --version
-
You might need to set
kernel.perf_event_paranoid = -1because theperf recordcommand may fail due to restricted access to performance monitoring features on your system.sh sudo sysctl -w kernel.perf_event_paranoid=-1Note: this should not be done in production environment
-
Now, Finally run make xconfig and it will work properly.
-
-
Go to the root directory of the kernel and run
perf test. You will see tests passing, skipping, or failing.
Maintainer Trees¶
Kernel¶
Tool¶
perf-tools for the current release. Merged to linux-next.
perf-tools-next staging for the next release.
Design¶
Latest source tar balls¶
Cross Compilation¶
Arm64 cross-compilation Dockerfile|Arm64 cross-compilation Dockerfile for an example of how to cross-compile for Arm on x86