From: mcaleavya Date: Fri, 12 Feb 2016 23:43:14 +0000 (+0000) Subject: style updates X-Git-Tag: v0.1.8~26^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62c6152c69910609f61a74e2567baa628615178b;p=platform%2Fupstream%2Fbcc.git style updates --- diff --git a/man/man8/biosnoop.8 b/man/man8/biosnoop.8 index f563b9f..e5dbeaa 100644 --- a/man/man8/biosnoop.8 +++ b/man/man8/biosnoop.8 @@ -12,6 +12,9 @@ the I/O was first created (which usually identifies the responsible process). This uses in-kernel eBPF maps to cache process details (PID and comm) by I/O request, as well as a starting timestamp for calculating I/O latency. +This works by tracing various kernel blk_*() functions using dynamic tracing, +and will need updating to match any changes to these functions. + This makes use of a Linux 4.5 feature (bpf_perf_event_output()); for kernels older than 4.5, see the version under tools/old, which uses an older mechanism diff --git a/tools/biosnoop.py b/tools/biosnoop.py index fb77763..702c97b 100755 --- a/tools/biosnoop.py +++ b/tools/biosnoop.py @@ -138,6 +138,7 @@ rwflg = "" start_ts = 0 prev_ts = 0 delta = 0 + # process event def print_event(cpu, data, size): event = ct.cast(data, ct.POINTER(Data)).contents @@ -169,6 +170,7 @@ def print_event(cpu, data, size): prev_ts = event.ts start_ts = 1 +# loop with callback to print_event b["events"].open_perf_buffer(print_event) while 1: b.kprobe_poll()