iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.59k stars 3.88k forks source link

libbpf-tools: Fix fsdist, fsslower, and sigsnoop aliases when installed with APP_PREFIX #4932

Closed drewhammond closed 8 months ago

drewhammond commented 8 months ago

Support for prefixed installs with an APP_PREFIX variable was added in https://github.com/iovisor/bcc/pull/4848.

fsdist, fsslower, and sigsnoop support aliased execution but that only works as intended if basename(prog) matches the non-prefixed alias exactly:

root@test:~# foo-prefix-ext4slower
filesystem must be specified using -t option.

This PR simply relaxes that behavior to only find a string match:

root@test:~# foo-prefix-ext4slower
Tracing ext4 operations slower than 10 ms... Hit Ctrl-C to end.
...