I am trying to make a custom bpf program with bpftrace in Linux, according to the book BPF Performance Tools. I tried to include some files from the path linux/kernel/sched/sched.h. How can I include them? (not only the /include folder but also from the linux/kernel/* folder in Linux?)
I'm trying to incorporate #include /kernel/sched/sched.h in order to use "struct rq".
The example of my program is:
#!/usr/local/bin/bpftrace
#include <kernel/sched/sched.h>
kprobe:load_balance
{
$rq = (struct rq *)arg1;
printf("-------------------\n");
printf("\n");
printf("load_balance: %s pid: %d\n", comm, pid);
printf("-------------------\n");
}