1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 // Copyright (c) 2023 Red Hat 3 #include "vmlinux.h" 4 #include <bpf/bpf_tracing.h> 5 6 unsigned int nr_uprobes; 7 8 SEC("uprobe") BPF_UPROBE(empty)9int BPF_UPROBE(empty) 10 { 11 return 0; 12 } 13 14 SEC("uprobe") BPF_UPROBE(trace_printk)15int BPF_UPROBE(trace_printk) 16 { 17 char fmt[] = "perf bench uprobe %u"; 18 19 bpf_trace_printk(fmt, sizeof(fmt), ++nr_uprobes); 20 return 0; 21 } 22 23 char LICENSE[] SEC("license") = "Dual BSD/GPL"; 24