Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BPF.attach_kprobe() to accept glob or regexp #141

Closed
brendangregg opened this issue Aug 18, 2015 · 2 comments
Closed

BPF.attach_kprobe() to accept glob or regexp #141

brendangregg opened this issue Aug 18, 2015 · 2 comments

Comments

@brendangregg
Copy link
Member

It may be handy to use globs or regexps when specifying kprobe function names. Eg (Python):

BPF.attach_kprobe(fn, "vfs_*")

... for globbing, or "vfs_.*" for regexp.

drzaeus77 pushed a commit that referenced this issue Aug 25, 2015
Add new event_re parameter to kprobe functions. This searches through
the list of functions/symbols in <tracefs>/available_filter_functions
for all matching functions. Every one is attached.

Add a test case for attach_k[ret]probe.

Fixes: #141
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
@drzaeus77
Copy link
Collaborator

Did you give this a try?

@brendangregg
Copy link
Member Author

Ah, event_re works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants