Commit f1bb6eaf authored by yonghong-song's avatar yonghong-song Committed by GitHub

Merge pull request #1540 from pchaigno/regex-filtering-kallsyms

Use /proc/kallsyms for regex filtering
parents 7c91cf67 fe033552
......@@ -477,10 +477,11 @@ class BPF(object):
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
......
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