WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / bpf / progs / test_raw_tp_test_run.c
blob4c63cc87b9d0d7493c1583d14ce5b2dafcc3aa66
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2020 Facebook */
4 #include "vmlinux.h"
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
8 __u32 count = 0;
9 __u32 on_cpu = 0xffffffff;
11 SEC("raw_tp/task_rename")
12 int BPF_PROG(rename, struct task_struct *task, char *comm)
15 count++;
16 if ((__u64) task == 0x1234ULL && (__u64) comm == 0x5678ULL) {
17 on_cpu = bpf_get_smp_processor_id();
18 return (long)task + (long)comm;
21 return 0;
24 char _license[] SEC("license") = "GPL";