# 使用 Homebrew, apt, Nix, zypper 安装 uftrace

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

## 安装

```sh
sudo av install brew:uftrace
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install uftrace
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install uftrace
```

  证据: Debian stable package indexes: uftrace from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#uftrace
```

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

- zypper (92%):

```sh
sudo zypper install uftrace
```

  证据: openSUSE Tumbleweed package metadata: uftrace from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:uftrace
- **软件包管理器:** Homebrew
- **版本:** 0.19
- **来源摘要:** Function graph tracer for C/C++/Rust
- **主页:** <https://uftrace.github.io/slide/>
- **仓库:** <https://github.com/namhyung/uftrace>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- uftrace (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

uftrace is a userspace function graph tracer for C, C++, Rust, and Python programs. It records function entry and exit timing, can combine user, library, kernel, event, and scheduling information, and presents the execution flow through replay, reports, graphs, scripts, a TUI, and export formats.

### 项目历史

The official repository was created in 2014. The README says uftrace was heavily inspired by the Linux kernel ftrace framework, and that the name combines user and ftrace.

The project began with compiler-supported function tracing but later added dynamic tracing. The README describes that shift explicitly: it initially supported tracing with compiler support, then gained the ability to trace without recompilation by analyzing function prologues and dynamically patching instructions.

Recent releases show the tool continuing to broaden language, architecture, and analysis support. The NEWS file records Python tracing in v0.14, RISC-V support in v0.15, separate debug-file support in v0.16, watchpoints in v0.17, filter-condition work in v0.18, and latency percentile scripting plus Chrome dump timestamp improvements in v0.19.

### 采用历史

uftrace's adoption niche is developers and performance investigators who want call-graph-level tracing from a command-line tool, especially on Linux. Its package-manager footprint in this batch includes Homebrew, Debian, Nix, Ubuntu, and openSUSE, showing cross-distribution demand beyond its upstream GitHub audience.

The project also maintains package-awareness in its README by displaying Repology packaging status, a small signal that upstream expects distribution packages to be a major discovery and installation path.

### 使用方式

Users can run uftrace live against a program, or record first and replay/report/graph/dump/analyze the saved `uftrace.data` directory. The command set includes `record`, `replay`, `report`, `live`, `info`, `dump`, `recv`, `graph`, `script`, and `tui`.

The tracing modes cover compiler instrumentation such as `-pg`, `-finstrument-functions`, and `-fpatchable-function-entry`, dynamic patching with `-P.`, PLT/library call tracing, Python tracing, kernel tracing through Linux ftrace, Linux event tracing, perf_event scheduling and PMU information, and SystemTap SDT user events.

uftrace also supports filters, function arguments and return values, Chrome trace viewer output, flame graphs, graphviz and mermaid call graphs, source-line information, and scripts through Python/LuaJIT APIs.

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

For package nerds, uftrace sits in the sweet spot between `strace`, profilers, kernel ftrace, and language-specific tracers. It is a single CLI that exposes a deep stack of optional capabilities, so distribution builds and optional dependencies materially affect what the installed package can do.

It is also notable because it brings kernel-tracing ideas to userspace debugging workflows while remaining scriptable and inspectable from the shell. That makes it attractive in package-manager ecosystems where developers want performance tools available with one install command.

### 时间线

- 2014-02-11: Official GitHub repository created.
- 2023-01-09: uftrace v0.13 release published.
- 2023-06-20: uftrace v0.14 added Python tracing and runtime option changes with an agent.
- 2024-01-08: uftrace v0.15 added basic RISC-V support.
- 2024-12-17: uftrace v0.17 added watchpoint support for global variables.
- 2026-03-02: uftrace v0.19 release published.

### Related projects

- uftrace is explicitly inspired by the Linux kernel ftrace framework.
- Its output and workflows relate to Chrome trace viewer, flame graph tooling, graphviz, mermaid, Linux perf_event, SystemTap SDT, Python tracing, and LuaJIT scripting.

### 来源

- GitHub repository and release metadata records 2014 creation and recent release dates through 2026.
- <https://github.com/namhyung/uftrace README documents purpose, ftrace inspiration, tracing modes, commands, output formats, and usage.>
- <https://raw.githubusercontent.com/namhyung/uftrace/master/NEWS records release-by-release feature history through v0.19.>
- source_facts.package-manager lists Homebrew, Debian, Nix, Ubuntu, and openSUSE package names.


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - uftrace - 0.17-1: normalized package name match | Debian stable package indexes: uftrace from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Traces and analyzes execution of programs written in C/C++ | https://github.com/namhyung/uftrace
- Nix - uftrace: normalized package name match | nixpkgs package indexes: pkgs/by-name/uf/uftrace/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - uftrace - 0.15.2-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: uftrace from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Traces and analyzes execution of programs written in C/C++ | https://github.com/namhyung/uftrace
- zypper - uftrace - 0.19-1.4: normalized package name match | openSUSE Tumbleweed package metadata: uftrace from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A function call graph tracer for C, C++, Rust and Python programs | https://github.com/namhyung/uftrace


## Combined YAML source

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