From 6594af21396978e472223017058beb6e7423a9c9 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Fri, 7 Nov 2008 13:47:11 -0500 Subject: Scripts.xml proofreading changes. --- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 62 ++++++++++++++++++++----- 1 file changed, 51 insertions(+), 11 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml index dc087222..ca507b43 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -75,7 +75,7 @@ probe event {statements} -function function_name(arguments {statements} +function function_name(arguments) {statements} probe event {function_name(arguments)} @@ -131,18 +131,50 @@ probe event {function_name syscall.system_call - The entry to the system call system_call. Similar to kernel.function, appending a return to the statement specifies the exit of the system call. For example, to specify the entry of the system call close, use syscall.close.return. - - To identify what system calls are made by a specific program/command, use strace command. + + The entry to the system call + system_call. If the exit from a syscall + is desired, appending a .return to the event + monitor the exit of the system call instead. For example, to specify + the entry and exit of the system call close, use + syscall.close and + syscall.close.return respectively. + + + + + + vfs.file_op + + + The entry to the file_op event for + Virtual File System (VFS). Similar to syscall + event, appending a .return to the event monitors + the exit of the file_op operation. + kernel.function("function") - The entry to the kernel function function. For example, kernel.function("sys_open") refers to the "event" that occurs when the kernel function sys_open is called by any thread in the system. To specify the return of the kernel function sys_open, append the return string to the event statement; i.e. kernel.function("sys_open").return. - - When defining functions, you can use asterisk (*) for wildcards. You can also trace the entry or exit of a function in a kernel source file. Consider the following example: + + The entry to the kernel function + function. For example, + kernel.function("sys_open") refers to the "event" + that occurs when the kernel function sys_open is + called by any thread in the system. To specify the + return of the kernel function + sys_open, append the return + string to the event statement; + i.e. kernel.function("sys_open").return. + + + + When defining functions, you can use asterisk (*) + for wildcards. You can also trace the entry or exit of a function in + a kernel source file. Consider the following example: + wildcards.stp @@ -152,7 +184,15 @@ probe kernel.function("*@net/socket.c").return { } -In the previous example, the first probe's event specifies the entry of ALL functions in the kernel source file net/socket.c. The second probe specifies the exit of all those functions. Note that in this example, no handler was specified; as such, no information will be displayed. + Wild cards also work for other things, e.g. syscall.* + + + In the previous example, the first probe's event specifies the entry + of ALL functions in the kernel source file + net/socket.c. The second probe specifies the + exit of all those functions. Note that in this example, no handler + was specified; as such, no information will be displayed. + @@ -247,9 +287,9 @@ probe timer.s(4) - When used in conjunction with another probe that collects - information that updates periodically, timer events allows you to - see how that information changes over time. + When used in conjunction with other probes that collect information, + timer events allows you to print out get periodic updates and see + how that information changes over time. -- cgit