File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ disk_io_start(struct pt_regs *ctx, struct request *reqp)
43
43
return (0 );
44
44
}
45
45
46
- // @@ kprobe|blk_account_io_completion |disk_io_done
46
+ // @@ kprobe|blk_account_io_done |disk_io_done
47
47
int
48
48
disk_io_done (struct pt_regs * ctx , struct request * reqp )
49
49
{
Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ b = BPF(text=bpf_text)
128
128
if BPF.get_kprobe_functions(b'blk_start_request'):
129
129
b.attach_kprobe(event="blk_start_request", fn_name="disk_io_start")
130
130
b.attach_kprobe(event="blk_mq_start_request", fn_name="disk_io_start")
131
- b.attach_kprobe(event="blk_account_io_completion", fn_name="disk_io_done")
131
+ if BPF.get_kprobe_functions(b'blk_account_io_completion'):
132
+ b.attach_kprobe(event="blk_account_io_completion", fn_name="disk_io_done")
133
+ else:
134
+ b.attach_kprobe(event="blk_account_io_done", fn_name="disk_io_done")
132
135
133
136
134
137
helper = BCCHelper(b, BCCHelper.ANALYTICS_PRINT_MODE)
You can’t perform that action at this time.
0 commit comments