diff options
Diffstat (limited to 'runtime/docs/html/stp__tasklet_8c-source.html')
-rw-r--r-- | runtime/docs/html/stp__tasklet_8c-source.html | 89 |
1 files changed, 50 insertions, 39 deletions
diff --git a/runtime/docs/html/stp__tasklet_8c-source.html b/runtime/docs/html/stp__tasklet_8c-source.html index 1156b265..16fdfdf7 100644 --- a/runtime/docs/html/stp__tasklet_8c-source.html +++ b/runtime/docs/html/stp__tasklet_8c-source.html @@ -4,7 +4,7 @@ <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="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</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_000002.html">tasklet</a></div> <h1>stp_tasklet.c</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">/* Framework for putting a jprobe in a tasklet. */</span> @@ -15,44 +15,55 @@ 00006 <span class="preprocessor"></span><span class="preprocessor">#define HASH_TABLE_SIZE (1<<HASH_TABLE_BITS)</span> 00007 <span class="preprocessor"></span><span class="preprocessor">#define BUCKETS 16 </span><span class="comment">/* largest histogram width */</span> 00008 -00009 <span class="preprocessor">#include "<a class="code" href="runtime_8h.html">runtime.h</a>"</span> -00010 <span class="preprocessor">#include "<a class="code" href="io_8c.html">io.c</a>"</span> -00011 <span class="preprocessor">#include "<a class="code" href="probes_8c.html">probes.c</a>"</span> -00012 -00013 MODULE_DESCRIPTION(<span class="stringliteral">"test jprobes of tasklets"</span>); -00014 MODULE_AUTHOR(<span class="stringliteral">"Martin Hunt <hunt@redhat.com>"</span>); -00015 -00016 <span class="keywordtype">void</span> inst__rcu_process_callbacks(<span class="keyword">struct</span> rcu_ctrlblk *rcp, -00017 <span class="keyword">struct</span> rcu_state *rsp, <span class="keyword">struct</span> rcu_data *rdp) -00018 { -00019 <a class="code" href="group__io.html#ga0">dlog</a> (<span class="stringliteral">"interrupt=%d\n"</span>, in_interrupt()); -00020 jprobe_return(); -00021 } -00022 -00023 <span class="keyword">static</span> <span class="keyword">struct </span>jprobe stp_probes[] = { -00024 { -00025 .kp.addr = (kprobe_opcode_t *)<span class="stringliteral">"__rcu_process_callbacks"</span>, -00026 .entry = (kprobe_opcode_t *) inst__rcu_process_callbacks -00027 }, -00028 }; -00029 <span class="preprocessor">#define MAX_STP_PROBES (sizeof(stp_probes)/sizeof(struct jprobe))</span> -00030 <span class="preprocessor"></span> -00031 -00032 <span class="keyword">static</span> <span class="keywordtype">int</span> init_stp(<span class="keywordtype">void</span>) -00033 { -00034 <span class="keywordtype">int</span> ret = <a class="code" href="probes_8c.html#a2">_stp_register_jprobes</a> (stp_probes, MAX_STP_PROBES); -00035 <a class="code" href="group__io.html#ga0">dlog</a>(<span class="stringliteral">"instrumentation is enabled...\n"</span>); -00036 <span class="keywordflow">return</span> ret; -00037 } -00038 -00039 <span class="keyword">static</span> <span class="keywordtype">void</span> cleanup_stp(<span class="keywordtype">void</span>) -00040 { -00041 <a class="code" href="probes_8c.html#a1">_stp_unregister_jprobes</a> (stp_probes, MAX_STP_PROBES); -00042 <a class="code" href="group__io.html#ga0">dlog</a> (<span class="stringliteral">"EXIT\n"</span>); +00009 <span class="preprocessor">#define STP_NETLINK_ONLY</span> +00010 <span class="preprocessor"></span><span class="preprocessor">#define STP_NUM_STRINGS 1</span> +00011 <span class="preprocessor"></span> +00012 <span class="preprocessor">#include "<a class="code" href="runtime_8h.html">runtime.h</a>"</span> +00013 <span class="preprocessor">#include "<a class="code" href="probes_8c.html">probes.c</a>"</span> +00014 +00015 MODULE_DESCRIPTION(<span class="stringliteral">"test jprobes of tasklets"</span>); +00016 MODULE_AUTHOR(<span class="stringliteral">"Martin Hunt <hunt@redhat.com>"</span>); +00017 +00018 <span class="keywordtype">void</span> inst__rcu_process_callbacks(<span class="keyword">struct</span> rcu_ctrlblk *rcp, +00019 <span class="keyword">struct</span> rcu_state *rsp, <span class="keyword">struct</span> rcu_data *rdp) +00020 { +00021 <a class="code" href="group__io.html#ga2">_stp_log</a> (<span class="stringliteral">"interrupt=%d\n"</span>, in_interrupt()); +00022 jprobe_return(); +00023 } +00024 +00025 <span class="keyword">static</span> <span class="keyword">struct </span>jprobe stp_probes[] = { +00026 { +00027 .kp.addr = (kprobe_opcode_t *)<span class="stringliteral">"__rcu_process_callbacks"</span>, +00028 .entry = (kprobe_opcode_t *) inst__rcu_process_callbacks +00029 }, +00030 }; +00031 <span class="preprocessor">#define MAX_STP_PROBES (sizeof(stp_probes)/sizeof(struct jprobe))</span> +00032 <span class="preprocessor"></span> +00033 +00034 <span class="keyword">static</span> <span class="keywordtype">int</span> init_stp(<span class="keywordtype">void</span>) +00035 { +00036 <span class="keywordtype">int</span> ret; +00037 +00038 <span class="keywordflow">if</span> (<a class="code" href="group__io.html#ga7">_stp_netlink_open</a>() < 0) +00039 return -1; +00040 ret = _stp_register_jprobes (stp_probes, MAX_STP_PROBES); +00041 _stp_log ("instrumentation is enabled...\n"); +00042 return ret; 00043 } 00044 -00045 module_init(init_stp); -00046 module_exit(cleanup_stp); -00047 MODULE_LICENSE(<span class="stringliteral">"GPL"</span>); -00048 +00045 static <span class="keywordtype">void</span> probe_exit (<span class="keywordtype">void</span>) +00046 { +00047 <a class="code" href="probes_8c.html#a2">_stp_unregister_jprobes</a> (stp_probes, MAX_STP_PROBES); +00048 <a class="code" href="group__io.html#ga2">_stp_log</a> (<span class="stringliteral">"EXIT\n"</span>); +00049 +00050 } +00051 <span class="keyword">static</span> <span class="keywordtype">void</span> cleanup_stp(<span class="keywordtype">void</span>) +00052 { +00053 <a class="code" href="group__io.html#ga8">_stp_netlink_close</a>(); +00054 } +00055 +00056 module_init(init_stp); +00057 module_exit(cleanup_stp); +00058 MODULE_LICENSE(<span class="stringliteral">"GPL"</span>); +00059 </pre></div></body></html> |