perf performance analysis tools

1. perf Introduction

perf is a Linux performance analysis tools. Linux performance counters is a new kernel-based subsystem that provides a framework for performance analysis, such as hardware (CPU, PMU (Performance Monitoring Unit )) functions and software (software counter, tracepoint) function.
By perf, applications can take advantage of PMU, tracepoint and kernel counters for performance statistics. It can not only analyze the development of application performance problems (per thread), can also be used to analyze the performance of the core issues, of course, can also be colleagues analyzed the applications and the kernel in order to fully understand the performance bottlenecks in your application.

2. perf installation

2.1 Source Installation

Terminal enters / usr / src directory, obtaining the source code

sudo apt-get install linux-source-x.x.x

Enter linux-source.xxx, unpacked linux-source.xxxtar.bz2

sudo tar -jxvf linux-source-x.x.x.tar.bz2

Entering linux-source-xxx / tools / perf /

make 
make  install

2.2 package installation

sudo apt install linux-tools-common

Enter perf, follow the prompts to install the missing components

 

3. perf of use

3.1 perf --help view tips

Guess you like

Origin www.cnblogs.com/x-police/p/12369933.html