Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

bpftrace

bpftrace.org

  • Free plan
  • Linux
  • Self-hosted
7.4 Club score Visit bpftrace.org

What bpftrace is

bpftrace is a Linux tracing language and tool built around eBPF, for examining activity in both the kernel and user space. It supports dynamic and static tracing, with sources such as kprobes, uprobes, tracepoints, perf events, and USDT. Scripts can be run from a file, entered inline with -e, or passed through standard input. The language draws on awk, C, DTrace, and SystemTap, and its standard library includes builtins, functions, macros, and map value functions. LLVM compiles scripts to eBPF bytecode; libbpf and bcc help it interact with Linux BPF. Scripts can import bpftrace files, C headers, and BPF C source, but imports from world-writable directories are refused. Helpers marked unsafe require the --unsafe flag. The default maximum is 1,024 probes; increasing it may raise memory use, startup time, and system overhead, and can cause freezes or crashes. bpftrace is free and self-hosted. Some features need kernel headers, and vmlinux BTF requires Linux 4.18 or later with CONFIG_DEBUG_INFO_BTF enabled.

Who it suits

bpftrace suits Linux users and organizations that need to trace or debug kernel and user-space activity. It is intended for systems with a compatible kernel and BPF support.

Good to know, and what to watch

  • Supports kernel and user-space tracing.
  • Accepts scripts from files, inline input, or standard input.
  • Imports C headers and BPF C source.
  • Free to use and self-hosted.
  • Documentation lists support for eight architectures.
  • Linux only; requires a compatible kernel and BPF support.
  • Some features require kernel headers.
  • Raising the 1,024-probe default can increase overhead or cause instability.
  • Unstable features may change or be removed.

bpftrace

Free

Free plan

The verdict

bpftrace provides a flexible way to write and run eBPF-based tracing scripts on Linux. Check kernel requirements and probe limits before using it for a workload.

What the maker publishes

Architectures
The documentation lists x86_64, arm64, s390x, arm32, loongarch64, mips64, ppc64, and riscv64 as supported architectures. source
Compiler and libraries
bpftrace uses LLVM as a compiler backend and libbpf to interact with the Linux BPF subsystem. source
Implementation
bpftrace uses LLVM to compile scripts to eBPF bytecode and uses libbpf and bcc to interact with Linux BPF. source
Import security
bpftrace refuses to import files from world-writable directories. source
Installation
The project README lists installation commands for several Linux distribution package managers, including apt, dnf, apk, pacman, emerge, and zypper. source
Install options
The project README lists package-manager installation commands for distributions including Ubuntu, Fedora, Alpine, Arch, Gentoo, Nix, and openSUSE. source
Integration
A community language server offers autocompletion, error diagnostics, and go-to-definition in editors that support LSP. source
Intended users
The project says its contributors, users, and organizations rely on it for production tracing and debugging. source
Language
Its language is inspired by awk, C, DTrace, and SystemTap. source
Language
The bpftrace language is inspired by awk, C, DTrace, and SystemTap. source
Limit
The documentation says unstable features are subject to change or removal. source
Operational limit
The default maximum number of probes is 1,024; increasing it can use more memory, increase startup time, and cause high overhead or system freezes or crashes. source
Playground
The web playground notes that it does not yet support all bpftrace features. source
Probe types
The documentation describes probes including kprobes, uprobes, and tracepoints. source
Purpose
bpftrace is a high-level tracing language and general-purpose tracing tool for Linux that uses eBPF. source
Purpose
bpftrace is a high-level tracing language for Linux for writing observability-based eBPF programs. source
Script imports
Scripts can import bpftrace files, C headers, BPF C source files, or supported files from a directory. source
Scripting
Programs can be supplied as a file, inline with -e, or through standard input. source
Security
As a security measure, bpftrace refuses to import files from world-writable directories. source
Security control
Helpers marked unsafe require the --unsafe flag to use. source
Standard library
The standard library includes builtins, functions, macros, and map value functions. source
Support
The project README points users to GitHub Discussions, the issue tracker, monthly office hours, and Discord for help or involvement. source
Support
The project README lists GitHub Discussions, the issue tracker, monthly office hours, and Discord as ways to get help or participate. source
System requirements
Some features require kernel headers, and BTF support for vmlinux requires Linux 4.18 or later with CONFIG_DEBUG_INFO_BTF enabled. source

Checked against the maker's pages on 4 Oct 2026.