looks like vfs_truncate did not get into BTF data,
I'll try to reproduce
_None_ of the functions are generated by pahole -J from debuginfo on ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o works correctly. collect_functions in dwarves seems to be defunct on ppc64... "functions" array is bogus (so find_function -- the bsearch -- fails).
It's not that bogus. I forgot an asterisk:
#0 find_function (btfe=0x100269f80, name=0x10024631c "stream_open") at /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350...
(gdb) p (*functions)@84
$5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr = 75232, size = 72, sh_addr = 65536, generated = false}, {
name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592, size = 216, sh_addr = 65536, generated = false}, {
name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr = 80816, size = 232, sh_addr = 65536, generated = false}, {
name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr = 74304, size = 100, sh_addr = 65536, generated = false}, {
name = 0x7ffff68e0808 ".stream_open", addr = 65824, size = 72, sh_addr = 65536, generated = false}, {...
name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size = 544, sh_addr = 65536, generated = false}}
The dot makes the difference, of course. The question is why is it there? I keep looking into it. Only if someone has an immediate idea...