Skip to content

Commit

Permalink
[biosnoop] Revert iovisor#4124
Browse files Browse the repository at this point in the history
Before the removal of `blk_start_request` in https://patchwork.kernel.org/project/linux-scsi/cover/[email protected]/
we would have needed to trace both `blk_start_request` and `blk_mq_start_request`.

Which means that for kernel < 5.0, we need to attach to both tracepoint. For kernels >= 5.0 we can only attach to `blk_mq_start_request` given that `blk_start_request` does not exist anymore.
  • Loading branch information
chantra committed Aug 31, 2022
1 parent e56fdf8 commit 7f07581
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/biosnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@
b.attach_kprobe(event="blk_account_io_start", fn_name="trace_pid_start")
if BPF.get_kprobe_functions(b'blk_start_request'):
b.attach_kprobe(event="blk_start_request", fn_name="trace_req_start")
else:
b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start")
b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start")
if BPF.get_kprobe_functions(b'__blk_account_io_done'):
b.attach_kprobe(event="__blk_account_io_done", fn_name="trace_req_completion")
else:
Expand Down

0 comments on commit 7f07581

Please sign in to comment.