Brendan Gregg
brendangregg.com โบ perf.html
Linux perf Examples
# Sample CPU stack traces for the entire system, with dwarf stacks, at 99 Hertz, for 10 seconds: perf record -F 99 -a --call-graph dwarf sleep 10 ยท # Sample CPU stack traces for the entire system, using last branch record for stacks, ... (>= Linux 4.?): perf record -F 99 -a --call-graph lbr sleep 10
Linux Man Pages
man7.org โบ linux โบ man-pages โบ man1 โบ perf-record.1.html
perf-record(1) - Linux manual page
If other --filter exists, the new filter expression will be combined with them by &&. --latency Enable data collection for latency profiling. Use perf report --latency for latency-centric profile. -a, --all-cpus System-wide collection from all CPUs (default if no target is specified).
linux perf record: difference between count (-c) and frequency (-F) options - Stack Overflow
I'm trying to understand what the -c and -F options of perf record really do but I cannot explain what I'm seeing. I'm running these commands: perf record -a -F sleep 1 and perf More on stackoverflow.com
linux kernel - Performance monitoring with perf - Stack Overflow
In fact, you can use switches like ... record events. Additionally perf records samples from shared libraries as well. (Please consult the perf man-page for more details). As I said previously, perf report should be an ideal tool to calculate the number of samples of event cycles ... More on stackoverflow.com
performancecounter - Use linux perf utility to report counters every second like vmstat - Stack Overflow
There is perf command-linux utility in Linux to access hardware performance-monitoring counters, it works using perf_events kernel subsystems. perf itself has basically two modes: perf record/perf... More on stackoverflow.com
An awesome illustrated guide on using perf to profile and debug programs on Linux
Self promotion? More on reddit.com
Videos
12:33
Fastware - perf - How to analyse the performance of my program! ...
44:55
Linux perf tool metrics - Ian Rogers - YouTube
18:19
Introduction to Perf - Linux Performance Analysis - YouTube
15:29
How to profile your C code using gprof and linux perf - YouTube
54:29
Linux Performance Tools, Brendan Gregg, part 1 of 2 - YouTube
Linux Man Pages
linux.die.net โบ man โบ 1 โบ perf-record
perf-record(1) - Linux man page
Do call-graph (stack chain/backtrace) recording. ... Don't print any message, useful for scripting. ... Be more verbose (show counter open errors, etc). ... Per thread counts. ... Sample addresses. ... Sample timestamps. Use it with perf report -D to see the timestamps, for instance.
Perfwiki
perfwiki.github.io โบ main โบ tutorial
Introduction - perf: Linux profiling with performance counters
perf record -N dd if=/dev/zero of=/dev/null count=100000 ยท For some events, it is necessary to be root or have specific capabilities to invoke the perf tool. However, modern Linux systems allow configuring access for non-root users via the /proc/sys/kernel/perf_event_paranoid file.
Linux Man Pages
man7.org โบ linux โบ man-pages โบ man1 โบ perf-report.1.html
perf-report(1) - Linux manual page
Usually more convenient to use --branch-history for this. value can be: - percent: display overhead percent (default) - period: display event period - count: display event count --children Accumulate callchain of children to parent entry so that then can show up in the output. The output will have a new "Children" column and will be sorted on the data. It requires callchains are recorded. See the โOverhead calculationโ section for more details.
Linux Man Pages
man7.org โบ linux โบ man-pages โบ man1 โบ perf-stat.1.html
perf-stat(1) - Linux manual page
This command runs a command and gathers performance counter statistics from it. <command>... Any command you can specify in a shell. record See STAT RECORD. report See STAT REPORT. -e, --event= Select the PMU event.
Red Hat
docs.redhat.com โบ en โบ documentation โบ red_hat_enterprise_linux โบ 8 โบ html โบ monitoring_and_managing_system_status_and_performance โบ recording-and-analyzing-performance-profiles-with-perf_monitoring-and-managing-system-status-and-performance
Chapter 21. Recording and analyzing performance profiles with perf | Monitoring and managing system status and performance | Red Hat Enterprise Linux | 8 | Red Hat Documentation
Uses the last branch record hardware on Intel processors. ... You can use perf report to display and analyze a perf.data file.
Linux Man Pages
man7.org โบ linux โบ man-pages โบ man1 โบ perf.1.html
perf(1) - Linux manual page
Performance counters for Linux are a new kernel-based subsystem that provide a framework for all things performance analysis. It covers hardware level (CPU/PMU, Performance Monitoring Unit) features and software features (software counters, tracepoints) as well. perf-stat(1), perf-top(1), perf-record...
Perfwiki
perfwiki.github.io โบ main
perf: Linux profiling with performance counters
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.
Ubuntu
manpages.ubuntu.com โบ bionic โบ man(1)
Ubuntu Manpage: perf-record - Run a command and record its profile into perf.data
Record build-id of all DSOs regardless whether itโs actually hit or not. ... Configure all used events to run in kernel space. ... Configure all used events to run in user space. --timestamp-filename Append timestamp to output file name. ... Generate multiple perf.data files, timestamp prefixed, switching to a new one based on mode value: "signal" - when receiving a SIGUSR2 (default value) or <size> - when reaching the size threshold, size is expected to be a number with appended unit character - B/K/M/G <time> - when reaching the time threshold, size is expected to be a number with appended unit character - s/m/h/d
OneUptime
oneuptime.com โบ home โบ blog โบ how to analyze system performance with perf on ubuntu
How to Analyze System Performance with perf on Ubuntu
January 15, 2026 - # Comprehensive cache analysis perf stat -e L1-dcache-loads,L1-dcache-load-misses,\ L1-icache-load-misses,LLC-loads,LLC-load-misses ./my_program # Calculate cache miss ratios # L1 data cache miss ratio = L1-dcache-load-misses / L1-dcache-loads # LLC (Last Level Cache) miss ratio = LLC-load-misses / LLC-loads # A high cache miss ratio indicates poor memory access patterns # Consider restructuring data for better cache locality ยท While perf stat provides summary statistics, perf record captures detailed profiling data that can be analyzed with perf report.
GitHub
github.com โบ torvalds โบ linux โบ blob โบ master โบ tools โบ perf โบ Documentation โบ perf-record.txt
linux/tools/perf/Documentation/perf-record.txt at master ยท torvalds/linux
This file can then be inspected later on, using 'perf report'. ... Collect raw sample records from all opened counters (default for tracepoint counters).
Author ย torvalds
Thomas-Krenn.AG
thomas-krenn.com โบ en โบ wiki โบ Linux_performance_counters_with_perf_and_perf-tools
Linux performance counters with perf and perf-tools - Thomas-Krenn-Wiki-en
November 18, 2025 - Linux performance counters, also called perf_events, are queried and analyzed via perf command. The perf command is part of the linux-tools-common under Ubuntu. At first, perf_events were known as Performance Counters for Linux (PCL). They are used for performance analysis and reporting of performance counters and values, for example, special hardware directories of the CPUs (PMU).