All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCHv3 bpf-next 2/5] ftrace: Add ftrace_lookup_symbols function
Date: Wed, 27 Apr 2022 16:24:17 -0700	[thread overview]
Message-ID: <CAEf4BzZBnWFxj44OwbNdHrV_LQz_2HmDUSHhEv69psrzi09egQ@mail.gmail.com> (raw)
In-Reply-To: <20220427210345.455611-3-jolsa@kernel.org>

On Wed, Apr 27, 2022 at 2:04 PM Jiri Olsa <jolsa@kernel.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@kernel.org>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---

LGTM.

Acked-by: Andrii Nakryiko <andrii@kernel.org>

>  include/linux/ftrace.h |  6 ++++
>  kernel/kallsyms.c      |  1 +
>  kernel/trace/ftrace.c  | 62 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 69 insertions(+)
>

[...]

  reply	other threads:[~2022-04-27 23:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 21:03 [PATCHv3 bpf-next 0/5] bpf: Speed up symbol resolving in kprobe multi link Jiri Olsa
2022-04-27 21:03 ` [PATCHv3 bpf-next 1/5] kallsyms: Fully export kallsyms_on_each_symbol function Jiri Olsa
2022-04-28 14:06   ` Jiri Olsa
2022-04-27 21:03 ` [PATCHv3 bpf-next 2/5] ftrace: Add ftrace_lookup_symbols function Jiri Olsa
2022-04-27 23:24   ` Andrii Nakryiko [this message]
2022-04-27 21:03 ` [PATCHv3 bpf-next 3/5] fprobe: Resolve symbols with ftrace_lookup_symbols Jiri Olsa
2022-04-27 21:03 ` [PATCHv3 bpf-next 4/5] bpf: Resolve symbols with ftrace_lookup_symbols for kprobe multi link Jiri Olsa
2022-04-27 21:03 ` [PATCHv3 bpf-next 5/5] selftests/bpf: Add attach bench test Jiri Olsa
2022-04-27 23:27   ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEf4BzZBnWFxj44OwbNdHrV_LQz_2HmDUSHhEv69psrzi09egQ@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.