On Sat, Feb 29, 2020 at 03:11:08PM -0800, Andrii Nakryiko wrote: > Move BPF_PROG, BPF_KPROBE, and BPF_KRETPROBE helper macros from private > selftests helpers to public libbpf ones. These helpers are extremely helpful > for writing tracing BPF applications and have been requested to be exposed for > easy use (e.g., [0]). > > As part of this move, fix up BPF_KRETPROBE to not allow for capturing input > arguments (as it's unreliable and they will be often clobbered). Also, add > vmlinux.h header guard to allow multi-time inclusion, if necessary; but also > to let PT_REGS_PARM do proper detection of struct pt_regs field names on x86 > arch. See relevant patches for more details. > > [0] https://github.com/iovisor/bcc/pull/2778#issue-381642907 Looks like folks started to copy paste this macro into different places. So definitely makes sense to move it. Applied. Thanks