OSDN Git Service

libbpf: Usdt aarch64 arg parsing support
authorAlan Maguire <alan.maguire@oracle.com>
Mon, 11 Apr 2022 15:21:36 +0000 (16:21 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 11 Apr 2022 22:32:28 +0000 (15:32 -0700)
commit0f8619929c572609f7cdfa366d0424c2c2552e60
tree8de688ef38cf3f54f3c818fc4e9889bea13a8f6b
parentaa1b02e674fe69acd04624f5bcdef94928bc8695
libbpf: Usdt aarch64 arg parsing support

Parsing of USDT arguments is architecture-specific. On aarch64 it is
relatively easy since registers used are x[0-31] and sp. Format is
slightly different compared to x86_64. Possible forms are:

- "size@[reg[,offset]]" for dereferences, e.g. "-8@[sp,76]" and "-4@[sp]";
- "size@reg" for register values, e.g. "-4@x0";
- "size@value" for raw values, e.g. "-8@1".

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1649690496-1902-2-git-send-email-alan.maguire@oracle.com
tools/lib/bpf/usdt.c