Skip to content

Instantly share code, notes, and snippets.

@azat
Last active August 29, 2015 14:15
Show Gist options
  • Save azat/5373fd85a4aba7b4b873 to your computer and use it in GitHub Desktop.
Save azat/5373fd85a4aba7b4b873 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
mkdir -p test/mnt
./fusefs -s -o nonempty $PWD/test/mnt/
cd /sys/kernel/debug/tracing
functions=(
fuse_dev_do_write
fuse_copy_one
fuse_dentry_revalidate
fuse_change_attributes
fuse_change_entry_timeout
fuse_simple_request
fuse_request_send
)
# request_wait_answer # <-- no dymaic probe for this one
for f in ${functions[@]}; do
echo "p:$f $f" >> kprobe_events
echo "r:ret_$f $f \$retval" >> kprobe_events
done
echo 1 > events/kprobes/enable
echo 1 > options/stacktrace
echo 1 > options/userstacktrace
echo 1 > options/sym-userobj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment