diff options
author | William Cohen <wcohen@redhat.com> | 2009-01-30 12:33:14 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-01-30 12:33:14 -0500 |
commit | 1cc8a4c78bff79ea8b60e916e5cd01571b469b03 (patch) | |
tree | 4e32eca7acddc28d2e5aa0de5a1bc559a2550c95 | |
parent | 9fbda39bf7687ceeee28813f30f6e3ec5c72fc5d (diff) | |
download | systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.tar.gz systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.tar.xz systemtap-steved-1cc8a4c78bff79ea8b60e916e5cd01571b469b03.zip |
Move the scf.stp example from systemtap.samples to systemtap.examples.
-rw-r--r-- | testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.html | 3 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 10 | ||||
-rw-r--r-- | testsuite/systemtap.examples/interrupt/scf.meta | 13 | ||||
-rw-r--r-- | testsuite/systemtap.examples/interrupt/scf.stp | 21 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.html | 11 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 22 | ||||
-rw-r--r-- | testsuite/systemtap.samples/scf.stp | 25 | ||||
-rw-r--r-- | testsuite/systemtap.samples/scf2.stp | 13 |
9 files changed, 89 insertions, 39 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 879e3529..58fa46bd 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2009-01-23 Will Cohen <wcohen@redhat.com> + + * systemtap.samples/scf.stp: + * systemtap.samples/scf2.stp: Remove + * systemtap.examples/interrupt/scf.*: Revised scf.stp. + * systemtap.examples/index.html: + * systemtap.examples/index.txt: + * systemtap.examples/keyword-index.html: + * systemtap.examples/keyword-index.txt: Regenerate. + 2009-01-29 Will Cohen <wcohen@redhat.com> * systemtap.samples/arith*: diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index b67aa226..87a5a50e 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -49,6 +49,9 @@ keywords: <a href="keyword-index.html#SIMPLE">SIMPLE</a> <br> <li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> keywords: <a href="keyword-index.html#TRACE">TRACE</a> <a href="keyword-index.html#CALLGRAPH">CALLGRAPH</a> <br> <p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> <li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br> keywords: <a href="keyword-index.html#DISK">DISK</a> <br> <p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index f45f4c43..5ffc341a 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -27,6 +27,16 @@ keywords: trace callgraph the trigger. +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + io/disktop.stp - Summarize Disk Read/Write Traffic keywords: disk diff --git a/testsuite/systemtap.examples/interrupt/scf.meta b/testsuite/systemtap.examples/interrupt/scf.meta new file mode 100644 index 00000000..1d6ec3d8 --- /dev/null +++ b/testsuite/systemtap.examples/interrupt/scf.meta @@ -0,0 +1,13 @@ +title: Tally Backtraces for Inter-Processor Interrupt (IPI) +name: scf.stp +version: 1.0 +author: William Cohen +keywords: interrupt backtrace +subsystem: kernel +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency. +test_check: stap -p4 scf.stp +test_installcheck: stap scf.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/interrupt/scf.stp b/testsuite/systemtap.examples/interrupt/scf.stp new file mode 100644 index 00000000..f84c2494 --- /dev/null +++ b/testsuite/systemtap.examples/interrupt/scf.stp @@ -0,0 +1,21 @@ +#! /usr/bin/env stap +# scf.stp +# A reimplementation of user script:smp_call_function example given at OLS 2005 +# in the current language. + +global traces + +probe begin { print("Starting probe, type control-c to stop.\n") } + +probe kernel.function("smp_call_function") +{ + traces[pid(), pexecname(), backtrace()] ++ +} + +probe end { + foreach ([pid, name, stack] in traces-) { # sort by frequency encountered + printf ("traces[%d,%s,\n", pid, name) + print_stack (stack) + printf ("] = %d\n", traces[pid, name, stack]); + } +} diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 34dedc9a..9ff68c8d 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -39,9 +39,12 @@ </ul> <h2>Examples by Keyword</h2> -<p><tt><a href="#BACKTRACE">BACKTRACE</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> +<p><tt><a href="#BACKTRACE">BACKTRACE</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> <h3><a name="BACKTRACE">BACKTRACE</a></h3> <ul> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> <p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li> @@ -88,6 +91,12 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde keywords: <a href="keyword-index.html#DISK">DISK</a> <a href="keyword-index.html#CPU">CPU</a> <a href="keyword-index.html#USE">USE</a> <a href="keyword-index.html#GRAPH">GRAPH</a> <br> <p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li> </ul> +<h3><a name="INTERRUPT">INTERRUPT</a></h3> +<ul> +<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br> +keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> +<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li> +</ul> <h3><a name="IO">IO</a></h3> <ul> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index bf35f139..0127f3a8 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -3,6 +3,16 @@ SYSTEMTAP EXAMPLES INDEX BY KEYWORD = BACKTRACE = +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call keywords: io backtrace @@ -93,6 +103,18 @@ keywords: disk cpu use graph and CPU USE. += INTERRUPT = + +interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI) +keywords: interrupt backtrace + + The Linux kernel function smp_call_function causes expensive + inter-processor interrupts (IPIs). The scf.stp script tallies the + processes and backtraces causing the interprocessor interrupts to + identify the cause of the expensive IPI. On exit the script prints + the tallies in descending frequency. + + = IO = io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call diff --git a/testsuite/systemtap.samples/scf.stp b/testsuite/systemtap.samples/scf.stp deleted file mode 100644 index 1108fdea..00000000 --- a/testsuite/systemtap.samples/scf.stp +++ /dev/null @@ -1,25 +0,0 @@ -# scf.stp -# A reimplementation of user script:smp_call_function example given at OLS 2005 -# in the current language. -# -# Will Cohen -# 9/22/2005 - -global traces - -probe kernel.function("smp_call_function") -{ - traces[pid(), pexecname(), backtrace()] += 1; -} - -probe begin { print( "starting probe\n" ); } - -probe end { - print("end of data collection\n"); - foreach( [pid, name, stack] in traces){ - print( "traces[" . sprint(pid) . "," . name . ",\n" ); - print_stack(stack) - print( "] = " . sprint(traces[pid, name, stack]) ); - print( "\n" ); - } -} diff --git a/testsuite/systemtap.samples/scf2.stp b/testsuite/systemtap.samples/scf2.stp deleted file mode 100644 index 5ad46350..00000000 --- a/testsuite/systemtap.samples/scf2.stp +++ /dev/null @@ -1,13 +0,0 @@ -global traces - -probe kernel.function("smp_call_function") { - traces[pid(), pexecname(), backtrace()] ++ -} -probe timer.ms(1000) { exit () } -probe end { - foreach ([pid+, name, stack] in traces) { # sort by pid - printf ("traces[%d,%s,\n", pid, name) - print_stack (stack) - printf ("] = %d\n", traces[pid, name, stack]); - } -} |