Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def get_kprobe_functions(event_re):
raise e
blacklist = set([])

avail_filter_file = "%s/tracing/available_filter_functions" % DEBUGFS
avail_filter_file = "%s/available_filter_functions" % TRACEFS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use os.stat() to check the existence of tracefs/debugfs instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test with os.path.exists is already done on line 50 up there. I figured that test covered the check logic and that this line (729) was a wrong application of it?
In any case, I for sure don't understand the thing at play here. Where is available_filter_functions supposed to live? Does it depend on the distro? What are tracefs/debugfs and how are they related?

try:
with open(avail_filter_file, "rb") as avail_filter_f:
avail_filter = set([line.rstrip().split()[0] for line in avail_filter_f])
Expand Down