Skip to content

Commit

Permalink
style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaleavya committed Feb 12, 2016
1 parent 79f3c34 commit 62c6152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions man/man8/biosnoop.8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions tools/biosnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Data(ct.Structure):
start_ts = 0
prev_ts = 0
delta = 0

# process event
def print_event(cpu, data, size):
event = ct.cast(data, ct.POINTER(Data)).contents
Expand Down Expand Up @@ -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()

0 comments on commit 62c6152

Please sign in to comment.