summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2025-12-30 15:50:04 +0100
committerAndrii Nakryiko <andrii@kernel.org>2026-01-28 11:44:45 -0800
commit0e860d07c29d70205d5ad48456ac7a133ccfb293 (patch)
tree5414c388661d2d713732e12b5ff0bdb69edb56c8 /include/linux
parent676bfeae7bd55ca405670798711ac7c46b48655d (diff)
ftrace: Export some of hash related functions
We are going to use these functions in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lore.kernel.org/bpf/20251230145010.103439-4-jolsa@kernel.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ftrace.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index cc869c59c1a6..a77b57a4aba2 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -82,6 +82,7 @@ static inline void early_trace_init(void) { }
struct module;
struct ftrace_hash;
+struct ftrace_func_entry;
#if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_MODULES) && \
defined(CONFIG_DYNAMIC_FTRACE)
@@ -405,6 +406,14 @@ enum ftrace_ops_cmd {
typedef int (*ftrace_ops_func_t)(struct ftrace_ops *op, enum ftrace_ops_cmd cmd);
#ifdef CONFIG_DYNAMIC_FTRACE
+
+#define FTRACE_HASH_DEFAULT_BITS 10
+
+struct ftrace_hash *alloc_ftrace_hash(int size_bits);
+void free_ftrace_hash(struct ftrace_hash *hash);
+struct ftrace_func_entry *add_ftrace_hash_entry_direct(struct ftrace_hash *hash,
+ unsigned long ip, unsigned long direct);
+
/* The hash used to know what functions callbacks trace */
struct ftrace_ops_hash {
struct ftrace_hash __rcu *notrace_hash;