# 使用 Homebrew, MacPorts, Nix 安装 async-profiler

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

## 安装

```sh
sudo av install brew:async-profiler
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install async-profiler
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install async-profiler
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#async-profiler
```

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

## 软件包事实

- **软件包键:** brew:async-profiler
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/async-profiler>
- **版本:** 4.4
- **来源摘要:** Sampling CPU & HEAP profiler for Java using AsyncGetCallTrace + perf_events
- **主页:** <https://github.com/async-profiler/async-profiler>
- **仓库:** <https://github.com/async-profiler/async-profiler>
- **上游文档:** <https://github.com/async-profiler/async-profiler#readme>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/async-profiler/async-profiler/archive/refs/tags/v4.4.tar.gz>
- **最后更新:** 2026-06-22T14:02:47-07:00
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- asprof (cli)
- jfrconv (cli)
- asprof (别名)
- jfrconv (别名)

## 构建依赖

- cmake
- openjdk

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 4.4
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://github.com/async-profiler/async-profiler
- 检测到的最新版本: v4.4 (当前)
## 项目历史与用法

async-profiler is a low-overhead sampling profiler for HotSpot-based Java runtimes. Its package-manager identity is unusually strong because the everyday tool is a small native CLI, `asprof`, that produces artifacts Java engineers already trade around: flame graphs, collapsed stacks, JFR recordings, traces, trees, heatmaps, and converter outputs.

### 项目历史

The project started in 2016 with an initial proof of concept for profiling Java without the safepoint bias that affected many traditional JVM profilers. The README describes the core design as combining HotSpot-specific stack collection with native facilities such as perf events, so it can show Java frames alongside native, kernel, GC, and JIT compiler activity.

Over time async-profiler grew from a CPU sampler into a broader observability utility. Official documentation now covers CPU, allocation, native memory, lock, wall-clock, hardware/software counter, container, Java Flight Recorder, FlameGraph, OTLP, pprof, and converter workflows.

### 采用历史

The project became a default recommendation in the JVM performance community because it is scriptable, produces portable output, and does not require a heavyweight GUI profiler. The package is distributed through Homebrew, MacPorts, and Nix in the supplied package metadata, while upstream publishes Linux and macOS binaries plus nightly builds from GitHub Actions.

Recent 4.x releases show continued production-oriented maintenance rather than archival status: v4.3 added native lock profiling, latency filtering, Prometheus-format metrics, and Java-agent/JMX control, while v4.4 added differential flame graphs and call-trace memory limits.

### 使用方式

The normal package-manager workflow is to install the CLI and run `asprof` against a live JVM PID, for example saving a 30-second profile to an HTML flame graph. More advanced workflows attach it as a Java agent, run continuous loops, emit JFR/OTLP/pprof-compatible data, or convert recordings with the bundled converter tooling.

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

async-profiler is one of those packages whose formula matters more than its size suggests: a native tool with JVM-specific privileges, OS-specific packaging, architecture-specific binaries, and output formats that plug into a large performance-debugging ecosystem. It is also a good example of a CLI package that package managers make discoverable to users who otherwise would only encounter it through conference talks or performance postmortems.

### 时间线

- 2016: Initial Git commit and proof-of-concept async profiler work.
- v1.x: Early public release series established the standalone profiler package.
- 2026: v4.3 added native lock profiling, latency filtering, Prometheus metrics, and Java-agent/JMX control.
- 2026: v4.4 added differential flame graphs and further FlameGraph/JFR/OTLP improvements.

### Related projects

- The project sits near HotSpot, Linux perf events, Java Flight Recorder, Brendan Gregg-style FlameGraphs, OpenTelemetry, and pprof-style profiling workflows.

### 来源

- Official git metadata from https://github.com/async-profiler/async-profiler.git
- <https://github.com/async-profiler/async-profiler#readme>
- <https://github.com/async-profiler/async-profiler/releases.atom>
- <https://github.com/async-profiler/async-profiler/tree/master/docs>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** async-profiler
- **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 - async-profiler: normalized package name match | nixpkgs package indexes: pkgs/by-name/as/async-profiler/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - async-profiler: normalized package name match | MacPorts ports tree: java/async-profiler/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [cmake](https://www.automicvault.com/zh-hans/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [openjdk](https://www.automicvault.com/zh-hans/pkg/brew/openjdk/) - Build dependency declared by Homebrew.
- [gcviewer](https://www.automicvault.com/zh-hans/pkg/brew/gcviewer/) - Shares av.db curated category or tags: cli, developer-tools, java, performance.
- [jhiccup](https://www.automicvault.com/zh-hans/pkg/brew/jhiccup/) - Shares av.db curated category or tags: cli, developer-tools, java, performance.
- [py-spy](https://www.automicvault.com/zh-hans/pkg/brew/py-spy/) - Shares av.db curated category or tags: cli, developer-tools, performance, profiler.
- [samply](https://www.automicvault.com/zh-hans/pkg/brew/samply/) - Shares av.db curated category or tags: cli, developer-tools, performance, profiler.
- [sysprof](https://www.automicvault.com/zh-hans/pkg/brew/sysprof/) - Shares av.db curated category or tags: cli, developer-tools, performance, profiler.
- [tracy](https://www.automicvault.com/zh-hans/pkg/brew/tracy/) - Shares av.db curated category or tags: cli, developer-tools, performance, profiler.
- [alp](https://www.automicvault.com/zh-hans/pkg/brew/alp/) - Shares av.db curated category or tags: cli, developer-tools, profiler.
- [amdatu-bootstrap](https://www.automicvault.com/zh-hans/pkg/brew/amdatu-bootstrap/) - Shares av.db curated category or tags: cli, developer-tools, java.
- [clinic](https://www.automicvault.com/zh-hans/pkg/npm/clinic/) - Local package facts share a topical domain. Shared terms: async, cli, developer, developer-tools, heap.

## Combined YAML source

View the package source record on GitHub. [combined/async-profiler.yml](https://github.com/automic-vault/db/blob/main/combined/async-profiler.yml)


## 来源

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