summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2026-06-06 15:39:26 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-06-07 20:03:00 +0300
commite57f13eaab259ece7c9e8d81ba2c40c4f057ca2c (patch)
tree0dfa171f80a6af04752a8ee2b17d4623dad274ac /include
parent5b038319be442c620f774e6fc9e9283deeca1c75 (diff)
downloadlinux-e57f13eaab259ece7c9e8d81ba2c40c4f057ca2c.tar.xz
ftrace: Add ftrace_hash_count function
Adding external ftrace_hash_count function so we could get hash count outside of ftrace object. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20260606123955.345967-2-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 28b30c6f1031..02c24bf766ce 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -551,6 +551,8 @@ int update_ftrace_direct_mod(struct ftrace_ops *ops, struct ftrace_hash *hash, b
void ftrace_stub_direct_tramp(void);
+unsigned long ftrace_hash_count(struct ftrace_hash *hash);
+
#else
struct ftrace_ops;
static inline unsigned long ftrace_find_rec_direct(unsigned long ip)
@@ -590,6 +592,11 @@ static inline int update_ftrace_direct_mod(struct ftrace_ops *ops, struct ftrace
return -ENODEV;
}
+static inline unsigned long ftrace_hash_count(struct ftrace_hash *hash)
+{
+ return 0;
+}
+
/*
* This must be implemented by the architecture.
* It is the way the ftrace direct_ops helper, when called