tools/opensnoop: Snoop all open related syscall stubs
tools/opensnoop: Snoop all open related syscall stubs

kernel v5.6 introduces fddb5d430ad9 ("open: introduce openat2(2) syscall").
Even though do_sys_open still exists, it might be optimized off final binary
depending on compilers. So we can't catch do_sys_open in some cases.

This patch uses ksymname to try to get entries of open, openat and openat2,
and changes the definitions of the trace functions to snoop them all. This
works for both kprobe and kfunc.

Credit to Yonghong Song for better code organization.

Signed-off-by: He Zhe <a3bd65281adbcf25519dae3b8193f9759d7ff222@windriver.com>

iovisor/bcc,iovisor/bcc,brendangregg/bcc,brendangregg/bcc,iovisor/bcc,tuxology/bcc,brendangregg/bcc,tuxology/bcc,tuxology/bcc,iovisor/bcc,tuxology/bcc,brendangregg/bcc,brendangregg/bcc,tuxology/bcc,iovisor/bcc