Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /* Copyright (c) 2021 Facebook */
0003 #include "vmlinux.h"
0004 #include <bpf/bpf_helpers.h>
0005 #include <bpf/bpf_tracing.h>
0006 
0007 int run_cnt = 0;
0008 
0009 SEC("perf_event")
0010 int handler(struct pt_regs *ctx)
0011 {
0012     __sync_fetch_and_add(&run_cnt, 1);
0013     return 0;
0014 }
0015 
0016 char _license[] SEC("license") = "GPL";