-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
libbpf-tools: Support verbose mode and set custom libbpf print callback #3773
libbpf-tools: Support verbose mode and set custom libbpf print callback #3773
Conversation
Support verbose mode and set custom libbpf print callback in bashreadline. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in bindsnoop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in exitsnoop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in filetop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in funclatency. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in gethostlatency. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in ksnoop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in mountsnoop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in solisten. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Support verbose mode and set custom libbpf print callback in statsnoop. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
Update all tools to make libbpf_print_fn function static. While at it, also keep the function signature in a single line since they fit in a 100-character line. Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
@davemarchevsky Please take a look. Thanks. |
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.
LGTM aside from one question
@@ -251,7 +252,7 @@ static int get_func_btf(struct btf *btf, struct func *func) | |||
return 0; | |||
} | |||
|
|||
int predicate_to_value(char *predicate, struct value *val) |
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 this change, but can you confirm that it's independent of the others in this file? If it's not, then I must be confused
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.
Yes, it's independent.
Add verbose option and set custom libbpf print callback in all tools.
This would allow user to print libbpf debug log and aid the debugging
process.