flamegraphs

Convert profiler outputs from perf, Callgrind, pprof, and DTrace into SVG flamegraphs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you pinpoint performance bottlenecks in your code by generating and interpreting flamegraphs from various profiler outputs.

Core Features & Use Cases

  • Generate Flamegraphs: Convert data from perf, Valgrind Callgrind, Go pprof, and DTrace into interactive SVG flamegraphs.
  • Interpret Flamegraphs: Understand how to read flamegraphs to identify hot spots, regressions, and areas for optimization.
  • Use Case: After running a performance test, you generate a perf.data file. Use this Skill to convert it into a flamegraph.svg to visually identify which functions are consuming the most CPU time.

Quick Start

Generate a flamegraph from perf data by running the command perf record -F 999 -g ./prog && perf script | stackcollapse-perf.pl | flamegraph.pl > fg.svg.

Frequently Asked Questions about flamegraphs

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

FAQPage Schema
How do I generate a flamegraph from perf data to find performance bottlenecks?

You generate a flamegraph from perf data by running perf record, piping the output through stackcollapse-perf.pl, and passing it to flamegraph.pl to create an SVG visualization of CPU bottlenecks.

What profiler output formats can be converted into flamegraph visualizations?

Profiler output formats supported for flamegraph conversion include perf, Valgrind Callgrind, Go pprof, and DTrace, all of which can be transformed into interactive SVG visualizations using Brendan Gregg's FlameGraph tools.

How do flamegraphs help with code profiling and performance optimization?

Flamegraphs assist performance optimization by visually representing call stack depth and highlighting hot frames, allowing you to pinpoint exactly which functions consume the most CPU time.

Can I use this to visualize Go pprof output and identify CPU hot spots?

Yes, you can convert Go pprof output into interactive SVG flamegraphs to identify CPU hot spots, utilizing the same Brendan Gregg FlameGraph pipeline used for other profilers.

What is the best way to read a flamegraph to identify performance regressions?

Reading a flamegraph for performance regressions involves identifying the widest blocks at the base of the visualization, which represent the functions consuming the most CPU time within the call stack.

Do I need Brendan Gregg's FlameGraph tools installed to convert profiler data?

Yes, converting profiler data requires Brendan Gregg's FlameGraph tools, specifically scripts like stackcollapse-perf.pl and flamegraph.pl, to process and render the final SVG visualizations.