public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Getting systemtap examples working with --bpf backend
@ 2019-05-16 13:41 William Cohen
  2019-05-20 19:52 ` William Cohen
  2019-06-03 15:51 ` William Cohen
  0 siblings, 2 replies; 7+ messages in thread
From: William Cohen @ 2019-05-16 13:41 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-03 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 13:41 Getting systemtap examples working with --bpf backend William Cohen
2019-05-20 19:52 ` William Cohen
2019-05-21 17:11   ` William Cohen
2019-05-22 20:51     ` Frank Ch. Eigler
2019-05-22 21:12       ` William Cohen
2019-05-22 21:39         ` Serhei Makarov
2019-06-03 15:51 ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).