bcc: Allow KFUNC_PROBE to instrument function without arguments
Update KFUNC_PROBE and its family to allow instrument kernel
function without specifying arguments. Sometimes, we don't need
to bookkeep arguments at function entry, just store a timestamp.
This fix would allow this use case.
@@ -1309,16 +1309,16 @@ int name(unsigned long long *ctx) \
static int ____##name(unsigned long long *ctx, ##args)
#define KFUNC_PROBE(event, args...) \
- BPF_PROG(kfunc__ ## event, args)
+ BPF_PROG(kfunc__ ## event, ##args)
#define KRETFUNC_PROBE(event, args...) \
- BPF_PROG(kretfunc__ ## event, args)
+ BPF_PROG(kretfunc__ ## event, ##args)
#define KMOD_RET(event, args...) \
- BPF_PROG(kmod_ret__ ## event, args)
+ BPF_PROG(kmod_ret__ ## event, ##args)
#define LSM_PROBE(event, args...) \
- BPF_PROG(lsm__ ## event, args)
+ BPF_PROG(lsm__ ## event, ##args)
#define BPF_ITER(target) \
int bpf_iter__ ## target (struct bpf_iter__ ## target *ctx)
