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

libbpf-tools: Support verbose mode and set custom libbpf print callback #3773

Merged
merged 11 commits into from
Dec 29, 2021

Conversation

chenhengqi
Copy link
Collaborator

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.

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>
@chenhengqi
Copy link
Collaborator Author

@davemarchevsky Please take a look. Thanks.

Copy link
Collaborator

@davemarchevsky davemarchevsky left a 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)
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's independent.

@davemarchevsky davemarchevsky merged commit 7607cb1 into iovisor:master Dec 29, 2021
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

Successfully merging this pull request may close these issues.

2 participants