Commit 4114d0d8 authored by Derek's avatar Derek

Fixed test case test_trace4.py error

parent fdd2389c
......@@ -455,10 +455,10 @@ class BPF(object):
pass
return
event = str(event)
self._check_probe_quota(1)
fn = self.load_func(fn_name, BPF.KPROBE)
event = str(event).replace("+", "_").replace(".", "_")
ev_name = "p_" + event
ev_name = "p_" + event.replace("+", "_").replace(".", "_")
res = lib.bpf_attach_kprobe(fn.fd, 0, ev_name.encode("ascii"),
event.encode("ascii"), pid, cpu, group_fd,
self._reader_cb_impl, ct.cast(id(self), ct.py_object))
......@@ -492,10 +492,10 @@ class BPF(object):
pass
return
event = str(event).replace("+", "_").replace(".", "_")
event = str(event)
self._check_probe_quota(1)
fn = self.load_func(fn_name, BPF.KPROBE)
ev_name = "r_" + event
ev_name = "r_" + event.replace("+", "_").replace(".", "_")
res = lib.bpf_attach_kprobe(fn.fd, 1, ev_name.encode("ascii"),
event.encode("ascii"), pid, cpu, group_fd,
self._reader_cb_impl, ct.cast(id(self), ct.py_object))
......
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