everyone.
I am studying the ZFS file system programmed in C language. I would like to measure the CPU usage of each function within ZFS. Is there a way?
At first I tried adding kernel_stat.h, but it caused numerous conflicts with ZFS's code.
Here's what I want to know:
- How to add kernel headers such as kernel_stat.h within ZFS without conflict.
- Modifying DEFAULT_INCLUDE in Makefile.in in zfs adds it, but causes numerous crashes.
- How do other open sources generally add the kernel header?
- A way to obtain CPU usage for each function in general kernel code.
- ex) I would appreciate it if you could tell me the specific usage of BPF and ftrace.
Thanks. regards
I tried adding kernel headers within ZFS. However, numerous conflicts occurred. I'm trying to use bpftrace and ftrace. However, I am studying a little more to achieve what I want.