From c8846e54fc9acee901df432e42bbb73e08430853 Mon Sep 17 00:00:00 2001 From: Derek <“derek0883@gmail.com”> Date: Mon, 23 Jan 2017 20:32:59 -0800 Subject: [PATCH] rename event name in detach_kprobe/detach_kretprobe --- src/python/bcc/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/bcc/__init__.py b/src/python/bcc/__init__.py index 969dd1d..43e3a70 100644 --- a/src/python/bcc/__init__.py +++ b/src/python/bcc/__init__.py @@ -473,6 +473,7 @@ class BPF(object): def detach_kprobe(self, event): event = str(event) ev_name = "p_" + event.replace("+", "_").replace(".", "_") + ev_name += "_bcc_" + str(os.getpid()) if ev_name not in self.open_kprobes: raise Exception("Kprobe %s is not attached" % event) lib.perf_reader_free(self.open_kprobes[ev_name]) @@ -513,6 +514,7 @@ class BPF(object): def detach_kretprobe(self, event): event = str(event) ev_name = "r_" + event.replace("+", "_").replace(".", "_") + ev_name += "_bcc_" + str(os.getpid()) if ev_name not in self.open_kprobes: raise Exception("Kretprobe %s is not attached" % event) lib.perf_reader_free(self.open_kprobes[ev_name]) -- 2.7.4