This commit is contained in:
gatieme
2017-05-08 13:44:10 +08:00
parent 8988f0c47b
commit 12a0e05357
10 changed files with 230 additions and 0 deletions
@@ -0,0 +1,16 @@
probe syscall.mkdir
{
printf("exit %s\n", argstr);
}
probe begin
{
printf("test mkdir begin\n");
}
probe end
{
printf("test mkdir end\n");
}
+22
View File
@@ -0,0 +1,22 @@
probe begin
{
log("begin to probe")
}
probe syscall.open
{
printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
}
probe timer.ms(4000) # after 4 seconds
{
exit ()
}
probe end
{
log("end to probe")
}
+9
View File
@@ -0,0 +1,9 @@
probe process("/lib64/libc.so.6").function("malloc") {
if (target()== pid()) {
print_ubacktrace();
exit();
}
}
probe begin {
println("~");
}
+21
View File
@@ -0,0 +1,21 @@
/*************************************************************************
> File Name: t.c
> Author: gatieme
> Created Time: Thu 13 Apr 2017 06:13:39 PM CST
************************************************************************/
#include <stdio.h>
#include <stdlib.h>
void fun()
{
malloc(1000);
}
int main(int argc, char *argv[])
{
fun();
return 0;
}