summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/test_usdt_multispec.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-04-04 16:42:00 -0700
committerAlexei Starovoitov <ast@kernel.org>2022-04-05 13:16:08 -0700
commit4c59e584d1581b1bca143dda83d5c3e5baddbf20 (patch)
treee039d83641ae7e9b1f6be18792ea6cbc72028ec9 /tools/testing/selftests/bpf/progs/test_usdt_multispec.c
parent999783c8bbda2e82390cb8c39ed9e3954cf51b82 (diff)
downloadlinux-4c59e584d1581b1bca143dda83d5c3e5baddbf20.tar.bz2
libbpf: Add x86-specific USDT arg spec parsing logic
Add x86/x86_64-specific USDT argument specification parsing. Each architecture will require their own logic, as all this is arch-specific assembly-based notation. Architectures that libbpf doesn't support for USDTs will pr_warn() with specific error and return -ENOTSUP. We use sscanf() as a very powerful and easy to use string parser. Those spaces in sscanf's format string mean "skip any whitespaces", which is pretty nifty (and somewhat little known) feature. All this was tested on little-endian architecture, so bit shifts are probably off on big-endian, which our CI will hopefully prove. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Alan Maguire <alan.maguire@oracle.com> Reviewed-by: Dave Marchevsky <davemarchevsky@fb.com> Link: https://lore.kernel.org/bpf/20220404234202.331384-6-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_usdt_multispec.c')
0 files changed, 0 insertions, 0 deletions