blob: d3e7286175e1ba2ca1f08539f0733e6717c2fbdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SystemTap: probes/where_func/ Directory Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">probes</a> / <a class="el" href="dir_000004.html">where_func</a></div>
<h1>where_func Directory Reference</h1>This is a silly little instrumentation routine to instrument functions entry by name.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><b>kprobe_where_funct.c</b> <a href="kprobe__where__funct_8c-source.html">[code]</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><b>kprobe_where_funct.mod.c</b> <a href="kprobe__where__funct_8mod_8c-source.html">[code]</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><b>README</b> <a href="probes_2where__func_2README-source.html">[code]</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is a silly little instrumentation routine to instrument functions entry by name.
<p>
It makes use of the SystemTap runtime libraries to break down the number of times the function by caller.<p>
It demonstrates kprobes, passing a module parameter, using the print buffer, and using _stp_print_symbol() to map the addresses back to locations in functions.<p>
By default it instruments schedule().<p>
The instrumentation module is built by having the kernel that is going to be instrumented currently on the machine and doing <div class="fragment"><pre class="fragment">./build
</pre></div> The instrumentation is inserted as root with: <div class="fragment"><pre class="fragment">/sbin/insmod kprobe_funct_where.ko funct_name=function_name
</pre></div> The instrumentation is removed as root with: <div class="fragment"><pre class="fragment">/sbin/rmmod kprobe_funct_where
</pre></div> -Will Cohen </body></html>
|