linux-perf

Profile Linux CPU performance with perf record, report, and stat.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill linux-perf-awfixers-stuff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-perf
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/linux-perf
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill linux-perf-awfixers-stuff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Linux perf provides a structured approach to profiling CPU performance on Linux, helping engineers locate bottlenecks, hotspots, and inefficiencies by collecting samples, hardware counters, and call graphs.

Core Features & Use Cases

  • Collect sampling data with perf record and analyze with perf report and perf top.
  • Measure hardware counters (cache misses, IPC, branches) with perf stat.
  • Visualize performance with flamegraphs and call graphs to guide optimizations.
  • Use Case: When a program runs slowly on Linux, profile CPU usage to identify hot functions and guide optimization.

Quick Start

Install perf, collect data with perf record, and generate a report with perf report.

Frequently Asked Questions about linux-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find CPU hotspots in a Linux process using perf?

Profile CPU usage by collecting sampling data with perf record, then analyze the output with perf report to identify hot functions and performance bottlenecks in your Linux process.

How do I measure cache misses and hardware counters on Linux?

Measure hardware counters like cache misses, IPC, and branches by running perf stat against your target application, which collects and reports CPU performance metrics directly from the hardware.

How do I generate a flamegraph from perf sampling data?

Generate a flamegraph by first collecting call graph samples with perf record, then processing the captured performance data to visualize CPU usage and call stacks, which guides optimization efforts.

What is the best way to profile a slow running program on Linux?

The best way to profile a slow Linux program is to use perf for CPU performance analysis, applying the workflow of collecting samples with perf record and visualizing results with flamegraphs to locate inefficiencies.

Do I need to install perf separately to analyze CPU performance on Linux?

Yes, you need to install perf separately to profile CPU performance, set up the tool, collect samples with perf record, and generate reports with perf report across your Linux binaries.