Created
February 9, 2012 10:06
-
-
Save kshimo69/1779005 to your computer and use it in GitHub Desktop.
systemtapで関数1個調べる雛型
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/stap | |
# usage: stap -vvv func.stp 'kernel.function("end_buffer_async_read")' | |
probe begin { | |
printf("\n") | |
} | |
probe $1 { | |
printf("%s %s() called pid=%d, pname=%s\n", ctime(gettimeofday_s()+32400), probefunc(), pid(), execname()) | |
printf("vars: %s\n", $$vars) | |
printf("locals: %s\n", $$locals) | |
printf("\n") | |
} | |
probe $1.return { | |
printf("%s %s() leave pid=%d, pname=%s, return=%s\n", ctime(gettimeofday_s()+32400), probefunc(), pid(), execname(), $$return) | |
printf("vars: %s\n", $$vars) | |
printf("locals: %s\n", $$locals) | |
printf("\n") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment