summaryrefslogtreecommitdiffstats
path: root/runtime/docs/html/probes_8c-source.html
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/docs/html/probes_8c-source.html')
-rw-r--r--runtime/docs/html/probes_8c-source.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/runtime/docs/html/probes_8c-source.html b/runtime/docs/html/probes_8c-source.html
new file mode 100644
index 00000000..58c3fa98
--- /dev/null
+++ b/runtime/docs/html/probes_8c-source.html
@@ -0,0 +1,85 @@
+<!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: SystemTap Runtime Library</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<div class="qindex"><a class="qindex" href="index.html">Intro</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_defs.html">Defines</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration Values</a></div>
+
+<!-- Generated by Doxygen 1.4.1 -->
+<h1>probes.c</h1><a href="probes_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/* -*- linux-c -*- */</span>
+00002
+00012 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> long (*_stp_lookup_name)(<span class="keywordtype">char</span> *name)=(<span class="keywordtype">void</span> *)KALLSYMS_LOOKUP_NAME;
+00013
+<a name="l00014"></a><a class="code" href="probes_8c.html#a1">00014</a> <span class="keywordtype">void</span> <a class="code" href="probes_8c.html#a1">_stp_unregister_jprobes</a> (<span class="keyword">struct</span> jprobe *probes, <span class="keywordtype">int</span> num_probes)
+00015 {
+00016 <span class="keywordtype">int</span> i;
+00017 <span class="keywordflow">for</span> (i = 0; i &lt; num_probes; i++)
+00018 unregister_jprobe(&amp;probes[i]);
+00019 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"All jprobes removed\n"</span>);
+00020 }
+00021
+<a name="l00022"></a><a class="code" href="probes_8c.html#a2">00022</a> <span class="keywordtype">int</span> <a class="code" href="probes_8c.html#a2">_stp_register_jprobes</a> (<span class="keyword">struct</span> jprobe *probes, <span class="keywordtype">int</span> num_probes)
+00023 {
+00024 <span class="keywordtype">int</span> i, ret ;
+00025 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> addr;
+00026
+00027 <span class="keywordflow">for</span> (i = 0; i &lt; num_probes; i++) {
+00028 addr =_stp_lookup_name((<span class="keywordtype">char</span> *)probes[i].kp.addr);
+00029 <span class="keywordflow">if</span> (addr == 0) {
+00030 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"ERROR: function %s not found!\n"</span>,
+00031 (<span class="keywordtype">char</span> *)probes[i].kp.addr);
+00032 ret = -1; <span class="comment">/* FIXME */</span>
+00033 <span class="keywordflow">goto</span> out;
+00034 }
+00035 <a class="code" href="io_8c.html#a4">dlog</a>(<span class="stringliteral">"inserting jprobe at %s (%p)\n"</span>, probes[i].kp.addr, addr);
+00036 probes[i].kp.addr = (kprobe_opcode_t *)addr;
+00037 ret = register_jprobe(&amp;probes[i]);
+00038 <span class="keywordflow">if</span> (ret)
+00039 <span class="keywordflow">goto</span> out;
+00040 }
+00041 <span class="keywordflow">return</span> 0;
+00042 out:
+00043 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"probe module initialization failed. Exiting...\n"</span>);
+00044 <a class="code" href="probes_8c.html#a1">_stp_unregister_jprobes</a>(probes, i);
+00045 <span class="keywordflow">return</span> ret;
+00046 }
+00047
+<a name="l00048"></a><a class="code" href="probes_8c.html#a3">00048</a> <span class="keywordtype">void</span> <a class="code" href="probes_8c.html#a3">_stp_unregister_kprobes</a> (<span class="keyword">struct</span> kprobe *probes, <span class="keywordtype">int</span> num_probes)
+00049 {
+00050 <span class="keywordtype">int</span> i;
+00051 <span class="keywordflow">for</span> (i = 0; i &lt; num_probes; i++)
+00052 unregister_kprobe(&amp;probes[i]);
+00053 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"All kprobes removed\n"</span>);
+00054 }
+00055
+<a name="l00056"></a><a class="code" href="probes_8c.html#a4">00056</a> <span class="keywordtype">int</span> <a class="code" href="probes_8c.html#a4">_stp_register_kprobes</a> (<span class="keyword">struct</span> kprobe *probes, <span class="keywordtype">int</span> num_probes)
+00057 {
+00058 <span class="keywordtype">int</span> i, ret ;
+00059 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> addr;
+00060
+00061 <span class="keywordflow">for</span> (i = 0; i &lt; num_probes; i++) {
+00062 addr =_stp_lookup_name((<span class="keywordtype">char</span> *)probes[i].addr);
+00063 <span class="keywordflow">if</span> (addr == 0) {
+00064 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"ERROR: function %s not found!\n"</span>,
+00065 (<span class="keywordtype">char</span> *)probes[i].addr);
+00066 ret = -1; <span class="comment">/* FIXME */</span>
+00067 <span class="keywordflow">goto</span> out;
+00068 }
+00069 <a class="code" href="io_8c.html#a4">dlog</a>(<span class="stringliteral">"inserting kprobe at %s (%p)\n"</span>, probes[i].addr, addr);
+00070 probes[i].addr = (kprobe_opcode_t *)addr;
+00071 ret = register_kprobe(&amp;probes[i]);
+00072 <span class="keywordflow">if</span> (ret)
+00073 <span class="keywordflow">goto</span> out;
+00074 }
+00075 <span class="keywordflow">return</span> 0;
+00076 out:
+00077 <a class="code" href="io_8c.html#a4">dlog</a> (<span class="stringliteral">"probe module initialization failed. Exiting...\n"</span>);
+00078 <a class="code" href="probes_8c.html#a3">_stp_unregister_kprobes</a>(probes, i);
+00079 <span class="keywordflow">return</span> ret;
+00080 }
+00081
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Mar 21 13:29:45 2005 for SystemTap by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
+</body>
+</html>