diff options
author | David Smith <dsmith@redhat.com> | 2008-08-15 14:02:51 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2008-08-15 14:02:51 -0500 |
commit | 3fa5cd6a40695472e3752dce17b5a438f8a830fa (patch) | |
tree | f9299c0ec76594877557211c30c505cdfac6ce92 | |
parent | 986e98de88e5a55451aaf24a6ead7f44725124c1 (diff) | |
parent | fd5747054ac2a5c90d209195c55e6310972f969a (diff) | |
download | systemtap-steved-3fa5cd6a40695472e3752dce17b5a438f8a830fa.tar.gz systemtap-steved-3fa5cd6a40695472e3752dce17b5a438f8a830fa.tar.xz systemtap-steved-3fa5cd6a40695472e3752dce17b5a438f8a830fa.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap into work
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | stapprobes.5.in | 2 | ||||
-rw-r--r-- | tapsets.cxx | 2 | ||||
-rw-r--r-- | testsuite/systemtap.examples/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.examples/general/para-callgraph.meta | 16 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/general/para-callgraph.stp | 26 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.html | 6 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 17 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.html | 12 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 30 | ||||
-rw-r--r-- | testsuite/systemtap.examples/subsystem-index.html | 11 | ||||
-rw-r--r-- | testsuite/systemtap.examples/subsystem-index.txt | 23 |
13 files changed, 89 insertions, 71 deletions
@@ -8,6 +8,14 @@ 2008-08-15 Frank Ch. Eigler <fche@elastic.org> + PR 6836 + * tapsets.cxx (dwarf_var...visit_target_symbol): Emit + "return=0xf00" instead of "$return=0xf00" for $$return, + for consistency with other variables. + * NEWS, stapprobes.5.in: Update. + +2008-08-15 Frank Ch. Eigler <fche@elastic.org> + PR 6836. * tapsets.cxx (dwarf_var...visit_target_symbol): Show "var=?" for unlocatable variables. Support $$return. @@ -5,7 +5,7 @@ $$parms, and $$locals context variables, which expand to a string containing a list "var1=0xdead var2=0xbeef var3=?". (Here, var3 exists but is for some reason unavailable.) In return probes only, $$return - expands to an empty string for a void function, or "$return=0xf00". + expands to an empty string for a void function, or "return=0xf00". * What's new in version 0.7 diff --git a/stapprobes.5.in b/stapprobes.5.in index 4b2b4e2b..5281c40e 100644 --- a/stapprobes.5.in +++ b/stapprobes.5.in @@ -356,7 +356,7 @@ expands to a subset of $$vars for only function parameters. .TP $$return is available in return probes only. It expands to a string that -is equivalent to sprintf("$return=%x", $return) +is equivalent to sprintf("return=%x", $return) if the probed function has a return value, or else an empty string. .PP For ".return" probes, context variables other than the "$return" diff --git a/tapsets.cxx b/tapsets.cxx index 60d9a377..9dcb4290 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4333,7 +4333,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) } else { - pf->raw_components += "$return"; + pf->raw_components += "return"; pf->raw_components += "=%#x "; pf->args.push_back(*(expression**)this->targets.top()); } diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog index 682e44e5..af641ba7 100644 --- a/testsuite/systemtap.examples/ChangeLog +++ b/testsuite/systemtap.examples/ChangeLog @@ -1,3 +1,8 @@ +2008-08-15 Frank Ch. Eigler <fche@elastic.org> + + * general/para-callgraph*: Extend. + * indexes: Regenerated. + 2008-08-11 Mark Wielaard <mwielaard@redhat.com> * check.exp: Make sure that stderr gets redircted so warnings don't diff --git a/testsuite/systemtap.examples/general/para-callgraph.meta b/testsuite/systemtap.examples/general/para-callgraph.meta index 3ce4b648..740ed5ce 100644 --- a/testsuite/systemtap.examples/general/para-callgraph.meta +++ b/testsuite/systemtap.examples/general/para-callgraph.meta @@ -1,13 +1,7 @@ -title: Tracing Calls for Sections of Code +title: Callgraph tracing with arguments name: para-callgraph.stp -version: 1.0 -author: anonymous keywords: trace callgraph -subsystem: kernel -status: production -exit: user-controlled -output: trace -scope: system-wide -description: The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name. -test_check: stap -p4 para-callgraph.stp sys_read "*@fs/*.c" -test_installcheck: stap para-callgraph.stp sys_read "*@fs/*.c" -c "sleep 1" +subsystem: general +description: 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. +test_check: stap -p4 para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")' +test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")' -c 'cat /proc/sys/vm/*' diff --git a/testsuite/systemtap.examples/general/para-callgraph.stp b/testsuite/systemtap.examples/general/para-callgraph.stp index e28f5d6b..9abb00c2 100755 --- a/testsuite/systemtap.examples/general/para-callgraph.stp +++ b/testsuite/systemtap.examples/general/para-callgraph.stp @@ -1,22 +1,24 @@ #! /usr/bin/env stap -function trace(entry_p) { - if(tid() in trace) - printf("%s%s%s\n",thread_indent(entry_p), - (entry_p>0?"->":"<-"), - probefunc()) +function trace(entry_p, extra) { + %( $# > 1 %? if (tid() in trace) %) + printf("%s%s%s %s\n", + thread_indent (entry_p), + (entry_p>0?"->":"<-"), + probefunc (), + extra) } + +%( $# > 1 %? global trace -probe kernel.function(@1).call { - if (execname() == "stapio") next # skip our own helper process +probe $2.call { trace[tid()] = 1 - trace(1) } -probe kernel.function(@1).return { - trace(-1) +probe $2.return { delete trace[tid()] } +%) -probe kernel.function(@2).call { trace(1) } -probe kernel.function(@2).return { trace(-1) } +probe $1.call { trace(1, $$parms) } +probe $1.return { trace(-1, $$return) } diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 327e9ef9..d6b1c99b 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -47,9 +47,9 @@ subsystems: disk cpu, keywords: disk cpu use graph<br> <li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br> subsystems: none, keywords: simple<br> <p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li> -<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br> -subsystems: kernel, keywords: trace callgraph<br> -<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li> +<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> +subsystems: general, keywords: trace callgraph<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="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br> subsystems: disk, keywords: disk<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 aed6f457..1372afb0 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -16,14 +16,15 @@ subsystems: none, keywords: simple prints out "hello world" message and then immediately exits. -general/para-callgraph.stp - Tracing Calls for Sections of Code -subsystems: kernel, keywords: trace callgraph - - The script takes two arguments: the first argument is the function to - starts/stops the per thread call graph traces and the second argument - is the list of functions to generate trace information on. The script - prints out a timestap for the thread, the function name and pid, - followed by entry or exit symboly and function name. +general/para-callgraph.stp - Callgraph tracing with arguments +subsystems: general, keywords: trace callgraph + + 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. io/disktop.stp - Summarize Disk Read/Write Traffic diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 5d1c79e0..2825bc2e 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -49,9 +49,9 @@ subsystems: io, keywords: io backtrace<br> </ul> <h3><a name="CALLGRAPH">CALLGRAPH</a></h3> <ul> -<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br> -subsystems: kernel, keywords: trace callgraph<br> -<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li> +<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> +subsystems: general, keywords: trace callgraph<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> </ul> <h3><a name="CPU">CPU</a></h3> <ul> @@ -214,9 +214,9 @@ subsystems: syscall, keywords: syscall read write time io<br> </ul> <h3><a name="TRACE">TRACE</a></h3> <ul> -<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br> -subsystems: kernel, keywords: trace callgraph<br> -<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li> +<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> +subsystems: general, keywords: trace callgraph<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> </ul> <h3><a name="TRAFFIC">TRAFFIC</a></h3> <ul> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index d2e20148..22065e76 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -13,14 +13,15 @@ subsystems: io, keywords: io backtrace = CALLGRAPH = -general/para-callgraph.stp - Tracing Calls for Sections of Code -subsystems: kernel, keywords: trace callgraph +general/para-callgraph.stp - Callgraph tracing with arguments +subsystems: general, keywords: trace callgraph - The script takes two arguments: the first argument is the function to - starts/stops the per thread call graph traces and the second argument - is the list of functions to generate trace information on. The script - prints out a timestap for the thread, the function name and pid, - followed by entry or exit symboly and function name. + 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. = CPU = @@ -395,14 +396,15 @@ subsystems: syscall, keywords: syscall read write time io = TRACE = -general/para-callgraph.stp - Tracing Calls for Sections of Code -subsystems: kernel, keywords: trace callgraph +general/para-callgraph.stp - Callgraph tracing with arguments +subsystems: general, keywords: trace callgraph - The script takes two arguments: the first argument is the function to - starts/stops the per thread call graph traces and the second argument - is the list of functions to generate trace information on. The script - prints out a timestap for the thread, the function name and pid, - followed by entry or exit symboly and function name. + 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. = TRAFFIC = diff --git a/testsuite/systemtap.examples/subsystem-index.html b/testsuite/systemtap.examples/subsystem-index.html index 9bdec0c8..0f2517ce 100644 --- a/testsuite/systemtap.examples/subsystem-index.html +++ b/testsuite/systemtap.examples/subsystem-index.html @@ -40,7 +40,7 @@ </ul> <h2>Examples by Subsystem</h2> -<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p> +<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#GENERAL">GENERAL</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p> <h3><a name="CPU">CPU</a></h3> <ul> <li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br> @@ -56,6 +56,12 @@ subsystems: disk cpu, keywords: disk cpu use graph<br> subsystems: disk, keywords: disk<br> <p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li> </ul> +<h3><a name="GENERAL">GENERAL</a></h3> +<ul> +<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br> +subsystems: general, keywords: trace callgraph<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> +</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> @@ -73,9 +79,6 @@ subsystems: io, keywords: io<br> </ul> <h3><a name="KERNEL">KERNEL</a></h3> <ul> -<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br> -subsystems: kernel, keywords: trace callgraph<br> -<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li> <li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br> subsystems: kernel, keywords: profiling<br> <p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li> diff --git a/testsuite/systemtap.examples/subsystem-index.txt b/testsuite/systemtap.examples/subsystem-index.txt index 98e75e98..d34ac64c 100644 --- a/testsuite/systemtap.examples/subsystem-index.txt +++ b/testsuite/systemtap.examples/subsystem-index.txt @@ -28,6 +28,19 @@ subsystems: disk, keywords: disk ten entries during that period. += GENERAL = + +general/para-callgraph.stp - Callgraph tracing with arguments +subsystems: general, keywords: trace callgraph + + 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. + + = IO = io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call @@ -61,16 +74,6 @@ subsystems: io, keywords: io = KERNEL = -general/para-callgraph.stp - Tracing Calls for Sections of Code -subsystems: kernel, keywords: trace callgraph - - The script takes two arguments: the first argument is the function to - starts/stops the per thread call graph traces and the second argument - is the list of functions to generate trace information on. The script - prints out a timestap for the thread, the function name and pid, - followed by entry or exit symboly and function name. - - process/pf2.stp - Profile kernel functions subsystems: kernel, keywords: profiling |