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
Rawtracepoint support wildcards and list show #2588
Rawtracepoint support wildcards and list show #2588
Conversation
c95df35
to
c0616d7
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.
A runtime test for an actual attachment to a wildcarded raw tracepoint would be useful.
Other than that looks good to me, thanks!
c0616d7
to
2326ef5
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 just realized that this is not properly handling argX
for wildcarded probes.
Example:
# bpftrace -e 'rawtracepoint:mm_* { printf("%d\n", arg1); exit(); }'
Attaching 50 probes...
ERROR: Error attaching probe: rawtracepoint:mm_compaction_kcompactd_sleep
mm_compaction_kcompactd_sleep
has only one argument so the verifier rejects to attach the above program to it. We should address this in semantic analyzer and provide a reasonable error message.
Ok, thanks for helping with the test, I'll check it out. |
Considering that it is difficult to obtain the number of parameters of rawtracepoint,
@viktormalik What do you think, or is there a better way |
Right, I didn't realize that. Checking the error code and printing a hint seems like a reasonable approach to me. |
2de7d48
to
dc75fc9
Compare
Done |
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.
One more nit below, otherwise lgtm, thanks! Also, I'm gonna squash the commits on merging, if you don't mind.
dc75fc9
to
ba1eb65
Compare
Ah, we'll need a CHANGELOG update, too. Thanks! |
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
…e error message Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
ba1eb65
to
3082538
Compare
Done |
1: Rawtracepoint support wildcards and list show
2: Add testcases for rawtracepoint's wildcards and list show