summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2008-11-19 20:27:28 -0500
committerWilliam Cohen <wcohen@redhat.com>2008-11-19 20:27:28 -0500
commita006b96108a8b92b73af5ddb396cb1b1119f5529 (patch)
treea4d14055400a0ff012c45cac54bb1192ed0e716d /doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
parent64db9629ddd2604cad4dc00086e028205fde46a5 (diff)
parentc59943f6936e93819978d5149500ca217d09667a (diff)
downloadsystemtap-steved-a006b96108a8b92b73af5ddb396cb1b1119f5529.tar.gz
systemtap-steved-a006b96108a8b92b73af5ddb396cb1b1119f5529.tar.xz
systemtap-steved-a006b96108a8b92b73af5ddb396cb1b1119f5529.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml')
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml7
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
index fccf0469..1cda95a4 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
@@ -74,19 +74,16 @@ if (<replaceable>condition</replaceable>)
global countread, countnonread
probe kernel.function("vfs_read"),kernel.function("vfs_write")
{
- if (probefunc()=="vfs_read") {
+ if (probefunc()=="vfs_read")
countread ++
- }
- else {
+ else
countnonread ++
- }
}
probe timer.s(5) { exit() }
probe end
{
printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread)
}
-
</programlisting>
</example>