]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support riscv USDT argument parsing logic
authorPu Lehui <pulehui@huawei.com>
Tue, 19 Apr 2022 14:52:38 +0000 (22:52 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 20 Apr 2022 04:59:35 +0000 (21:59 -0700)
commita24ddf51f2c02d424cac4016ecf7d6013d5cc8fa
tree7c9bebe6a96932794df0de5848e56d5031b14e05
parent2d4c1d4e6e7bdc9ffeaded74e72c1422e86bd7a3
libbpf: Support riscv USDT argument parsing logic

Add riscv-specific USDT argument specification parsing logic.
riscv USDT argument format is shown below:
- Memory dereference case:
  "size@off(reg)", e.g. "-8@-88(s0)"
- Constant value case:
  "size@val", e.g. "4@5"
- Register read case:
  "size@reg", e.g. "-8@a1"

s8 will be marked as poison while it's a reg of riscv, we need
to alias it in advance. Both RV32 and RV64 have been tested.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220419145238.482134-3-pulehui@huawei.com
tools/lib/bpf/usdt.c