summaryrefslogtreecommitdiffstats
path: root/SystemTap_Beginners_Guide/paracallgraph.html
diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/paracallgraph.html')
-rw-r--r--SystemTap_Beginners_Guide/paracallgraph.html16
1 files changed, 9 insertions, 7 deletions
diff --git a/SystemTap_Beginners_Guide/paracallgraph.html b/SystemTap_Beginners_Guide/paracallgraph.html
index fa407f11..43b781e8 100644
--- a/SystemTap_Beginners_Guide/paracallgraph.html
+++ b/SystemTap_Beginners_Guide/paracallgraph.html
@@ -1,7 +1,8 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.2. Call Graph Tracing</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.0.0" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.6-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="next" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="paracallgraph"></a>5.3.2. Call Graph Tracing</h3></div></div></div><a id="idm47951475848096" class="indexterm"></a><a id="idm47951422450832" class="indexterm"></a><a id="idm47951424729136" class="indexterm"></a><a id="idm47951456257440" class="indexterm"></a><a id="idm47951471107680" class="indexterm"></a><a id="idm47951463779184" class="indexterm"></a><a id="idm47951457813008" class="indexterm"></a><div class="para"> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.2. Call Graph Tracing</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.6-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="next" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="paracallgraph">
3 ⁠</a>5.3.2. Call Graph Tracing</h3></div></div></div><a id="idm213973261136" class="indexterm"></a><a id="idm213975220288" class="indexterm"></a><a id="idm214009586784" class="indexterm"></a><a id="idm214017166880" class="indexterm"></a><a id="idm214017951792" class="indexterm"></a><a id="idm213969139024" class="indexterm"></a><a id="idm213974810576" class="indexterm"></a><div class="para">
3 This section describes how to trace incoming and outgoing function calls. 4 This section describes how to trace incoming and outgoing function calls.
4 </div><div class="formalpara"><div xmlns:d="http://docbook.org/ns/docbook" class="title">para-callgraph.stp</div> 5 </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">para-callgraph.stp</div>
5 6
6<pre class="programlisting">#! /usr/bin/env stap 7<pre class="programlisting">#! /usr/bin/env stap
7 8
@@ -28,17 +29,18 @@ probe $2.return {
28probe $1.call { trace(1, $$parms) } 29probe $1.call { trace(1, $$parms) }
29probe $1.return { trace(-1, $$return) } 30probe $1.return { trace(-1, $$return) }
30</pre> 31</pre>
31 </div><a id="idm47951457548512" class="indexterm"></a><a id="idm47951475156208" class="indexterm"></a><a id="idm47951423494064" class="indexterm"></a><a id="idm47951454817424" class="indexterm"></a><div class="para"> 32 </div><a id="idm213968991568" class="indexterm"></a><a id="idm214018899120" class="indexterm"></a><a id="idm213968052848" class="indexterm"></a><a id="idm213967720912" class="indexterm"></a><div class="para">
32 <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> takes two command-line arguments: 33 <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> takes two command-line arguments:
33 </div><a id="idm47951455647520" class="indexterm"></a><a id="idm47951417885424" class="indexterm"></a><a id="idm47951427870608" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> 34 </div><a id="idm213967976928" class="indexterm"></a><a id="idm213969716512" class="indexterm"></a><a id="idm213974727872" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para">
34 The function/s whose entry/exit call you'd like to trace (<code class="command">$1</code>). 35 The function/s whose entry/exit call you'd like to trace (<code class="command">$1</code>).
35 </div></li><li class="listitem"><div class="para"> 36 </div></li><li class="listitem"><div class="para">
36 A second optional <em class="firstterm">trigger function</em> (<code class="command">$2</code>), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet. 37 A second optional <em class="firstterm">trigger function</em> (<code class="command">$2</code>), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet.
37 </div></li></ul></div><a id="idm47951457295888" class="indexterm"></a><a id="idm47951468975504" class="indexterm"></a><a id="idm47951459984816" class="indexterm"></a><div class="para"> 38 </div></li></ul></div><a id="idm214009624560" class="indexterm"></a><a id="idm214012488064" class="indexterm"></a><a id="idm213972459264" class="indexterm"></a><div class="para">
38 <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> uses <code class="command">thread_indent()</code>; as such, its output contains the timestamp, process name, and thread ID of <code class="command">$1</code> (that is, the probe function you are tracing). For more information about <code class="command">thread_indent()</code>, refer to its entry in <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a>. 39 <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> uses <code class="command">thread_indent()</code>; as such, its output contains the timestamp, process name, and thread ID of <code class="command">$1</code> (that is, the probe function you are tracing). For more information about <code class="command">thread_indent()</code>, refer to its entry in <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a>.
39 </div><div class="para"> 40 </div><div class="para">
40 The following example contains an excerpt from the output for <code class="command">stap para-callgraph.stp 'kernel.function("*@fs/*.c")' 'kernel.function("sys_read")'</code>: 41 The following example contains an excerpt from the output for <code class="command">stap para-callgraph.stp 'kernel.function("*@fs/*.c")' 'kernel.function("sys_read")'</code>:
41 </div><div class="example"><a id="paracallgraphoutput"></a><p class="title"><strong>Example 5.14. <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] 42 </div><div class="example"><a id="paracallgraphoutput">
43 ⁠</a><p class="title"><strong>Example 5.14. <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...]
42 267 gnome-terminal(2921): &lt;-do_sync_read return=0xfffffffffffffff5 44 267 gnome-terminal(2921): &lt;-do_sync_read return=0xfffffffffffffff5
43 269 gnome-terminal(2921):&lt;-vfs_read return=0xfffffffffffffff5 45 269 gnome-terminal(2921):&lt;-vfs_read return=0xfffffffffffffff5
44 0 gnome-terminal(2921):-&gt;fput file=0xffff880111eebbc0 46 0 gnome-terminal(2921):-&gt;fput file=0xffff880111eebbc0
@@ -51,4 +53,4 @@ probe $1.return { trace(-1, $$return) }
51 12 gnome-terminal(2921): -&gt;do_sync_read filp=0xffff8801116ce980 buf=0xc86504 len=0x1000 ppos=0xffff88010544df48 53 12 gnome-terminal(2921): -&gt;do_sync_read filp=0xffff8801116ce980 buf=0xc86504 len=0x1000 ppos=0xffff88010544df48
52 15 gnome-terminal(2921): &lt;-do_sync_read return=0xfffffffffffffff5 54 15 gnome-terminal(2921): &lt;-do_sync_read return=0xfffffffffffffff5
53 18 gnome-terminal(2921):&lt;-vfs_read return=0xfffffffffffffff5 55 18 gnome-terminal(2921):&lt;-vfs_read return=0xfffffffffffffff5
54 0 gnome-terminal(2921):-&gt;fput file=0xffff8801116ce980</pre></div></div><br class="example-break" /></div><ul class="docnav"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong>5.3. Profiling</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong>5.3.3. Determining Time Spent in Kernel and User ...</a></li></ul></body></html> \ No newline at end of file 56 0 gnome-terminal(2921):-&gt;fput file=0xffff8801116ce980</pre></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong>5.3. Profiling</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong>5.3.3. Determining Time Spent in Kernel and User ...</a></li></ul></body></html> \ No newline at end of file