libbpf-tools: optimize fentry_exists helper
authorHengqi Chen <chenhengqi@outlook.com>
Wed, 9 Jun 2021 05:42:54 +0000 (13:42 +0800)
committeryonghong-song <ys114321@gmail.com>
Thu, 10 Jun 2021 16:29:27 +0000 (09:29 -0700)
commitb2a76fa63f19036fbc9b3a705fbfa6358992ae22
treee0987b259d0214041cad668792915ce055ea0f36
parent9e38ee193b376fbada6ed68534329f6ed8848caf
libbpf-tools: optimize fentry_exists helper

The previous implementation checks fentry support either in vmlinux
or module BTF. So we need two calls to fentry_exists to verify that
whether a symbol exists. This commit updates this behavior to use
the module name provided as a hint, and fallback to vmlinux if module
BTF is not available.

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
libbpf-tools/fsdist.c
libbpf-tools/fsslower.c
libbpf-tools/trace_helpers.c
libbpf-tools/trace_helpers.h