-
Notifications
You must be signed in to change notification settings - Fork 142
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
Enumerize tracepoint categories as described in #314 #1114
base: master
Are you sure you want to change the base?
Conversation
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.
Nice! Would you mind splitting this into two commits, first the introduction of the tracepoint
module and the move of TracepointOpts
and then the addition of TracepointCategory
? Also, please take a look at my comment for the Unknown
variant.
65f95e5
to
9302957
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.
Looks good overall. But first commit is incomplete, you can't not refer to TracepointCategory::Syscalls defined in the second commit.
#[non_exhaustive] | ||
#[repr(u32)] | ||
#[derive(Debug)] | ||
pub enum TracepointCategory { |
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 second thought. Could we just add some generic categories ? No arch-specific, No driver-specific.
See https://github.com/torvalds/linux/tree/master/include/trace/events
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.
You are saying remove everything that is arch or driver specific? I have no strong preference, but to me that seems like a moving target: over time something may become generic. It also seems somewhat arbitrary and ultimately we just provide possible values, but runtime detection by the kernel should have the last say anyway. So personally I guess I'd err on the side of making more values available.
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.
This list seems taken from some random running machine, especially the amdcpu thing.
There are tens of arch and thousands of drivers, trying to keep them here also a moving target.
Yeah, that's a good catch. Can you please fix that up and make sure everything builds at each point, @syogaraj ? |
I see there are some conflicts with the merged #1115. I believe they should be fairly mechanical to resolve, though. Sorry about that, but we'd have conflicts either way. |
Signed-off-by: yogaraj.s <[email protected]>
Signed-off-by: yogaraj.s <[email protected]>
Missed this @chenhengqi. fixed them now. @danielocfb
@danielocfb, Resolved the merge conflict from #1115 and moved |
trace-cmd list -e
for the list of tracepoint categories.tracepoint.rs
). Hence, removedTracepointOpts
fromprogram.rs
and placed it intracepoint.rs
.