GCC5 now has Identical Code Folding, -fipa-icf, and it's enabled by default at -O2 or higher. SystemTap's tracepoint queries use stub functions like: void stapprobe_##name(proto) {} When multiple tracepoint's proto is the same in a given object, GCC5 is merging them, so we only find one of them in debuginfo. For instance, sys_enter takes (struct pt_regs *regs, long id), and sys_exit takes (struct pt_regs *regs, long reg). These are identical as far as gcc is concerned, so they're merged. So stap -l 'kernel.trace("sys_*")' only shows me sys_exit. The "winner" may not be deterministic, but for now it appears to be the last one declared. Another example is that there are 8 "ext4_*" tracepoints which take just (struct inode *inode), and only ext4_load_inode shows up in stap. Adding -fno-ipa-icf will disable this, if we can do that in a compatible way. Another possibility is to force uniqueness, perhaps something like: int stapprobe_##name(proto) { static int i = 0; return ++i; } (The tracepoint query objects are never linked or executed, so the function body is irrelevant as long as they all show up in debuginfo.)
commit 8bb62408827f88d3694cb519eb5bb48ed6216092