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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<!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: Scratch Buffer</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>
<h1>Scratch Buffer</h1>Scratch Buffer Functions.
<a href="#_details">More...</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"><a class="anchor" name="ga6" doxytag="scbuf::STP_BUF_LEN"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__scbuf.html#ga6">STP_BUF_LEN</a> 8191</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum size of buffer, not including terminating NULL. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__scbuf.html#ga2">_stp_sprint</a> (const char *fmt,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sprint into the scratch buffer. <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga3" doxytag="scbuf::_stp_sprint_str"></a>
void </td><td class="memItemRight" valign="bottom"><b>_stp_sprint_str</b> (const char *str)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__scbuf.html#ga4">_stp_scbuf_clear</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the scratch buffer. <a href="#ga4"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga0" doxytag="scbuf::_stp_scbuf"></a>
char </td><td class="memItemRight" valign="bottom"><a class="el" href="group__scbuf.html#ga0">_stp_scbuf</a> [8191+1]</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Scratch buffer for printing, building strings, etc. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Scratch Buffer Functions.
<p>
The scratch buffer is for collecting output before storing in a map, printing, etc. This is a per-cpu static buffer. It is necessary because of the limited stack space available in the kernel. <hr><h2>Function Documentation</h2>
<a class="anchor" name="ga4" doxytag="scbuf.c::_stp_scbuf_clear"></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">void _stp_scbuf_clear </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Clear the scratch buffer.
<p>
Output from <a class="el" href="group__scbuf.html#ga2">_stp_sprint()</a> will accumulate in the buffer until this is called.
<p>
Definition at line <a class="el" href="scbuf_8c-source.html#l00059">59</a> of file <a class="el" href="scbuf_8c-source.html">scbuf.c</a>.
<p>
References <a class="el" href="scbuf_8c-source.html#l00018">_stp_scbuf</a>, and <a class="el" href="scbuf_8c-source.html#l00015">STP_BUF_LEN</a>. </td>
</tr>
</table>
<a class="anchor" name="ga2" doxytag="scbuf.c::_stp_sprint"></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">void _stp_sprint </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const char * </td>
<td class="mdname" nowrap> <em>fmt</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap> </td>
<td class="mdname" nowrap> <em>...</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Sprint into the scratch buffer.
<p>
Like printf, except output goes into <a class="el" href="group__scbuf.html#ga0">_stp_scbuf</a>, which will contain the null-terminated output. Safe because overflowing <a class="el" href="group__scbuf.html#ga0">_stp_scbuf</a> is not allowed. Size is limited by length of scratch buffer, STP_BUF_LEN.<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> </td><td>A printf-style format string followed by a variable number of args. </td></tr>
</table>
</dl>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__scbuf.html#ga4">_stp_scbuf_clear</a> </dd></dl>
<p>
Definition at line <a class="el" href="scbuf_8c-source.html#l00032">32</a> of file <a class="el" href="scbuf_8c-source.html">scbuf.c</a>.
<p>
References <a class="el" href="scbuf_8c-source.html#l00018">_stp_scbuf</a>, and <a class="el" href="scbuf_8c-source.html#l00015">STP_BUF_LEN</a>.
<p>
Referenced by <a class="el" href="sym_8c-source.html#l00045">_stp_symbol_sprint()</a>. </td>
</tr>
</table>
</body></html>
|