git404hub

what is flamegraph fr?

brendangregg/flamegraph — explained in plain English

Analysis updated 2026-06-21

19,473PerlAudience · ops devopsComplexity · 3/5Setup · moderate

tl;dr

FlameGraph turns raw CPU profiler output into an interactive SVG chart where the widest boxes show which functions consume the most time, making it fast to spot performance bottlenecks in any program.

vibe map

mindmap
  root((FlameGraph))
    What it does
      Visualize CPU usage
      Interactive SVG output
      Stack trace analysis
    Three-step process
      Capture perf data
      Collapse stacks
      Render SVG
    Profiler support
      Linux perf
      DTrace
      Java and Go
    Use cases
      Debug slow services
      Optimize code
      Share findings

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Profile a slow production service with Linux perf, then generate a flame graph to pinpoint exactly which functions are the CPU bottleneck.

VIBE 2

Optimize a Go or Java application by visualizing call stacks and clicking into the widest bars that represent the most time-consuming code paths.

VIBE 3

Share an interactive SVG flame graph with a colleague so they can zoom in and search for specific functions in a browser without installing any tools.

what's the stack?

Perl

how it stacks up fr

brendangregg/flamegraphso-fancy/diff-so-fancyaldanial/cloc
Stars19,47318,01722,970
LanguagePerlPerlPerl
Setup difficultymoderateeasyeasy
Complexity3/51/51/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 1h+

Requires a compatible profiler such as Linux perf or DTrace already installed and configured on your system.

in plain english

FlameGraph is a tool that turns raw performance profiling data into a visual chart, called a flame graph, that makes it instantly clear where a program is spending most of its time. The problem it solves is performance diagnosis: when a program is slow, developers need to know which function calls are eating CPU time, but raw profiler output is a wall of numbers that is very hard to read. A flame graph stacks those function calls visually so that the widest boxes at the top are the biggest time consumers. The process has three steps. First, you capture stack samples from your running program using a profiler like Linux perf, DTrace, or SystemTap, tools that periodically snapshot what the CPU is doing. Second, a "stackcollapse" script reformats those raw samples into a tidy text format. Third, the main flamegraph.pl script takes that text and renders an interactive SVG image you can open in a browser, zoom into by clicking, and search with Ctrl-F to find specific functions. You would reach for this tool when a production service is slow and you need to find the root cause quickly, or when optimizing code and you want proof of which areas are worth improving. It supports profiling data from Linux perf, DTrace, SystemTap, Java, Go, Instruments, VTune, and more. The core script is written in Perl.

prompts (copy fr)

prompt 1
Walk me through the full process of profiling a Node.js process on Linux using perf, then running the brendangregg/flamegraph stackcollapse scripts and flamegraph.pl to produce an interactive SVG.
prompt 2
I have a slow Python web service. Show me how to capture a CPU profile using py-spy and pipe the output through brendangregg/flamegraph to create a visual flame graph.
prompt 3
Help me write a shell script that automates all three flamegraph steps for a given PID: capture perf data for 30 seconds, collapse the stacks, and render the SVG output file.
prompt 4
I generated a flame graph SVG from my Go service. Explain what the width and height of each box mean and how I should read it to find the root cause of slowness.

Frequently asked questions

what is flamegraph fr?

FlameGraph turns raw CPU profiler output into an interactive SVG chart where the widest boxes show which functions consume the most time, making it fast to spot performance bottlenecks in any program.

What language is flamegraph written in?

Mainly Perl. The stack also includes Perl.

How hard is flamegraph to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is flamegraph for?

Mainly ops devops.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.