]> Git Repo - linux.git/blob - tools/testing/selftests/bpf/progs/test_perf_link.c
Linux 6.14-rc3
[linux.git] / tools / testing / selftests / bpf / progs / test_perf_link.c
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
3 #include "vmlinux.h"
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
6
7 int run_cnt = 0;
8
9 SEC("perf_event")
10 int handler(struct pt_regs *ctx)
11 {
12         __sync_fetch_and_add(&run_cnt, 1);
13         return 0;
14 }
15
16 char _license[] SEC("license") = "GPL";
This page took 0.026458 seconds and 4 git commands to generate.