Skip to content

'struct __kernel_timespec' does not contain a field named 'tv_nsec' - but it does! #2205

Answered by viktormalik
ttsiodras asked this question in Q&A
Discussion options

You must be logged in to vote

It seems that your kernel doesn't have BTF, which is why you can't see the struct fields. The solution is to use a kernel with BTF or to include the proper header with your script:

# bpftrace --include 'linux/time_types.h' -e 'tracepoint...

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ttsiodras
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants