From b3e8f644958f5033beebeb91edf11d5edf21c8c1 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Mon, 17 Nov 2008 13:04:02 +1000 Subject: revisions as per dsmith --- .../en-US/ScriptConstructs.xml | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 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 b1f40669..fccf0469 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml @@ -71,18 +71,22 @@ if (condition) ifelse.stp -global countread, countnonread -probe kernel.function("vfs_read"),kernel.function("vfs_write") -{ - if (probefunc()=="vfs_read") { - countread ++ } - else {countnonread ++} -} -probe timer.s(5) { exit() } -probe end -{ - printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread) -} +global countread, countnonread +probe kernel.function("vfs_read"),kernel.function("vfs_write") +{ + if (probefunc()=="vfs_read") { + countread ++ + } + else { + countnonread ++ + } +} +probe timer.s(5) { exit() } +probe end +{ + printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread) +} + -- cgit