blob: 1b03993da35fe5d0fc399a4fbfc8c5b63d937d08 (
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
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
|
<!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: README Source File</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>README</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/** @mainpage SystemTap Runtime Library</span>
00002 <span class="comment"> *</span>
00003 <span class="comment"> * @section intro_sec Introduction</span>
00004 <span class="comment"> *</span>
00005 <span class="comment"> * The SystemTap Runtime Library consists of all functions</span>
00006 <span class="comment"> * and code fragments needed by the compiler/translator to</span>
00007 <span class="comment"> * include in building a kernel module using kprobes.</span>
00008 <span class="comment"> *</span>
00009 <span class="comment"> * @section design_sec Design</span>
00010 <span class="comment"> * @subsection impl_sec Implementation</span>
00011 <span class="comment"> * The library is written in \c C and is really not a library but a collection of code</span>
00012 <span class="comment"> * That can be conditionally included in a modules. It will probably become a library later.</span>
00013 <span class="comment"> *</span>
00014 <span class="comment"> * @subsection map_sec Maps (Associative Arrays)</span>
00015 <span class="comment"> * Maps are implemented as hash lists. It is not expected that users will</span>
00016 <span class="comment"> * attempt to collect so much data in kernel space that performance problems will require</span>
00017 <span class="comment"> * more complex solutions such as AVL trees.</span>
00018 <span class="comment"> *</span>
00019 <span class="comment"> * Maps are created with _stp_map_new(). Each map can hold only one type of </span>
00020 <span class="comment"> * data; int64, string, or statistics. Each element belonging to a map can have up to 2 keys</span>
00021 <span class="comment"> * and a value. Implemented key types are strings and longs.</span>
00022 <span class="comment"> * </span>
00023 <span class="comment"> * To simplify the implementation, the functions to set the key and the functions to set the data are separated.</span>
00024 <span class="comment"> * That means we need only 4 functions to set the key and 3 functions to set the value. </span>
00025 <span class="comment"> *</span>
00026 <span class="comment"> * For example:</span>
00027 <span class="comment"> * @include map.c</span>
00028 <span class="comment"></span>
00029 <span class="comment"> * All elements have a default value of 0 (or NULL). Elements are only saved to the map when their value is set</span>
00030 <span class="comment"> * to something nonzero. This means that querying for the existance of a key is inexpensive because</span>
00031 <span class="comment"> * no element is created, just a hash table lookup.</span>
00032 <span class="comment"> *</span>
00033 <span class="comment"> * @subsection list_sec Lists</span>
00034 <span class="comment"> * A list is a special map which has internally ascending long integer keys. Adding a value to</span>
00035 <span class="comment"> * a list does not require setting a key first. Create a list with _stp_list_new(). Add to it</span>
00036 <span class="comment"> * with _stp_list_add_str() and _stp_list_add_int64(). Clear it with _stp_list_clear().</span>
00037 <span class="comment"> *</span>
00038 <span class="comment"> * @section status_sec Status</span>
00039 <span class="comment"> * @li Maps are implemented and tested. Histograms are not yet finished.</span>
00040 <span class="comment"> * @li Copy_From_User functions are done.</span>
00041 <span class="comment"> * @li If maps overflow or memory runs out for some reason, globals are set but nothing is done yet.</span>
00042 <span class="comment"> * I expect to implement a function to tell the system to either ignore it or unload the module and quit.</span>
00043 <span class="comment"> * @li Locking and per-cpu data are not yet implemented to be SMP-safe. This is not yet necessary because the</span>
00044 <span class="comment"> * current kprobes implementation single-threads probes for us. </span>
00045 <span class="comment"> *</span>
00046 <span class="comment"> * @section probe_sec Example Probes</span>
00047 <span class="comment"> * </span>
00048 <span class="comment"> * Working sample probe code using the runtime is in runtime/probes.</span>
00049 <span class="comment"> * <a href="dir_000000.html"> Browse probes.</a></span>
00050 <span class="comment"> * </span>
00051 <span class="comment"> * @section todo_sec ToDo </span>
00052 <span class="comment"> * \link todo Click Here for Complete List \endlink</span>
00053 <span class="comment"> *</span>
00054 <span class="comment"> * @section links Links</span>
00055 <span class="comment"> * <a href="http://sources.redhat.com/systemtap/">SystemTap Project Page</a></span>
00056 <span class="comment"> */</span>
</pre></div></body></html>
|