summaryrefslogtreecommitdiffstats
path: root/runtime/docs/html/io_8c.html
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/docs/html/io_8c.html')
-rw-r--r--runtime/docs/html/io_8c.html146
1 files changed, 99 insertions, 47 deletions
diff --git a/runtime/docs/html/io_8c.html b/runtime/docs/html/io_8c.html
index 85784820..ca8818d3 100644
--- a/runtime/docs/html/io_8c.html
+++ b/runtime/docs/html/io_8c.html
@@ -1,17 +1,19 @@
<!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>
+<title>SystemTap: io.c File Reference</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>io.c File Reference</h1>
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<h1>io.c File Reference</h1>I/O functions. <a href="#_details">More...</a>
+<p>
+
<p>
<a href="io_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a0">STP_BUF_LEN</a>&nbsp;&nbsp;&nbsp;8191</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="io.c::STP_BUF_LEN"></a>
+#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>STP_BUF_LEN</b>&nbsp;&nbsp;&nbsp;8191</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a4">dlog</a> (const char *fmt,...)</td></tr>
@@ -19,42 +21,34 @@
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Logs data. <a href="#a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a5">_stp_print_buf</a> (const char *fmt,...)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print into the print buffer. <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a6">_stp_print_buf_init</a> (void)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear the print buffer. <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a7">_stp_print_symbol</a> (const char *fmt, unsigned long address)</td></tr>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print addresses symbolically into the print buffer. <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a8">cur_ret_addr</a> (struct pt_regs *regs)</td></tr>
-</table>
-<hr><h2>Define Documentation</h2>
-<a class="anchor" name="a0" doxytag="io.c::STP_BUF_LEN"></a><p>
-<table class="mdTable" cellpadding="2" cellspacing="0">
- <tr>
- <td class="mdRow">
- <table cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="md" nowrap valign="top">#define STP_BUF_LEN&nbsp;&nbsp;&nbsp;8191 </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-<table cellspacing="5" cellpadding="0" border="0">
- <tr>
- <td>
- &nbsp;
- </td>
- <td>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the current return address. <a href="#a8"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static const char *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a1">_stp_kallsyms_lookup</a> )(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf) = (void *)KALLSYMS_LOOKUP</td></tr>
-<p>
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lookup symbol. <a href="#a1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="io.c::_stp_pbuf"></a>
+static char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="io_8c.html#a2">_stp_pbuf</a> [8191+1]</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Static buffer for printing. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="io.c::_stp_pbuf_len"></a>
+static int&nbsp;</td><td class="memItemRight" valign="bottom"><b>_stp_pbuf_len</b> = 8191</td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+I/O functions.
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00027">27</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+
<p>
-Referenced by <a class="el" href="io_8c-source.html#l00033">_stp_print_buf()</a>, and <a class="el" href="io_8c-source.html#l00045">_stp_print_buf_init()</a>. </td>
- </tr>
-</table>
-<hr><h2>Function Documentation</h2>
+Definition in file <a class="el" href="io_8c-source.html">io.c</a>.<hr><h2>Function Documentation</h2>
<a class="anchor" name="a5" doxytag="io.c::_stp_print_buf"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
@@ -89,13 +83,23 @@ Referenced by <a class="el" href="io_8c-source.html#l00033">_stp_print_buf()</a>
<td>
<p>
+Print into the print buffer.
+<p>
+Like printf, except output goes into _stp_pbuf, which will contain the null-terminated output. Safe because overflowing _stp_pbuf is not allowed. Size is limited by length of print buffer.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>A variable number of args. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Formatting output should never be done within a probe. Use at module exit time. </dd></dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="io_8c.html#a6">_stp_print_buf_init</a> </dd></dl>
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00033">33</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+Definition at line <a class="el" href="io_8c-source.html#l00055">55</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
<p>
-References <a class="el" href="io_8c-source.html#l00027">STP_BUF_LEN</a>.
+References <a class="el" href="io_8c-source.html#l00040">_stp_pbuf</a>.
<p>
-Referenced by <a class="el" href="io_8c-source.html#l00051">_stp_print_symbol()</a>. </td>
+Referenced by <a class="el" href="io_8c-source.html#l00085">_stp_print_symbol()</a>. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="io.c::_stp_print_buf_init"></a><p>
@@ -123,11 +127,13 @@ Referenced by <a class="el" href="io_8c-source.html#l00051">_stp_print_symbol()<
<td>
<p>
-
+Clear the print buffer.
+<p>
+Output from <a class="el" href="io_8c.html#a5">_stp_print_buf()</a> will accumulate in the buffer until this is called.
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00045">45</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+Definition at line <a class="el" href="io_8c-source.html#l00072">72</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
<p>
-References <a class="el" href="io_8c-source.html#l00027">STP_BUF_LEN</a>. </td>
+References <a class="el" href="io_8c-source.html#l00040">_stp_pbuf</a>. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="io.c::_stp_print_symbol"></a><p>
@@ -164,11 +170,20 @@ References <a class="el" href="io_8c-source.html#l00027">STP_BUF_LEN</a>. </t
<td>
<p>
+Print addresses symbolically into the print buffer.
+<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>A variable number of args. </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>address</em>&nbsp;</td><td>The address to lookup. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Note:</b></dt><dd>Formatting output should never be done within a probe. Use at module exit time. </dd></dl>
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00051">51</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+Definition at line <a class="el" href="io_8c-source.html#l00085">85</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
<p>
-References <a class="el" href="io_8c-source.html#l00033">_stp_print_buf()</a>. </td>
+References <a class="el" href="io_8c-source.html#l00031">_stp_kallsyms_lookup</a>, and <a class="el" href="io_8c-source.html#l00055">_stp_print_buf()</a>. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="io.c::cur_ret_addr"></a><p>
@@ -196,9 +211,18 @@ References <a class="el" href="io_8c-source.html#l00033">_stp_print_buf()</a>.
<td>
<p>
+Get the current return address.
+<p>
+Call from kprobes (not jprobes). <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>regs</em>&nbsp;</td><td>The pt_regs saved by the kprobe. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>The return address saved in esp or rsp. </dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>i386 and x86_64 only. </dd></dl>
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00072">72</a> of file <a class="el" href="io_8c-source.html">io.c</a>. </td>
+Definition at line <a class="el" href="io_8c-source.html#l00112">112</a> of file <a class="el" href="io_8c-source.html">io.c</a>. </td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="io.c::dlog"></a><p>
@@ -245,16 +269,44 @@ This function is compatible with printk. In fact it currently sends all output t
</dl>
<dl compact><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>Lines are limited in length by printk buffer.</dd></dl>
<p>
-<dl compact><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Needs replaced with something much faster that does not use the system log. </dd></dl>
+<dl compact><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Needs replaced with something much faster that does not use the system log. </dd></dl>
<p>
-Definition at line <a class="el" href="io_8c-source.html#l00011">11</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+Definition at line <a class="el" href="io_8c-source.html#l00016">16</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
+<p>
+Referenced by <a class="el" href="map_8c-source.html#l00794">_stp_list_clear()</a>, <a class="el" href="probes_8c-source.html#l00032">_stp_register_jprobes()</a>, <a class="el" href="probes_8c-source.html#l00077">_stp_register_kprobes()</a>, <a class="el" href="probes_8c-source.html#l00018">_stp_unregister_jprobes()</a>, and <a class="el" href="probes_8c-source.html#l00063">_stp_unregister_kprobes()</a>. </td>
+ </tr>
+</table>
+<hr><h2>Variable Documentation</h2>
+<a class="anchor" name="a1" doxytag="io.c::_stp_kallsyms_lookup"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">const char*(* <a class="el" href="io_8c.html#a1">_stp_kallsyms_lookup</a>)(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf) = (void *)KALLSYMS_LOOKUP<code> [static]</code> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Lookup symbol.
+<p>
+This simply calls the kernel function kallsyms_lookup(). That function is not exported, so this workaround is required. See the kernel source, kernel/kallsyms.c for more information.
+<p>
+Definition at line <a class="el" href="io_8c-source.html#l00031">31</a> of file <a class="el" href="io_8c-source.html">io.c</a>.
<p>
-Referenced by <a class="el" href="map_8c-source.html#l00788">_stp_list_clear()</a>, <a class="el" href="probes_8c-source.html#l00022">_stp_register_jprobes()</a>, <a class="el" href="probes_8c-source.html#l00056">_stp_register_kprobes()</a>, <a class="el" href="probes_8c-source.html#l00014">_stp_unregister_jprobes()</a>, and <a class="el" href="probes_8c-source.html#l00048">_stp_unregister_kprobes()</a>. </td>
+Referenced by <a class="el" href="io_8c-source.html#l00085">_stp_print_symbol()</a>. </td>
</tr>
</table>
-<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>
+<hr size="1"><address style="align: right;"><small>
+Generated on Tue Mar 22 10:27:36 2005 for SystemTap.</small></body>
</html>