Skip to content

Add new bpftrace section for DTrace document#5500

Open
egmc wants to merge 1 commit intophp:masterfrom
egmc:add-ebpf-section-dtrace
Open

Add new bpftrace section for DTrace document#5500
egmc wants to merge 1 commit intophp:masterfrom
egmc:add-ebpf-section-dtrace

Conversation

@egmc
Copy link
Copy Markdown
Contributor

@egmc egmc commented Apr 20, 2026

This PR adds new section which explains how to use DTrace with bpdtrace command, related to my previous PR #4456 .

Since this PR adds completely new section, I want to explain why it should be added, why it is useful for PHP users. Hoping it could be merged.

Background / Motivation

To encourage PHP users to use useful, stable DTrace based tracepoints easier way.

DTrace is basically an option, though most of PHP packages provided by Linux distributions(aside from Debian) are enabled in reality.

Ubuntu 24.04 Noble is also disabled because of build error from upstream, though enabled again from next version. Here are related issues:

Although the existing SystemTap section requires users to install SystemTap which is a bit difficult on modern Linux distributions.

For instance, I have installed SytemTap( And gcc-12 because of the missing dependency) with Ubuntu 22.04 Jammy. I got bunch of errors like below.

Systemtap version 4.6/0.186
https://gist.github.com/egmc/1667b12fcf58eb4fdfbddce256f35084

It may be fixed, though it could be hard for users who tried the functionality for first time.

In contrast, eBPF is now supported natively in mainline Linux kernels, and bpftrace (a high-level eBPF tracing frontend) is available as a standard package on
major distributions (Fedora, RHEL, Oracle Linux, Debian, Ubuntu). The examples in the new section work reliably out of the box with a simple package install,
making them a more practical starting point for users who want to trace PHP on Linux.

bpftrace v0.21.2
https://gist.github.com/egmc/467678a1b6b845bd0a5605dcf3aaa906

So adding bpftrace version would provide more straightforward, easy way to uses.

Notes

  • The new section is placed after the existing SystemTap section
  • Probe names and arguments match the existing DTrace/SystemTap documentation
  • The all_probes.bt script mirrors the existing all_probes.stp example for consistency

 - add bpftrace example section like SystemTap as an easier sample
@egmc egmc changed the title Add new bpftrace for DTrace document Add new bpftrace section for DTrace document Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant