-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
improve probes lookup by dropping use of regex #557
Conversation
Not fully working yet. Will take a look into this again tomorrow. |
9c7f9e5
to
e87b6b0
Compare
I should probably point out that we won't be able to use regex in probe definitions with this PR, but I don't think that's an issue as long as we have wildcards working. |
c88c742
to
a115b7f
Compare
Ok, should be good to merge if there's no objections to #557 (comment) and if the CI is green. |
a115b7f
to
5d7e4cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with not having regex anymore (it was just easier to implement wildcards that way), but this does remove the option to have wildcards in the middle of strings, e.g. I was wrongtracepoint:syscalls:sys_enter_*chown
Not sure if we should fix this here too, but list and attach should use the same method to match and filter probes, but it is currently duplicated (and inconsistent): https://github.com/iovisor/bpftrace/blob/master/src/list.cpp#L116-L139 Probably not in the scope of this PR, but we should cut an issue to fix that too. |
5d7e4cd
to
5ed8717
Compare
@dalehamel yes, we need to improve consistency between attaching and listing probes, but it should be worked on another PR. |
This is good to go from my side. |
yup, I cut #565 to address that |
Thanks! |
Nice tests! |
This PR alone won't solve the performance issues, but combined with #410 I was able to reduce startup time when looking up a large library from almost 20s to about 300ms.
Also, let's keep #526 open since there are other performance improvements we can do (for example, only expand wildcards if there's a wildcard in our probe name).