summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2023-04-04 07:50:24 +0300
committerAndrii Nakryiko <andrii@kernel.org>2023-04-05 02:57:14 +0300
commit63260df1396578226ac3134cf7f764690002e70e (patch)
treec7b94a6b73081b69775b8c8d5c6ad1c52e02bdae /tools/perf/scripts/python/flamegraph.py
parentb7e852a9ec96635168c04204fb7cf1f7390b9a8c (diff)
downloadlinux-63260df1396578226ac3134cf7f764690002e70e.tar.xz
bpf: Refactor btf_nested_type_is_trusted().
btf_nested_type_is_trusted() tries to find a struct member at corresponding offset. It works for flat structures and falls apart in more complex structs with nested structs. The offset->member search is already performed by btf_struct_walk() including nested structs. Reuse this work and pass {field name, field btf id} into btf_nested_type_is_trusted() instead of offset to make BTF_TYPE_SAFE*() logic more robust. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/bpf/20230404045029.82870-4-alexei.starovoitov@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions