commit | 61c7ff1e2d31a05eed033d83a46135858a903a96 | [log] [tgz] |
---|---|---|
author | Brendan Gregg <brendan.d.gregg@gmail.com> | Thu Sep 10 13:43:34 2015 -0700 |
committer | Brendan Gregg <brendan.d.gregg@gmail.com> | Thu Sep 10 13:43:34 2015 -0700 |
tree | a31ef839b647fc7ca28ffb64dff05c4089c05f4f | |
parent | 5853e72e1e89bad3e05eea8c2b62f17f6f89c118 [diff] [blame] |
shorten syncsnoop example
diff --git a/tools/syncsnoop b/tools/syncsnoop index fe24075..dd4148d 100755 --- a/tools/syncsnoop +++ b/tools/syncsnoop
@@ -16,12 +16,10 @@ # load BPF program b = BPF(text = """ -int do_sync(void *ctx) { +void kprobe__sys_sync(void *ctx) { bpf_trace_printk("sync()\\n"); - return 0; }; """) -b.attach_kprobe(event="sys_sync", fn_name="do_sync") # header print("%-18s %s" % ("TIME(s)", "CALL"))