diff options
author | 2023-05-27 21:27:06 +0900 | |
---|---|---|
committer | 2023-06-05 14:33:17 -0700 | |
commit | 503e4def5414fd0f9b6ffecb6eedbc4b1603693b (patch) | |
tree | 69fee163b5ae05973e9a2c1bd6ef311ca0a64050 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | bpf/xdp: optimize bpf_xdp_pointer to avoid reading sinfo (diff) | |
download | wireguard-linux-503e4def5414fd0f9b6ffecb6eedbc4b1603693b.tar.xz wireguard-linux-503e4def5414fd0f9b6ffecb6eedbc4b1603693b.zip |
bpf: Replace open code with for allocated object check
>From commit 282de143ead9 ("bpf: Introduce allocated objects support"),
With this allocated object with BPF program, (PTR_TO_BTF_ID | MEM_ALLOC)
has been a way of indicating to check the type is the allocated object.
commit d8939cb0a03c ("bpf: Loosen alloc obj test in verifier's
reg_btf_record")
>From the commit, there has been helper function for checking this, named
type_is_ptr_alloc_obj(). But still, some of the code use open code to
retrieve this info. This commit replaces the open code with the
type_is_alloc(), and the type_is_ptr_alloc_obj() function.
Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230527122706.59315-1-danieltimlee@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions