This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Getting systemtap examples working with --bpf backend


I noticed https://elinux.org/images/d/dc/Kernel-Analysis-Using-eBPF-Daniel-Thompson-Linaro.pdf mentioned on page 29 that many of the systemtap examples did not work with the bpf back end and led to frustration.  Today I took a quick survey of how badly the examples are broken by adding the following line to the beginning of the run_command function in check.exp trying:

    set command [ string map {"stap " "stap --bpf "} $command ]

Most of the examples fail.  There are a few that actually do appear to run are just doing things in probe begin or end handlers (with the exception of cachestat*) :

PASS: systemtap.examples/general/ansi_colors run
PASS: systemtap.examples/general/ansi_colors2 run
PASS: systemtap.examples/general/helloworld run
PASS: systemtap.examples/memory/cachestat run
PASS: systemtap.examples/memory/cachestat_bpf run
PASS: systemtap.examples/memory/kmalloc-top run

The non-bpf cachestat works because it just probes raw functions. Most examples fail because of various missing syscall.*/syscall_any probe points and gettimeofday_*() functions.  The time functions should be something easy to get working in bpf as there is already a nanosecond time function and its results could be scaled for microseconds, milliseconds, and seconds.

-Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]