summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-04-04 03:26:40 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-04-04 23:08:01 +0300
commit314a53623cd4e62e1b88126e5ed2bc87073d90ee (patch)
tree05376a14c790f914df2197a0431c3608ac025e66 /tools/bpf
parent5e6a3c1ee693da1793739bb378b224bcf33d7f14 (diff)
downloadlinux-314a53623cd4e62e1b88126e5ed2bc87073d90ee.tar.xz
bpf: inline bpf_get_branch_snapshot() helper
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> Link: https://lore.kernel.org/r/20240404002640.1774210-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions