linux-perf

Profile Linux CPU hotspots and generate flamegraphs using the perf tool.

159|20|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill linux-perf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-perf
Source: https://github.com/mohitmishra786/low-level-dev-skills/tree/main/skills/profilers/linux-perf
Command: npx skills add https://github.com/mohitmishra786/low-level-dev-skills --skill linux-perf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you diagnose and resolve CPU performance bottlenecks on Linux systems by guiding you through the powerful perf tool.

Core Features & Use Cases

  • CPU Profiling: Collects sampling profiles to identify performance hotspots.
  • Hardware Counter Measurement: Measures key hardware events like cache misses and branch mispredictions.
  • Flamegraph Generation: Integrates with tools to create visual flamegraphs for easier analysis.
  • Use Case: You're experiencing slow application performance on Linux. Use this Skill to run perf record and perf report to pinpoint the exact functions consuming the most CPU time.

Quick Start

Use the linux-perf skill to generate a flamegraph for the 'my_program' executable.

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 application?

To find CPU hotspots in a Linux application, use the `perf record` command for sampling and `perf report` to pinpoint the exact functions consuming the most CPU time. This identifies performance bottlenecks effectively.

What is off-CPU analysis in Linux performance profiling?

Off-CPU analysis in Linux performance profiling measures the time threads spend waiting or blocked rather than executing on the CPU. It helps diagnose bottlenecks caused by I/O, locks, or scheduling delays.

Do I need debug symbols to generate a flamegraph with perf?

Yes, you need debug symbols to generate a flamegraph with `perf` for effective frame unwinding. Recompiling your application with debug symbols ensures the call stack is accurately mapped in the visualization.

Can I measure cache misses and branch mispredictions using Linux perf?

Yes, you can measure cache misses and branch mispredictions using Linux `perf` hardware counter measurement. It collects key hardware events to help you understand low-level microarchitectural inefficiencies.

What are the limitations of using perf for CPU profiling?

A key limitation of using `perf` for CPU profiling is that effective frame unwinding requires the `linux-perf` package and application recompilation with debug symbols. Without this, call stacks remain incomplete.