Skip to content

Commit

Permalink
examples: disksnoop checks if blk_start_request exists before attachi…
Browse files Browse the repository at this point in the history
…ng kprobe
  • Loading branch information
freshdresch authored and yonghong-song committed May 28, 2019
1 parent 7554866 commit a57dad4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/tracing/disksnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
}
""")

b.attach_kprobe(event="blk_start_request", fn_name="trace_start")
if BPF.get_kprobe_functions(b'blk_start_request'):
b.attach_kprobe(event="blk_start_request", fn_name="trace_start")
b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_start")
b.attach_kprobe(event="blk_account_io_completion", fn_name="trace_completion")

Expand Down

0 comments on commit a57dad4

Please sign in to comment.