Main Page

From Perf Wiki
(Difference between revisions)
Jump to: navigation, search
(References/Useful links)
(perf: Linux profiling with performance counters: add Google summer of code section)
 
(12 intermediate revisions by 3 users not shown)
Line 21: Line 21:
 
* <tt>[[Tutorial#Benchmarking_with_perf_bench | perf bench</tt>]]: run different kernel microbenchmarks
 
* <tt>[[Tutorial#Benchmarking_with_perf_bench | perf bench</tt>]]: run different kernel microbenchmarks
  
To learn more, see the examples in the [[Tutorial]].
+
To learn more, see the examples in the [[Tutorial]] or how to do a [[Top-Down Analysis]].
 +
 
 +
To ask questions, report bugs/issues mail the [https://lore.kernel.org/linux-perf-users/ mailing list] or use [https://bugzilla.kernel.org/buglist.cgi?bug_status=__open__&order=changeddate%20DESC%2Cpriority%2Cbug_severity&product=Tracing%2FProfiling&query_format=advanced bugzilla].
  
 
=== Wiki Contents  ===
 
=== Wiki Contents  ===
  
 
* [[Tutorial]]
 
* [[Tutorial]]
 +
* [[Top-Down Analysis]]
 
* [[Todo]]
 
* [[Todo]]
 
* [[HardwareReference]]
 
* [[HardwareReference]]
 
* [[perf_events kernel ABI]]
 
* [[perf_events kernel ABI]]
 
* [[perf tools support for Intel&reg; Processor Trace]]
 
* [[perf tools support for Intel&reg; Processor Trace]]
 +
* [[Useful Links]]: How perf tools work, examples of usage to solve real problems, observability articles, hardware manuals
 +
* [[Glossary]]
 +
* [[Latest Manual Pages]]
 +
* [[Development]]
 +
 +
=== Google Summer of Code ===
  
=== References/Useful links ===
+
As part of the [https://www.linuxfoundation.org/ Linux Foundation] the perf tool has participated in the [https://summerofcode.withgoogle.com/ Google Summer-of-Code] since 2021. [https://wiki.linuxfoundation.org/gsoc/2024-gsoc-perf Check out the 2024 process].
* [http://indico.cern.ch/materialDisplay.py?contribId=20&sessionId=4&materialId=slides&confId=141309 Roberto Vitillo's presentation on Perf events]
+
* [http://www.brendangregg.com/perf.html Brendan Gregg's perf examples]
+
* [https://youtu.be/nXaxk27zwlk CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"]
+
* [https://www.jabperf.com/5-level-vs-4-level-page-tables-does-it-matter/ Mark Dawson, Jr. uses 'perf diff' on "5-level vs 4-level Page Tables: Does It Matter?"]
+
* [https://joemario.github.io/blog/2016/09/01/c2c-blog/ Joe Mario's original 2016 article about 'perf c2c' "C2C - False Sharing Detection in Linux Perf"]
+
* [https://www.linaro.org/blog/using-the-arm-statistical-profiling-extension-to-detect-false-cache-line-sharing/ Leo Yan on supporting 'perf c2c' on Armv8.2 "Using the Arm Statistical Profiling Extension to detect false cache-line sharing"]
+

Latest revision as of 17:33, 23 January 2024

Contents

[edit] perf: Linux profiling with performance counters

...More than just counters...

[edit] Introduction

This is the wiki page for the Linux perf command, also called perf_events. perf is powerful: it can instrument CPU performance counters, tracepoints, kprobes, and uprobes (dynamic tracing). It is capable of lightweight profiling. It is also included in the Linux kernel, under tools/perf, and is frequently updated and enhanced.

perf began as a tool for using the performance counters subsystem in Linux, and has had various enhancements to add tracing capabilities.

Performance counters are CPU hardware registers that count hardware events such as instructions executed, cache-misses suffered, or branches mispredicted. They form a basis for profiling applications to trace dynamic control flow and identify hotspots. perf provides rich generalized abstractions over hardware specific capabilities. Among others, it provides per task, per CPU and per-workload counters, sampling on top of these and source code event annotation.

Tracepoints are instrumentation points placed at logical locations in code, such as for system calls, TCP/IP events, file system operations, etc. These have negligible overhead when not in use, and can be enabled by the perf command to collect information including timestamps and stack traces. perf can also dynamically create tracepoints using the kprobes and uprobes frameworks, for kernel and userspace dynamic tracing. The possibilities with these are endless.

The userspace perf command present a simple to use interface with commands like:

To learn more, see the examples in the Tutorial or how to do a Top-Down Analysis.

To ask questions, report bugs/issues mail the mailing list or use bugzilla.

[edit] Wiki Contents

[edit] Google Summer of Code

As part of the Linux Foundation the perf tool has participated in the Google Summer-of-Code since 2021. Check out the 2024 process.

Personal tools