This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: BPF runtime for systemtap
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Brendan Gregg <brendan dot d dot gregg at gmail dot com>
- Cc: Richard Henderson <rth at redhat dot com>, systemtap at sourceware dot org, iovisor-dev at lists dot iovisor dot org, Linux Kernel Mailing List <linux-kernel at vger dot kernel dot org>
- Date: Tue, 14 Jun 2016 21:50:31 -0400
- Subject: Re: BPF runtime for systemtap
- Authentication-results: sourceware.org; auth=none
- References: <72b69807-4cd7-afab-0acd-51af8c76469e at redhat dot com> <CAE40pdftVg+vuDpYhwsuBj_Ptk9P+TrB3M4GDB0xtvEqxYEt2Q at mail dot gmail dot com>
brendan.d.gregg wrote:
> [...]
> Great! Is there a hello world example in there somewhere? I found this:
> [...]
Yup. Here is a smoke test. (A great many other things are not yet
working.)
% sudo ./stap -v --runtime=bpf -e 'global foo
probe kprobe.function("vfs_read"), kprobe.function("do_select") { foo++ }
probe begin { printf("systemtap starting probe\n") }
probe end { printf("systemtap ending probe\n"); printf("foo = %d\n", foo) }'
Pass 1: parsed user script and 35 library scripts using 198460virt/15804res/6416shr/9208data kb, in 0usr/0sys/71real ms.
Pass 2: analyzed script: 4 probes, 0 functions, 0 embeds, 1 global using 198460virt/15804res/6416shr/9208data kb, in 0usr/0sys/0real ms.
Pass 4: compiled BPF into "stap_32349.bo" in 0usr/0sys/0real ms.
Pass 5: starting run.
systemtap starting probe
^Csystemtap ending probe
foo = 108812
Pass 5: run completed in 0usr/10sys/2525real ms.