Commit 548332bb authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1786 from andihit/zfsdist-py3-fix

zfsdist: fix for python3
parents 4e479815 0d08989d
...@@ -137,10 +137,10 @@ if debug or args.ebpf: ...@@ -137,10 +137,10 @@ if debug or args.ebpf:
b = BPF(text=bpf_text) b = BPF(text=bpf_text)
# common file functions # common file functions
if BPF.get_kprobe_functions('zpl_iter'): if BPF.get_kprobe_functions(b'zpl_iter'):
b.attach_kprobe(event="zpl_iter_read", fn_name="trace_entry") b.attach_kprobe(event="zpl_iter_read", fn_name="trace_entry")
b.attach_kprobe(event="zpl_iter_write", fn_name="trace_entry") b.attach_kprobe(event="zpl_iter_write", fn_name="trace_entry")
elif BPF.get_kprobe_functions('zpl_aio'): elif BPF.get_kprobe_functions(b'zpl_aio'):
b.attach_kprobe(event="zpl_aio_read", fn_name="trace_entry") b.attach_kprobe(event="zpl_aio_read", fn_name="trace_entry")
b.attach_kprobe(event="zpl_aio_write", fn_name="trace_entry") b.attach_kprobe(event="zpl_aio_write", fn_name="trace_entry")
else: else:
...@@ -148,10 +148,10 @@ else: ...@@ -148,10 +148,10 @@ else:
b.attach_kprobe(event="zpl_write", fn_name="trace_entry") b.attach_kprobe(event="zpl_write", fn_name="trace_entry")
b.attach_kprobe(event="zpl_open", fn_name="trace_entry") b.attach_kprobe(event="zpl_open", fn_name="trace_entry")
b.attach_kprobe(event="zpl_fsync", fn_name="trace_entry") b.attach_kprobe(event="zpl_fsync", fn_name="trace_entry")
if BPF.get_kprobe_functions('zpl_iter'): if BPF.get_kprobe_functions(b'zpl_iter'):
b.attach_kretprobe(event="zpl_iter_read", fn_name="trace_read_return") b.attach_kretprobe(event="zpl_iter_read", fn_name="trace_read_return")
b.attach_kretprobe(event="zpl_iter_write", fn_name="trace_write_return") b.attach_kretprobe(event="zpl_iter_write", fn_name="trace_write_return")
elif BPF.get_kprobe_functions('zpl_aio'): elif BPF.get_kprobe_functions(b'zpl_aio'):
b.attach_kretprobe(event="zpl_aio_read", fn_name="trace_read_return") b.attach_kretprobe(event="zpl_aio_read", fn_name="trace_read_return")
b.attach_kretprobe(event="zpl_aio_write", fn_name="trace_write_return") b.attach_kretprobe(event="zpl_aio_write", fn_name="trace_write_return")
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment