0001
0002
0003
0004 #include <vmlinux.h>
0005 #include <bpf/bpf_helpers.h>
0006
0007
0008 struct sched_switch_args {
0009 unsigned long long pad;
0010 char prev_comm[TASK_COMM_LEN];
0011 int prev_pid;
0012 int prev_prio;
0013 long long prev_state;
0014 char next_comm[TASK_COMM_LEN];
0015 int next_pid;
0016 int next_prio;
0017 };
0018
0019 SEC("tracepoint/sched/sched_switch")
0020 int oncpu(struct sched_switch_args *ctx)
0021 {
0022 return 0;
0023 }
0024
0025 char _license[] SEC("license") = "GPL";