From: Yonghong Song <yonghong.song@linux.dev>
To: Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org
Cc: kernel-team@meta.com, John Fastabend <john.fastabend@gmail.com>
Subject: Re: [PATCH v3 bpf-next 2/2] bpf: inline bpf_get_branch_snapshot() helper
Date: Thu, 4 Apr 2024 10:44:06 -0700 [thread overview]
Message-ID: <ed69555b-2afb-4aac-8624-e51b47d537dc@linux.dev> (raw)
In-Reply-To: <20240404002640.1774210-3-andrii@kernel.org>
On 4/3/24 5:26 PM, Andrii Nakryiko wrote:
> Inline bpf_get_branch_snapshot() helper using architecture-agnostic
> inline BPF code which calls directly into underlying callback of
> perf_snapshot_branch_stack static call. This callback is set early
> during kernel initialization and is never updated or reset, so it's ok
> to fetch actual implementation using static_call_query() and call
> directly into it.
>
> This change eliminates a full function call and saves one LBR entry
> in PERF_SAMPLE_BRANCH_ANY LBR mode.
>
> Acked-by: John Fastabend <john.fastabend@gmail.com>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
next prev parent reply other threads:[~2024-04-04 17:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 0:26 [PATCH v3 bpf-next 0/2] Inline bpf_get_branch_snapshot() BPF helper Andrii Nakryiko
2024-04-04 0:26 ` [PATCH v3 bpf-next 1/2] bpf: make bpf_get_branch_snapshot() architecture-agnostic Andrii Nakryiko
2024-04-04 17:25 ` Yonghong Song
2024-04-04 0:26 ` [PATCH v3 bpf-next 2/2] bpf: inline bpf_get_branch_snapshot() helper Andrii Nakryiko
2024-04-04 17:44 ` Yonghong Song [this message]
2024-04-04 18:14 ` Alexei Starovoitov
2024-04-04 18:28 ` Yonghong Song
2024-04-04 18:31 ` Alexei Starovoitov
2024-04-04 20:08 ` Andrii Nakryiko
2024-10-23 8:28 ` Shung-Hsi Yu
2024-10-23 16:04 ` Andrii Nakryiko
2024-04-04 20:20 ` [PATCH v3 bpf-next 0/2] Inline bpf_get_branch_snapshot() BPF helper patchwork-bot+netdevbpf
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=ed69555b-2afb-4aac-8624-e51b47d537dc@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
/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.