[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZBnWFxj44OwbNdHrV_LQz_2HmDUSHhEv69psrzi09egQ@mail.gmail.com>
Date: Wed, 27 Apr 2022 16:24:17 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCHv3 bpf-next 2/5] ftrace: Add ftrace_lookup_symbols function
On Wed, Apr 27, 2022 at 2:04 PM Jiri Olsa <jolsa@...nel.org> wrote:
>
> Adding ftrace_lookup_symbols function that resolves array of symbols
> with single pass over kallsyms.
>
> The user provides array of string pointers with count and pointer to
> allocated array for resolved values.
>
> int ftrace_lookup_symbols(const char **sorted_syms, size_t cnt,
> unsigned long *addrs)
>
> It iterates all kalsyms symbols and tries to loop up each in provided
typo: kallsyms
> symbols array with bsearch. The symbols array needs to be sorted by
> name for this reason.
>
> We also check each symbol to pass ftrace_location, because this API
> will be used for fprobe symbols resolving.
>
> Suggested-by: Andrii Nakryiko <andrii@...nel.org>
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
LGTM.
Acked-by: Andrii Nakryiko <andrii@...nel.org>
> include/linux/ftrace.h | 6 ++++
> kernel/kallsyms.c | 1 +
> kernel/trace/ftrace.c | 62 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 69 insertions(+)
>
[...]
Powered by blists - more mailing lists