Add new bpftrace section for DTrace document#5500
Open
egmc wants to merge 1 commit intophp:masterfrom
Open
Conversation
- add bpftrace example section like SystemTap as an easier sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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