aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2024-04-04 00:26:40 +0000
committerAlexei Starovoitov <[email protected]>2024-04-04 20:08:01 +0000
commit314a53623cd4e62e1b88126e5ed2bc87073d90ee (patch)
tree05376a14c790f914df2197a0431c3608ac025e66 /tools/bpf/bpftool/common.c
parentbpf: make bpf_get_branch_snapshot() architecture-agnostic (diff)
downloadkernel-314a53623cd4e62e1b88126e5ed2bc87073d90ee.tar.gz
kernel-314a53623cd4e62e1b88126e5ed2bc87073d90ee.zip
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 <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/bpf/bpftool/common.c')
0 files changed, 0 insertions, 0 deletions