From 9265134c5097d6a640171566510f26633a98614e Mon Sep 17 00:00:00 2001 From: Joanne Koong Date: Mon, 24 Feb 2025 13:11:38 -0800 Subject: example: add usdt.bt Add example bpftrace file for monitoring tracepoints. Signed-off-by: Joanne Koong --- example/usdt.bt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 example/usdt.bt (limited to 'example') diff --git a/example/usdt.bt b/example/usdt.bt new file mode 100644 index 0000000..41cfcdc --- /dev/null +++ b/example/usdt.bt @@ -0,0 +1,19 @@ +#!/usr/bin/env bpftrace + +// To run, do `sudo bpftrace usdt.bt` + +usdt:../build/lib/libfuse3.so:libfuse:request_receive +{ + printf("libfuse:request_receive hit, err=%d\n", arg0); +} + +usdt:../build/lib/libfuse3.so:libfuse:request_process +{ + printf("libfuse:request_process hit, opcode=%u, unique=%u\n", arg0, arg1); +} + +usdt:../build/lib/libfuse3.so:libfuse:request_reply +{ + printf("libfuse:request_reply hit, unique=%lu, len=%u, err=%u, reply_err=%d\n", + arg0, arg1, arg2, arg3); +} -- cgit v1.2.3