scripts/bpf/gen.py
0 → 100755
+53
−0
+1
−1
Loading
If an USDT probe is defined within a shared object, bpftrace expects the path to that shared object instead of an executable. This means that we need to replace __EXE__ in the bpftrace scripts differently, depending on whether the application was linked statically or dynamically. This is now done by the `scripts/bpf/gen.py` script. It lists all available probes, along with their locations, of a process. Then, it matches them to those described in a bpftrace script replacing the __EXE__ markers with the listed location (either a path to the executable or a shared library). If a bpftrace script uses a probe that isn't listed, its __EXE__ will be replaced by a path to the executable. Signed-off-by:Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I7c323d5f7d948ea57cf8d4d3132e4d59a2de594f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9807 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>