[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251217200712.606a9a7a@robin>
Date: Wed, 17 Dec 2025 20:07:12 -0500
From: Steven Rostedt <rostedt@...nel.org>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Florent Revest <revest@...gle.com>, Mark Rutland <mark.rutland@....com>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Menglong Dong
<menglong8.dong@...il.com>, Song Liu <song@...nel.org>
Subject: Re: [PATCHv5 bpf-next 3/9] ftrace: Export some of hash related
functions
On Mon, 15 Dec 2025 22:13:56 +0100
Jiri Olsa <jolsa@...nel.org> wrote:
> index 505b7d3f5641..c0a72fcae1f6 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_hash_entry_direct(struct ftrace_hash *hash,
As this is no longer static and is exported to other users within the
kernel, it should be renamed to: add_ftrace_hash_entry_direct()
to keep the namespace unique.
-- Steve
> + 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;
Powered by blists - more mailing lists