On 4/1/22 8:29 PM, Andrii Nakryiko wrote: > 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. > > Reviewed-by: Alan Maguire <alan.maguire@xxxxxxxxxx> > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > --- > tools/lib/bpf/usdt.c | 105 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 105 insertions(+) Reviewed-by: Dave Marchevsky <davemarchevsky@xxxxxx>