summaryrefslogtreecommitdiffstats
path: root/contrib/bpftrace/zfs-trace.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bpftrace/zfs-trace.sh')
-rwxr-xr-xcontrib/bpftrace/zfs-trace.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/bpftrace/zfs-trace.sh b/contrib/bpftrace/zfs-trace.sh
new file mode 100755
index 000000000..13230b78c
--- /dev/null
+++ b/contrib/bpftrace/zfs-trace.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+ZVER=$(cat /sys/module/zfs/version | cut -f 1 -d '-')
+KVER=$(uname -r)
+
+bpftrace \
+ --include "/usr/src/zfs-$ZVER/$KVER/zfs_config.h" \
+ -I "/usr/src/zfs-$ZVER/include" \
+ -I "/usr/src/zfs-$ZVER/include/spl" \
+ "$@"