From 5191b61cb908d096d872ad26f8f632641ff15cc8 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 20 Nov 2008 10:56:02 +1000 Subject: revise as per wcohen, run 2 --- doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml') 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 (condition) 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) } - -- cgit