]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/test_tracepoint.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / tools / testing / selftests / bpf / progs / test_tracepoint.c
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2017 Facebook
3
4 #include <vmlinux.h>
5 #include <bpf/bpf_helpers.h>
6
7 /* taken from /sys/kernel/tracing/events/sched/sched_switch/format */
8 struct sched_switch_args {
9         unsigned long long pad;
10         char prev_comm[TASK_COMM_LEN];
11         int prev_pid;
12         int prev_prio;
13         long long prev_state;
14         char next_comm[TASK_COMM_LEN];
15         int next_pid;
16         int next_prio;
17 };
18
19 SEC("tracepoint/sched/sched_switch")
20 int oncpu(struct sched_switch_args *ctx)
21 {
22         return 0;
23 }
24
25 char _license[] SEC("license") = "GPL";
This page took 0.028017 seconds and 4 git commands to generate.