Walks you through the full pipeline from perf or Callgrind output to SVG flamegraphs using Brendan Gregg's tools, then teaches you how to actually read them. Covers stackcollapse scripts, differential flamegraphs for before/after comparison, and the interpretation rules that matter: wide frames are hot, plateaus at the top are your real bottlenecks, tall stacks suggest recursion problems. The reading guide is honestly more valuable than the generation steps, since most people can make the SVG but don't know what the wide frame with narrow towers above it is trying to tell them. Includes options for consistent palettes and inverted icicle charts if you're into that.

skills.sh installs
728
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill flamegraphs --agent claude-code

Installs into .claude/skills of the current project.

Files

Flamegraphs

Purpose

Guide agents through the pipeline from profiler data to SVG flamegraph, and teach interpretation of flamegraphs to drive concrete optimisation decisions.

Triggers

  • "How do I generate a flamegraph from perf data?"
  • "How do I read a flamegraph?"
  • "The flamegraph shows a wide frame — what does that mean?"
  • "How do I generate a flamegraph from Callgrind?"
  • "I want to compare two flamegraphs (before/after)"

Workflow

1. Install FlameGraph tools

git clone https://github.com/brendangregg/FlameGraph
# No install needed; scripts are in the repo
export PATH=$PATH:/path/to/FlameGraph

2. perf → flamegraph (most common path)

# Step 1: record
perf record -F 999 -g -o perf.data ./prog

# Step 2: generate script output
perf script -i perf.data > out.perf

# Step 3: collapse stacks
stackcollapse-perf.pl out.perf > out.folded

# Step 4: generate SVG
flamegraph.pl out.folded > flamegraph.svg

# Step 5: view
xdg-open flamegraph.svg     # Linux
open flamegraph.svg          # macOS

One-liner:

perf record -F 999 -g ./prog && perf script | stackcollapse-perf.pl | flamegraph.pl > fg.svg

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Category
Debugging
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54

Recommended

More Debugging
1madteacher avatarflutter-networkingmadteacher/mad-agents-skillsImplement, fix, debug, review, or refactor Flutter networking code for HTTP/REST APIs, WebSocket realtime flows, authentication and token refresh, request heade727skills.sh installs
2zate avatargodot-optimizationzate/cc-godotExpert knowledge of Godot performance optimization, profiling, bottleneck identification, and optimization techniques. Use when helping improve game performance725skills.sh installs
3joellewis avatarexchange-connectivityjoellewis/finance_skillsGuide the design and management of trading venue connectivity and market data infrastructure. Owns the FIX session layer (logon, heartbeats, sequence number gap706skills.sh installs
4mohitmishra786 avatarlldbmohitmishra786/low-level-dev-skillsLLDB debugger skill for C/C++/Swift/Objective-C programs. Use when debugging with LLDB on macOS, FreeBSD, or Linux-clang environments, mapping GDB mental models703skills.sh installs
5joellewis avatargips-compliancejoellewis/finance_skillsEnsure firms claiming GIPS compliance under the CFA Institute Global Investment Performance Standards satisfy requirements for composite construction, performan689skills.sh installs
6rstackjs avatarrspack-best-practicesrstackjs/agent-skillsRspack best practices for config, CLI workflow, type checking, CSS, bundle optimization, assets and profiling. Use when writing, reviewing, or troubleshooting R689skills.sh installs