aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2020-08-25 21:21:17 +0200
committerAlexei Starovoitov <[email protected]>2020-08-25 15:37:41 -0700
commit1c6d28a6ac56de5b0af9239a1b02aea4c3011ea3 (patch)
tree26bb496869f662a2a271ad0a81028b309fb72ce5 /tools/perf/scripts/python/bin/stackcollapse-record
parentdafe58fc1917a96c657a0f56a12f262e5d9fb324 (diff)
bpf: Factor btf_struct_access function
Adding btf_struct_walk function that walks through the struct type + given offset and returns following values: enum bpf_struct_walk_result { /* < 0 error */ WALK_SCALAR = 0, WALK_PTR, WALK_STRUCT, }; WALK_SCALAR - when SCALAR_VALUE is found WALK_PTR - when pointer value is found, its ID is stored in 'next_btf_id' output param WALK_STRUCT - when nested struct object is found, its ID is stored in 'next_btf_id' output param It will be used in following patches to get all nested struct objects for given type and offset. The btf_struct_access now calls btf_struct_walk function, as long as it gets nested structs as return value. Signed-off-by: Jiri Olsa <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions