From a5e2a4c92910faf6ef6a2f84b6b58a85dece300c Mon Sep 17 00:00:00 2001 From: ddomingo Date: Tue, 9 Sep 2008 09:23:21 +1000 Subject: separated Scripts, edited accordingly --- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 46 ++++++++++++++++++++++ .../en-US/Understanding_How_SystemTap_Works.xml | 7 ++-- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 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 new file mode 100644 index 00000000..abb087bc --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -0,0 +1,46 @@ + + + +
+ SystemTap Scripts + + + For the most part, SystemTap scripts are the foundation of each SystemTap session. The SystemTap scripts you use or write yourself instruct SystemTap on what type of information to trap, and what to do once that information is trapped. + + + + As stated in , SystemTap scripts are made up of two components: events and handlers. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. + + + + Note + An event and its corresponding handler is collectively called a probe. A SystemTap script can have multiple probes, in the same manner that each event can have multiple corresponding handlers. + + + + In terms of application development, using events and handlers is similar to inserting print statements in a program's sequence of commands. These print statements allow you to view a history of commands executed once the program is run. + + + + SystemTap scripts go one step further by allowing you more flexibility with regard to handlers. Events serve as the triggers for handlers to run; handlers can be specified to trap specified data and print it in a certain manner. + + + + +
+ Format + + SystemTap scripts use the following format: + +
+ + + +
+ diff --git a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml index e418f561..de5d41b0 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml @@ -41,10 +41,11 @@ Once the SystemTap session is terminated, the hooked events are disconnected from the kernel; afterwards, the kernel module is unloaded. -This sequence is driver from a single command-line program: stap. This program is SystemTap's main front-end tool. For more information about stap, refer to man stap (once SystemTap is set up on your machine). +This sequence is driven from a single command-line program: stap. This program is SystemTap's main front-end tool. For more information about stap, refer to man stap (once SystemTap is set up on your machine). - + +
Tapsets -- cgit From 094b05c79e7a69567f55514386f5f276ada60d0d Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 8 Sep 2008 16:26:48 -0700 Subject: tiny grammar fix in NEWS --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ab035593..c7ddce45 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ * What's new - Target process mode (stap -c CMD or -x PID) now implicitly restricts all - "process.*" probes to the given child process. (It does not effect + "process.*" probes to the given child process. (It does not affect kernel.* or other probe types.) The CMD string is now executed directly, rather than via a /bin/sh -c subshell. -- cgit From 67a66a8b72d19dc1a1fd10db1c55e31a6e93b270 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 9 Sep 2008 11:42:28 +0200 Subject: Correct this_section_offset calculation in _stp_kallsyms_lookup. --- runtime/ChangeLog | 5 +++++ runtime/sym.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index eb091d01..71cd97e4 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2008-09-09 Mark Wielaard + + * sym.c (_stp_kallsyms_lookup): Correct this_section_offset + calculation. + 2008-09-08 Tim Moore PR 1288 diff --git a/runtime/sym.c b/runtime/sym.c index dcdbaf69..b594d9c2 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -98,7 +98,7 @@ static const char *_stp_kallsyms_lookup(unsigned long addr, unsigned long *symbo unsigned long this_section_addr = _stp_modules[midx]->sections[secidx].addr; unsigned long this_section_offset; if (addr < this_section_addr) continue; - this_section_offset = this_section_addr - addr; + this_section_offset = addr - this_section_addr; if (this_section_offset < closest_section_offset) { closest_section_offset = this_section_offset; -- cgit