summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
diff options
context:
space:
mode:
authorddomingo <ddomingo@redhat.com>2008-11-20 10:56:02 +1000
committerddomingo <ddomingo@redhat.com>2008-11-20 10:56:02 +1000
commit5191b61cb908d096d872ad26f8f632641ff15cc8 (patch)
treef31776d2313db1c1bd6e3481abeca6fa3849baef /doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
parentf0e31baf0e49c3a5aaaddaa372cf33954b108190 (diff)
downloadsystemtap-steved-5191b61cb908d096d872ad26f8f632641ff15cc8.tar.gz
systemtap-steved-5191b61cb908d096d872ad26f8f632641ff15cc8.tar.xz
systemtap-steved-5191b61cb908d096d872ad26f8f632641ff15cc8.zip
revise as per wcohen, run 2
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>