# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 2025.4.14
- **来源摘要:** Convert the output from many profilers into a Graphviz dot graph
- **主页:** <https://github.com/jrfonseca/gprof2dot>
- **仓库:** <https://github.com/jrfonseca/gprof2dot>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gprof2dot (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2025.4.14
## 项目历史与用法

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Generate dot graphs from the output of several profilers | https://github.com/jrfonseca/gprof2dot


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
