# 使用 Homebrew, dnf, MacPorts, Nix 安装 flamegraph

查看 flamegraph 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:flamegraph
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install flamegraph
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install flamegraph
```

  证据: MacPorts ports tree: devel/flamegraph/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install flamegraph
```

  证据: Fedora Rawhide package metadata: flamegraph from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#flamegraph
```

  证据: nixpkgs package indexes: pkgs/by-name/fl/flamegraph/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:flamegraph
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/flamegraph>
- **版本:** 1.0
- **来源摘要:** Stack trace visualizer
- **主页:** <https://github.com/brendangregg/FlameGraph>
- **仓库:** <https://github.com/brendangregg/FlameGraph>
- **许可证:** CDDL-1.0
- **源码归档:** <https://github.com/brendangregg/FlameGraph/archive/refs/tags/v1.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- difffolded.pl (cli)
- files.pl (cli)
- flamegraph.pl (cli)
- pkgsplit-perf.pl (cli)
- range-perf.pl (cli)
- stackcollapse-aix.pl (cli)
- stackcollapse-elfutils.pl (cli)
- stackcollapse-gdb.pl (cli)
- stackcollapse-go.pl (cli)
- stackcollapse-instruments.pl (cli)
- stackcollapse-jstack.pl (cli)
- stackcollapse-ljp.awk (cli)
- stackcollapse-perf-sched.awk (cli)
- stackcollapse-perf.pl (cli)
- stackcollapse-pmc.pl (cli)
- stackcollapse-recursive.pl (cli)
- stackcollapse-sample.awk (cli)
- stackcollapse-stap.pl (cli)
- stackcollapse-vsprof.pl (cli)
- stackcollapse-vtune.pl (cli)
- stackcollapse.pl (cli)
- difffolded.pl (别名)
- files.pl (别名)
- flamegraph.pl (别名)
- pkgsplit-perf.pl (别名)
- range-perf.pl (别名)
- stackcollapse-aix.pl (别名)
- stackcollapse-elfutils.pl (别名)
- stackcollapse-gdb.pl (别名)
- stackcollapse-go.pl (别名)
- stackcollapse-instruments.pl (别名)
- stackcollapse-jstack.pl (别名)
- stackcollapse-ljp.awk (别名)
- stackcollapse-perf-sched.awk (别名)
- stackcollapse-perf.pl (别名)
- stackcollapse-pmc.pl (别名)
- stackcollapse-recursive.pl (别名)
- stackcollapse-sample.awk (别名)
- stackcollapse-stap.pl (别名)
- stackcollapse-vsprof.pl (别名)
- stackcollapse-vtune.pl (别名)
- stackcollapse.pl (别名)

## macOS 提供的库

- perl

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.0
- 本地数据: OK
- 上游仓库: https://github.com/brendangregg/FlameGraph
- 检测到的最新版本: v1.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

FlameGraph is Brendan Gregg's reference implementation for creating interactive SVG flame graphs from stack profiles. It ships the `flamegraph.pl` renderer and many `stackcollapse-*` converters that turn profiler output into folded stack input.

### 项目历史

The official Flame Graphs page describes flame graphs as a visualization Brendan Gregg created to identify the most frequent code paths in profiled software. The GitHub project packages the open source programs used to create interactive SVGs.

The repository documents a three-step workflow: capture stacks, fold stacks, and render with `flamegraph.pl`. Its converter scripts cover profiler outputs from Linux perf, DTrace, SystemTap, FreeBSD pmcstat, Xcode Instruments, Intel VTune, Java jstack, Go pprof, gdb, and other sources.

### 采用历史

The visualization spread from Gregg's performance-engineering work into talks, articles, operating-system profilers, open source tools, and commercial profilers. The official site says there are now over 100 other implementations and that flame graphs are available in most commercial profilers.

A major adoption path was the simplicity of the file format: profilers only need stack samples that can be collapsed into semicolon-separated folded stacks, after which the reference Perl script emits a portable interactive SVG.

### 使用方式

The common package workflow is `perf record` or another profiler to capture stacks, `stackcollapse-*` to produce folded stacks, and `flamegraph.pl` to create an SVG. The README shows examples for Linux perf and DTrace and notes that folded input can be filtered with tools such as `grep` before rendering.

The scripts expose options for title, width, frame height, colors, palettes, inverted icicle graphs, flame charts, differential colors, and consistent palette maps.

### 为什么软件包爱好者会关心

FlameGraph is one of the canonical tiny-tools packages: mostly scripts, little ceremony, and huge influence. Package managers distribute it because one checkout provides the reference renderer plus a toolbox of converters for many profiling ecosystems.

Its significance is also cultural. The package gave systems programmers a common visual language for stack-profile data, and the folded-stack interchange format made it easy for unrelated profilers and language runtimes to interoperate.

### 时间线

- 2013: Brendan Gregg gave an early LISA plenary talk on flame graphs.
- 2016: The Flame Graph article was published in ACM Queue and Communications of the ACM.
- 2017: Gregg presented an updated USENIX ATC talk, Visualizing Performance with Flame Graphs.
- 2020s: Official site reports over 100 implementations and broad support in commercial profilers.

### Related projects

- d3-flame-graph is identified by the official site as a widely used interactive d3 implementation.
- FlameScope is linked from the official site for time-range-oriented flame graph analysis.
- Linux perf, DTrace, SystemTap, Xcode Instruments, VTune, jstack, and Go pprof are among the profiler ecosystems supported by converter scripts.

### 来源

- <https://github.com/brendangregg/FlameGraph>
- <https://raw.githubusercontent.com/brendangregg/FlameGraph/master/README.md>
- <https://www.brendangregg.com/flamegraphs.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** flamegraph
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- Nix - flamegraph: normalized package name match | nixpkgs package indexes: pkgs/by-name/fl/flamegraph/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - flamegraph - 1.0-24.20241020git41fee1f.fc45: normalized package name match | Fedora Rawhide package metadata: flamegraph from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Stack trace visualizer | http://www.brendangregg.com/flamegraphs.html
- dnf - flamegraph-demos - 1.0-24.20241020git41fee1f.fc45: normalized package name match | Fedora Rawhide package metadata: flamegraph-demos from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Demos of graphs produced by flamegraph | http://www.brendangregg.com/flamegraphs.html
- dnf - flamegraph-stackcollapse - 1.0-24.20241020git41fee1f.fc45: normalized package name match | Fedora Rawhide package metadata: flamegraph-stackcollapse from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Stack collapsers and support scripts | http://www.brendangregg.com/flamegraphs.html
- dnf - flamegraph-stackcollapse-perf - 1.0-24.20241020git41fee1f.fc45: normalized package name match | Fedora Rawhide package metadata: flamegraph-stackcollapse-perf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Stack collapser for perf output | http://www.brendangregg.com/flamegraphs.html
- dnf - flamegraph-stackcollapse-php - 1.0-24.20241020git41fee1f.fc45: normalized package name match | Fedora Rawhide package metadata: flamegraph-stackcollapse-php from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Stack collapser for PHP | http://www.brendangregg.com/flamegraphs.html
- MacPorts - flamegraph: normalized package name match | MacPorts ports tree: devel/flamegraph/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [gprof2dot](https://pkg.so/zh-hans/brew/gprof2dot/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling, visualization.
- [cargo-flamegraph](https://pkg.so/zh-hans/brew/cargo-flamegraph/) - Shares pkgdb curated category or tags: cli, developer-tools, flamegraph, performance, profiling.
- [flamebearer](https://pkg.so/zh-hans/brew/flamebearer/) - Shares pkgdb curated category or tags: cli, developer-tools, flamegraph, performance, profiling.
- [qcachegrind](https://pkg.so/zh-hans/brew/qcachegrind/) - Shares pkgdb curated category or tags: cli, developer-tools, profiling, visualization.
- [py-spy](https://pkg.so/zh-hans/brew/py-spy/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling.
- [snakeviz](https://pkg.so/zh-hans/brew/snakeviz/) - Shares pkgdb curated category or tags: cli, developer-tools, profiling, visualization.
- [async-profiler](https://pkg.so/zh-hans/brew/async-profiler/) - Shares pkgdb curated category or tags: cli, developer-tools, flamegraph, performance, profiling.
- [memray](https://pkg.so/zh-hans/brew/memray/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling.

## Combined YAML source

View the package source record on GitHub. [combined/flamegraph.yml](https://github.com/mxcl/pkgdb/blob/main/combined/flamegraph.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
