# 使用 Homebrew, dnf, Nix 安装 gprof2dot

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

## 安装

```sh
sudo av install brew:gprof2dot
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gprof2dot
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install gprof2dot
```

  证据: Fedora Rawhide package metadata: gprof2dot 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#gprof2dot
```

  证据: nixpkgs package indexes: gprof2dot from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## 软件包事实

- **软件包键:** brew:gprof2dot
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gprof2dot>
- **版本:** 2025.4.14
- **来源摘要:** Convert the output from many profilers into a Graphviz dot graph
- **主页:** <https://github.com/jrfonseca/gprof2dot>
- **仓库:** <https://github.com/jrfonseca/gprof2dot>
- **许可证:** LGPL-3.0-or-later
- **源码归档:** <https://files.pythonhosted.org/packages/bb/fd/cad13fa1f7a463a607176432c4affa33ea162f02f58cc36de1d40d3e6b48/gprof2dot-2025.4.14.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gprof2dot (cli)
- gprof2dot (别名)

## 依赖

- graphviz
- python@3.14

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2025.4.14
- 本地数据: OK
- 上游仓库: https://github.com/jrfonseca/gprof2dot
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

gprof2dot is a Python command-line tool by Jose Fonseca that converts profiler output into Graphviz dot call graphs. The project README and PyPI page describe support for Linux perf, Valgrind callgrind, Sysprof, Xperf, VTune, Very Sleepy, Python profilers, Java HPROF, prof/gprof, DTrace, and stackcollapse data from FlameGraph.

Its niche is performance visualization without a heavy IDE: collect profile data with an existing profiler, run gprof2dot to produce a dot graph, and render it with Graphviz.

### 项目历史

The project began as a single Python script oriented around gprof-style output and grew into a multi-format profiler converter. The GitHub repository contains the main gprof2dot.py script, examples, schema data, tests, packaging metadata, and sample images.

The README records that the maintainer considers the tool to fulfill his needs and has limited maintenance time, which helps explain its conservative evolution: new profiler formats and compatibility work are added around a stable core rather than through a large application framework.

### 采用历史

PyPI lists gprof2dot as a mature console package for developers, with Jose Fonseca and toutpt as maintainers and Python 3.8 or newer as the package requirement. Homebrew packages it with Graphviz and Python dependencies, and the input package-manager facts also list Fedora and Nix.

The package is adopted where profiling workflows need portable artifacts: CI reports, command-line investigations, or sharing a rendered call graph with teammates who do not have the original profiler UI installed.

### 使用方式

The canonical workflow pipes profiler data through gprof2dot and then through Graphviz, for example perf script output into gprof2dot -f perf and dot -Tpng. The README also documents workflows for Xperf, VTune, gprof, Python profile/cProfile, Java HPROF, DTrace, stackcollapse, and graph comparison.

Options prune small nodes and edges, choose input format, pick color maps, strip C++ qualifiers, focus on roots or leaves, limit graph depth, and compare two similarly structured profiles.

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

gprof2dot is a durable glue package: it connects many profilers to Graphviz through a small CLI and avoids being tied to a single language runtime or profiler UI.

Package maintainers care about it because it is pure-Python-ish operationally but depends on Graphviz for the visible payoff; the package is most valuable when the executable and dot renderer are both easy to install from the same ecosystem.

### 时间线

- 2025: PyPI records release 2025.4.14 and Python >=3.8 metadata.
- 2026: Homebrew metadata packages gprof2dot with Graphviz and Python dependencies.

### Related projects

- Graphviz is the rendering backend for dot output.
- xdot.py is recommended by the README as an interactive viewer for generated graphs.
- FlameGraph stackcollapse data is a related input format, bridging gprof2dot with flame-graph tooling.
- Linux perf, Valgrind callgrind, gprof, DTrace, VTune, Xperf, Sysprof, Python profilers, and Java HPROF are related profiler sources.

### 来源

- <https://formulae.brew.sh/formula/gprof2dot>
- <https://github.com/jrfonseca/gprof2dot>
- <https://pypi.org/project/gprof2dot/>
- <https://raw.githubusercontent.com/jrfonseca/gprof2dot/main/README.md>


## 安全说明

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:** gprof2dot
- **Version Scheme:** 0
- **Revision:** 0
- **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 - gprof2dot: normalized package name match | nixpkgs package indexes: gprof2dot from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- dnf - gprof2dot - 1.0-0.30.D20250404gitff9cd266b9.fc45: normalized package name match | Fedora Rawhide package metadata: gprof2dot from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Generate dot graphs from the output of several profilers | https://github.com/jrfonseca/gprof2dot


## 相关链接

- [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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [graphviz](https://pkg.so/zh-hans/brew/graphviz/) - Runtime dependency declared by Homebrew.
- [flamegraph](https://pkg.so/zh-hans/brew/flamegraph/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling, visualization.
- [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.
- [xdot](https://pkg.so/zh-hans/brew/xdot/) - Shares pkgdb curated category or tags: cli, developer-tools, dot, graphviz.
- [snakeviz](https://pkg.so/zh-hans/brew/snakeviz/) - Shares pkgdb curated category or tags: cli, developer-tools, profiling, visualization.
- [cargo-flamegraph](https://pkg.so/zh-hans/brew/cargo-flamegraph/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling.
- [memray](https://pkg.so/zh-hans/brew/memray/) - Shares pkgdb curated category or tags: cli, developer-tools, performance, profiling.
- [git-big-picture](https://pkg.so/zh-hans/brew/git-big-picture/) - Shares pkgdb curated category or tags: cli, developer-tools, graphviz, visualization.
- [graphviz2drawio](https://pkg.so/zh-hans/brew/graphviz2drawio/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, convert, developer, developer-tools, dot.

## Combined YAML source

View the package source record on GitHub. [combined/gprof2dot.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gprof2dot.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
