Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: Check biolatency tracepoints using BTF
The biolatency has a kernel version check to detect changes in the some block tracepoint format. But it can be a problem if the old kernel backported the change. Then the BPF verifier would reject the program due to invalid access to the argument. We can do better using BTF since it has the type information. Instead of checking kernel version, it can check the prototype of the tracepoint function. For example, block_rq_issue tracepoint has this for recent kernels: typedef void (*btf_trace_block_rq_issue)(void *, struct request *); Let's check the number of arguments in the prototype - actually it has one more argument for the context. Signed-off-by: Namhyung Kim <[email protected]>
- Loading branch information