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"; 17