lkml.org 
[lkml]   [2016]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: BPF runtime for systemtap
From
Date

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.

\
 
 \ /
  Last update: 2016-06-15 04:21    [W:0.053 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site