--- wikisrc/tutorials/how_to_enable_and_run_dtrace.mdwn 2014/09/10 14:04:44 1.8 +++ wikisrc/tutorials/how_to_enable_and_run_dtrace.mdwn 2014/09/10 20:42:10 1.9 @@ -88,7 +88,7 @@ List the dtrace probes -Put the following into the file hello.d +Put the following into the file hello.d: BEGIN { @@ -106,7 +106,8 @@ Run the hello world script: 0 1 :BEGIN Hello world -A more complex example that traces the execution of a sleep operation in the kernel: +A more complex example that traces the execution of a sleep operation +in the kernel. Put it in sleep.d: #pragma D option flowindent @@ -117,9 +118,7 @@ A more complex example that traces the e printf("fd: %d", arg0); } - fbt::: - /self->traceme/ - {} + fbt::syscall:entry /self->traceme/ {} fbt::syscall:return /self->traceme/ @@ -129,4 +128,4 @@ A more complex example that traces the e } -Start the script running (dtrace -s ) and then execute a sleep 2 in another shell. +Start the script running (dtrace -s sleep.d) and then execute a "sleep 2" in another shell.