mbox series

[bpf-next,0/2] libbpf: usdt aarch64 support

Message ID 1649458366-25288-1-git-send-email-alan.maguire@oracle.com (mailing list archive)
Headers show
Series libbpf: usdt aarch64 support | expand

Message

Alan Maguire April 8, 2022, 10:52 p.m. UTC
USDT support [1] requires architecture-specific handling for translating
from argument strings describing each probe argument to appropriate values
that can be made available to the BPF program.  Determining value size,
whether it refers to a dereference (and if there is an offset from the
register value), a register value or a constant all has to be parsed
slightly differently for different architectures.

However a common representation is created for use within BPF programs
(via usdt.bpf.h), and patch 1 abstracts out the initialization of
struct usdt_arg_spec associated with the argument, rather than repeating
those steps for each architecture.

Patch 2 then adds aarch64-specific argument parsing.

[1] https://lore.kernel.org/bpf/20220404234202.331384-1-andrii@kernel.org/

Alan Maguire (2):
  libbpf: usdt: factor out common USDT arg handling
  libbpf: usdt aarch64 arg parsing support

 tools/lib/bpf/usdt.c | 134 +++++++++++++++++++++++++++++++++------------------
 1 file changed, 87 insertions(+), 47 deletions(-)