How to install perf in ubuntu Linux ?

Perf is a profiler tool for Linux 2.6+ based systems that abstracts away CPU hardware differences in Linux performance measurements and presents a simple commandline interface. The documentation for perf inside kernel is available at “linux_kernel_src/tools/perf/Documentation”

 $ sudo apt install linux-tools-common linux-tools-`uname -r` 
 $ perf --help usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] The most commonly used perf commands are: annotate Read (created by perf record) and display annotated code archive Create archive with object files with build-ids found in file bench General framework for benchmark suites buildid-cache Manage build-id cache. buildid-list List the buildids in a file data Data file related processing diff Read files and display the differential profile evlist List the event names in a file inject Filter to augment the events stream with additional information kmem Tool to trace/measure kernel memory properties kvm Tool to trace/measure kvm guest os list List all symbolic event types lock Analyze lock events mem Profile memory accesses record Run a command and record its profile into report Read (created by perf record) and display the profile sched Tool to trace/measure scheduler properties (latencies) script Read (created by perf record) and display trace output stat Run a command and gather performance counter statistics test Runs sanity tests. timechart Tool to visualize total system behavior during a workload top System profiling tool. trace strace inspired tool probe Define new dynamic tracepoints See 'perf help COMMAND' for more information on a specific command.

References – and

Leave a Reply

Your email address will not be published. Required fields are marked *