summaryrefslogtreecommitdiffstats
path: root/SystemTap_Beginners_Guide/mainsect-profiling.html
diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/mainsect-profiling.html')
-rw-r--r--SystemTap_Beginners_Guide/mainsect-profiling.html15
1 files changed, 7 insertions, 8 deletions
diff --git a/SystemTap_Beginners_Guide/mainsect-profiling.html b/SystemTap_Beginners_Guide/mainsect-profiling.html
index 79cf5e72..9d7dc815 100644
--- a/SystemTap_Beginners_Guide/mainsect-profiling.html
+++ b/SystemTap_Beginners_Guide/mainsect-profiling.html
@@ -1,10 +1,9 @@
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"> 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. Profiling</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="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /><link rel="prev" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /><link rel="next" href="paracallgraph.html" title="5.3.2. Call Graph Tracing" /></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="ioblktimesect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="paracallgraph.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="mainsect-profiling"></a>5.3. Profiling</h2></div></div></div><div class="para">
3<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>5.3. Profiling</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 name="generator" content="publican 2.8" /><meta name="package" content="Systemtap-SystemTap_Beginners_Guide-2.2-en-US-2.2-2" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /><link rel="prev" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /><link rel="next" href="paracallgraph.html" title="5.3.2. Call Graph Tracing" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="https://fedorahosted.org/publican"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="ioblktimesect.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="paracallgraph.html"><strong>Next</strong></a></li></ul><div class="section" id="mainsect-profiling"><div class="titlepage"><div><div><h2 class="title" id="mainsect-profiling">5.3. Profiling</h2></div></div></div><div class="para">
4 The following sections showcase scripts that profile kernel activity by monitoring function calls. 3 The following sections showcase scripts that profile kernel activity by monitoring function calls.
5 </div><div xml:lang="en-US" class="section" id="countcallssect" lang="en-US"><div class="titlepage"><div><div><h3 class="title" id="countcallssect">5.3.1. Counting Function Calls Made</h3></div></div></div><a id="idp27256512" class="indexterm"></a><a id="idp15269888" class="indexterm"></a><a id="idp32452944" class="indexterm"></a><a id="idp56780544" class="indexterm"></a><a id="idp50542592" class="indexterm"></a><div class="para"> 4 </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="countcallssect"></a>5.3.1. Counting Function Calls Made</h3></div></div></div><a id="idm246928792224" class="indexterm"></a><a id="idm246926783616" class="indexterm"></a><a id="idm246929560080" class="indexterm"></a><a id="idm246883103504" class="indexterm"></a><a id="idm246928487280" class="indexterm"></a><div class="para">
6 This section describes how to identify how many times the system called a specific kernel function in a 30-second sample. Depending on your use of wildcards, you can also use this script to target multiple kernel functions. 5 This section describes how to identify how many times the system called a specific kernel function in a 30-second sample. Depending on the use of wildcards, you can also use this script to target multiple kernel functions.
7 </div><div class="formalpara" id="countcalls"><h5 class="formalpara">functioncallcount.stp</h5> 6 </div><div class="formalpara"><div xmlns:d="http://docbook.org/ns/docbook" class="title">functioncallcount.stp</div>
8 7
9<pre class="programlisting">#! /usr/bin/env stap 8<pre class="programlisting">#! /usr/bin/env stap
10# The following line command will probe all the functions 9# The following line command will probe all the functions
@@ -27,9 +26,9 @@ probe end {
27</pre> 26</pre>
28 </div><div class="para"> 27 </div><div class="para">
29 <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> takes the targeted kernel function as an argument. The argument supports wildcards, which enables you to target multiple kernel functions up to a certain extent. 28 <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> takes the targeted kernel function as an argument. The argument supports wildcards, which enables you to target multiple kernel functions up to a certain extent.
30 </div><a id="idm2435968" class="indexterm"></a><a id="idp45873792" class="indexterm"></a><a id="idm3930928" class="indexterm"></a><div class="para"> 29 </div><a id="idm246926560512" class="indexterm"></a><a id="idm246927329984" class="indexterm"></a><a id="idm246917042560" class="indexterm"></a><div class="para">
31 The output of <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> contains the name of the function called and how many times it was called during the sample time (in alphabetical order). <a class="xref" href="mainsect-profiling.html#countcallsoutput">Example 5.13, “functioncallcount.stp Sample Output”</a> contains an excerpt from the output of <code class="command">stap functioncallcount.stp "*@mm/*.c"</code>: 30 The output of <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> contains the name of the function called and how many times it was called during the sample time (in alphabetical order). <a class="xref" href="mainsect-profiling.html#countcallsoutput">Example 5.13, “functioncallcount.stp Sample Output”</a> contains an excerpt from the output of <code class="command">stap functioncallcount.stp "*@mm/*.c"</code>:
32 </div><div class="example" id="countcallsoutput"><h6>Example 5.13. <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> Sample Output</h6><div class="example-contents"><pre class="screen">[...] 31 </div><div class="example"><a id="countcallsoutput"></a><p class="title"><strong>Example 5.13. <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...]
33__vma_link 97 32__vma_link 97
34__vma_link_file 66 33__vma_link_file 66
35__vma_link_list 97 34__vma_link_list 97
@@ -56,4 +55,4 @@ atomic_add_negative 97
56atomic_dec_and_test 5153 55atomic_dec_and_test 5153
57atomic_inc 470 56atomic_inc 470
58atomic_inc_and_test 1 57atomic_inc_and_test 1
59[...]</pre></div></div><br class="example-break" /></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="ioblktimesect.html"><strong>Prev</strong>5.2.7. Periodically Print I/O Block Time</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="paracallgraph.html"><strong>Next</strong>5.3.2. Call Graph Tracing</a></li></ul></body></html> 58[...]</pre></div></div><br class="example-break" /></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="ioblktimesect.html"><strong>Prev</strong>5.2.7. Periodically Print I/O Block Time</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="paracallgraph.html"><strong>Next</strong>5.3.2. Call Graph Tracing</a></li></ul></body></html> \ No newline at end of file