diff --git a/src/python/bcc/__init__.py b/src/python/bcc/__init__.py index 3749a5c53d0f..57aff10baf6c 100644 --- a/src/python/bcc/__init__.py +++ b/src/python/bcc/__init__.py @@ -477,10 +477,11 @@ def get_kprobe_functions(event_re): blacklist = set([line.rstrip().split()[1] for line in blacklist_file]) fns = [] - with open("%s/available_filter_functions" % TRACEFS) as avail_file: + with open("/proc/kallsyms") as avail_file: for line in avail_file: - fn = line.rstrip().split()[0] - if re.match(event_re, fn) and fn not in blacklist: + (_, t, fn) = line.rstrip().split()[:3] + if (t.lower() in ['t', 'w']) and re.match(event_re, fn) \ + and fn not in blacklist: fns.append(fn) return set(fns) # Some functions may appear more than once