diff options
author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2023-08-22 18:25:52 +0200 |
---|---|---|
committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2023-08-23 02:39:45 +0200 |
commit | ebeed8d4a55513116116993861c98a72915265ba (patch) | |
tree | 5c412ad08c637cde6660326953a0b14c13c11a79 /kernel/trace/trace_btf.h | |
parent | tracing/probes: Support BTF argument on module functions (diff) | |
download | linux-ebeed8d4a55513116116993861c98a72915265ba.tar.xz linux-ebeed8d4a55513116116993861c98a72915265ba.zip |
tracing/probes: Move finding func-proto API and getting func-param API to trace_btf
Move generic function-proto find API and getting function parameter API
to BTF library code from trace_probe.c. This will avoid redundant efforts
on different feature.
Link: https://lore.kernel.org/all/169272155255.160970.719426926348706349.stgit@devnote2/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_btf.h')
-rw-r--r-- | kernel/trace/trace_btf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/trace_btf.h b/kernel/trace/trace_btf.h new file mode 100644 index 000000000000..98685e9a556c --- /dev/null +++ b/kernel/trace/trace_btf.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include <linux/btf.h> + +const struct btf_type *btf_find_func_proto(const char *func_name, + struct btf **btf_p); +const struct btf_param *btf_get_func_param(const struct btf_type *func_proto, + s32 *nr); |