diff options
author | Joanne Koong <joannelkoong@gmail.com> | 2025-02-24 13:11:38 -0800 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-04-02 11:03:26 +0200 |
commit | 9265134c5097d6a640171566510f26633a98614e (patch) | |
tree | 03e4cbc04e9662a5949c13e89e358529278f880f | |
parent | 11fde2346885683202eace0302ae4dc39869bfec (diff) | |
download | libfuse-9265134c5097d6a640171566510f26633a98614e.tar.gz |
example: add usdt.bt
Add example bpftrace file for monitoring tracepoints.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
-rw-r--r-- | example/usdt.bt | 19 |
1 files changed, 19 insertions, 0 deletions
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); +} |