-
-
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
Incorrect number of probes being attached reported with kprobe globbing #3180
Comments
Technically speaking, there's only one probe being attached (from bpftrace point of view) with the list of functions passed via At the moment, we print the amount of attached functions, along with the complete list of functions, when
I'd suggest we change the behaviour to report
for the non-verbose output and add the list of functions for the verbose output. I'm currently working on refactoring the verbosity/debug outputs so I can add this, too. |
I think it's important here not to introduce anything that could be confusing to an end user as it's confusing enough as it is for them. IMO there should be no difference in the output given to a user whether they specified the probes manually or whether they obtained the list of probes to enable via globbing. Exposing the details of a 1:N mapping that kprobe multi gives could be very confusing, especially if the output is different to the non-globbed way of specifying the probes. |
That's a fair point. We probably shouldn't print a different number for the same bpftrace script depending on whether the kprobe multi is used or not. |
What reproduces the bug? Provide code if possible.
When using globbing to match multiple kprobes we use the multi kprobe link type to attach the probes. When doing this we report the number of probes being attached to as 1 instead of the actual number of probes being attached.
Obviously we can calculate up front how many probes we are trying to attach to though:
I haven't tested but this problem probably applies to uprobe multi attach as well.
bpftrace --info
outputThe text was updated successfully, but these errors were encountered: