From fc03e8e8d406640d6dfa73f9e3890086c9bfb75f Mon Sep 17 00:00:00 2001 From: ddomingo Date: Tue, 28 Oct 2008 14:04:21 +1000 Subject: changes as per wcohen, minor additions --- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide/en-US/Scripts.xml') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml index fad12dee..ca360e06 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -38,9 +38,23 @@ SystemTap scripts use the file extension .stp, and are written in the following format: - + probe event, {handler} - + + + + Sometimes, you may need to recycle a handler accross multiple probes. Rather than rewrite handler statements accross probes, you can simply recycle them using functions, as in: + + + +function function_name {handler1} +probe event {function_name} + + +Here, the probe executes handler1 as the handler for the probed event. + + + @@ -353,13 +367,14 @@ hald(2360) open A string describing the probe point currently being handled. - + thread_indent() -- cgit