Debian Codegraph @

tapset/stap_staticmarkers.stp

raw
1 // stap/staprun/stapio static probes tapset
2 //
3 // Copyright (C) 2009 Red Hat Inc.
4 //
5 // This file is part of systemtap, and is free software. You can
6 // redistribute it and/or modify it under the terms of the GNU General
7 // Public License (GPL); either version 2, or (at your option) any
8 // later version.
9
10 /**
11 * probe stap.pass0 - Starting stap pass0 (parsing command line arguments)
12 *
13 * @session: the systemtap_session variable s
14 *
15 * pass0 fires after command line arguments have been parsed.
16 */
17 probe stap.pass0 = process("stap").mark("pass0__start") {
18 session = $arg1
19 }
20
21 /**
22 * probe stap.pass0.end - Finished stap pass0 (parsing command line arguments)
23 * @session: the systemtap_session variable s
24 *
25 * pass0.end fires just before the gettimeofday() call for pass1.
26 */
27 probe stap.pass0.end = process("stap").mark("pass0__end") {
28 session = $arg1
29 }
30
31 /**
32 * probe stap.pass1a - Starting stap pass1 (parsing user script)
33 * @session: the systemtap_session variable s
34 *
35 * pass1a fires just after the call to gettimeofday(), before the
36 * user script is parsed.
37 */
38 probe stap.pass1a = process("stap").mark("pass1a__start") {
39 session = $arg1
40 }
41
42 /**
43 * probe stap.pass1b - Starting stap pass1 (parsing library scripts)
44 * @session: the systemtap_session variable s
45 *
46 * pass1b fires just before the library scripts are parsed.
47 */
48 probe stap.pass1b = process("stap").mark("pass1b__start") {
49 session = $arg1
50 }
51
52 /**
53 * probe stap.pass1.end - Finished stap pass1 (parsing scripts)
54 * @session: the systemtap_session variable s
55 *
56 * pass1.end fires just before the jump to cleanup if s.last_pass = 1.
57 */
58 probe stap.pass1.end = process("stap").mark("pass1__end") {
59 session = $arg1
60 }
61
62 /**
63 * probe stap.pass2 - Starting stap pass2 (elaboration)
64 * @session: the systemtap_session variable s
65 *
66 * pass2 fires just after the call to gettimeofday(), just before the
67 * call to semantic_pass.
68 */
69 probe stap.pass2 = process("stap").mark("pass2__start") {
70 session = $arg1
71 }
72
73 /**
74 * probe stap.pass2.end - Finished stap pass2 (elaboration)
75 * @session: the systemtap_session variable s
76 *
77 * pass2.end fires just before the jump to cleanup if s.last_pass = 2
78 */
79 probe stap.pass2.end = process("stap").mark("pass2__end") {
80 session = $arg1
81 }
82
83 /**
84 * probe stap.pass3 - Starting stap pass3 (translation to C)
85 * @session: the systemtap_session variable s
86 *
87 * pass3 fires just after the call to gettimeofday(), just before the
88 * call to translate_pass.
89 */
90 probe stap.pass3 = process("stap").mark("pass3__start") {
91 session = $arg1
92 }
93
94 /**
95 * probe stap.pass3.end - Finished stap pass3 (translation to C)
96 * @session: the systemtap_session variable s
97 *
98 * pass3.end fires just before the jump to cleanup if s.last_pass = 3
99 */
100 probe stap.pass3.end = process("stap").mark("pass3__end") {
101 session = $arg1
102 }
103
104 /**
105 * probe stap.pass4 - Starting stap pass4 (compile C code into kernel module)
106 * @session: the systemtap_session variable s
107 *
108 * pass4 fires just after the call to gettimeofday(), just before the
109 * call to compile_pass.
110 */
111 probe stap.pass4 = process("stap").mark("pass4__start") {
112 session = $arg1
113 }
114
115 /**
116 * probe stap.pass4.end - Finished stap pass4 (compile C code into kernel module)
117 * @session: the systemtap_session variable s
118 *
119 * pass4.end fires just before the jump to cleanup if s.last_pass = 4
120 */
121 probe stap.pass4.end = process("stap").mark("pass4__end") {
122 session = $arg1
123 }
124
125 /**
126 * probe stap.pass5 - Starting stap pass5 (running the instrumentation)
127 * @session: the systemtap_session variable s
128 *
129 * pass5 fires just after the call to gettimeofday(), just before the
130 * call to run_pass.
131 */
132 probe stap.pass5 = process("stap").mark("pass5__start") {
133 session = $arg1
134 }
135
136 /**
137 * probe stap.pass5.end - Finished stap pass5 (running the instrumentation)
138 * @session: the systemtap_session variable s
139 *
140 * pass5.end fires just before the cleanup label
141 */
142 probe stap.pass5.end = process("stap").mark("pass5__end") {
143 session = $arg1
144 }
145
146 /**
147 * probe stap.pass6 - Starting stap pass6 (cleanup)
148 * @session: the systemtap_session variable s
149 *
150 * pass6 fires just after the cleanup label, essentially the same spot
151 * as pass5.end
152 */
153 probe stap.pass6 = process("stap").mark("pass6__start") {
154 session = $arg1
155 }
156
157 /**
158 * probe stap.pass6.end - Finished stap pass6 (cleanup)
159 * @session: the systemtap_session variable s
160 *
161 * pass6.end fires just before main's return.
162 */
163 probe stap.pass6.end = process("stap").mark("pass6__end") {
164 session = $arg1
165 }
166
167 /**
168 * probe stap.cache_clean - Removing file from stap cache
169 * @path: the path to the .ko/.c file being removed
170 *
171 * Fires just before the call to unlink the module/source file.
172 */
173 probe stap.cache_clean = process("stap").mark("cache__clean") {
174 path = user_string_quoted($arg1)
175 }
176
177 /**
178 * probe stap.cache_add_mod - Adding kernel instrumentation module to cache
179 * @source_path: the path the .ko file is coming from (incl filename)
180 * @dest_path: the path the .ko file is going to (incl filename)
181 *
182 * Fires just before the file is actually moved. Note: if moving fails,
183 * cache_add_src and cache_add_nss will not fire.
184 */
185 probe stap.cache_add_mod = process("stap").mark("cache__add__module") {
186 source_path = user_string_quoted($arg1)
187 dest_path = user_string_quoted($arg2)
188 }
189
190 /**
191 * probe stap.cache_add_src - Adding C code translation to cache
192 * @source_path: the path the .c file is coming from (incl filename)
193 * @dest_path: the path the .c file is going to (incl filename)
194 *
195 * Fires just before the file is actually moved. Note: if moving the
196 * kernel module fails, this probe will not fire.
197 */
198 probe stap.cache_add_src = process("stap").mark("cache__add__source") {
199 source_path = user_string_quoted($arg1)
200 dest_path = user_string_quoted($arg2)
201 }
202
203 /**
204 * probe stap.cache_add_nss - Add NSS (Network Security Services) information to cache
205 * @source_path: the path the .sgn file is coming from (incl filename)
206 * @dest_path: the path the .sgn file is coming from (incl filename)
207 *
208 * Fires just before the file is actually moved. Note: stap must compiled
209 * with NSS support; if moving the kernel module fails, this probe will
210 * not fire.
211 */
212 probe stap.cache_add_nss = process("stap").mark("cache__add__nss") ? {
213 source_path = user_string_quoted($arg1)
214 dest_path = user_string_quoted($arg2)
215 }
216
217 /**
218 * probe stap.cache_get - Found item in stap cache
219 * @source_path: the path of the .c source file
220 * @module_path: the path of the .ko kernel module file
221 *
222 * Fires just before the return of get_from_cache, when the cache grab
223 * is successful.
224 */
225 probe stap.cache_get = process("stap").mark("cache__get") {
226 source_path = user_string_quoted($arg1)
227 module_path = user_string_quoted($arg2)
228 }
229
230 /**
231 * probe stap.system - Starting a command from stap
232 * @command: the command string to be run by posix_spawn (as sh -c <str>)
233 *
234 * Fires at the entry of the stap_system command.
235 */
236 probe stap.system = process("stap").mark("stap_system__start") {
237 command = user_string_quoted($arg1)
238 }
239
240 /**
241 * probe stap.system.spawn - stap spawned new process
242 * @ret: the return value from posix_spawn
243 * @pid: the pid of the spawned process
244 *
245 * Fires just after the call to posix_spawn.
246 */
247 probe stap.system.spawn = process("stap").mark("stap_system__spawn") {
248 /* posix_spawn(3p) for meaning of ret */
249 ret = $arg1
250 pid = $arg2
251 }
252
253 /**
254 * probe stap.system.return - Finished a command from stap
255 * @ret: a return code associated with running waitpid on the spawned process;
256 * a non-zero value indicates error
257 *
258 * Fires just before the return of the stap_system function, after waitpid.
259 */
260 probe stap.system.return = process("stap").mark("stap_system__complete") {
261 ret = $arg1
262 }
263
264 /**
265 * probe staprun.insert_module - Inserting SystemTap instrumentation module
266 * @path: the full path to the .ko kernel module about to be inserted
267 *
268 * Fires just before the call to insert the module.
269 */
270 probe staprun.insert_module = process("staprun").mark("insert__module") {
271 path = user_string_quoted($arg1)
272 }
273
274 /**
275 * probe staprun.remove_module - Removing SystemTap instrumentation module
276 * @name: the stap module name to be removed (without the .ko extension)
277 *
278 * Fires just before the call to remove the module.
279 */
280 probe staprun.remove_module = process("staprun").mark("remove__module") {
281 name = user_string_quoted($arg1)
282 }
283
284 /**
285 * probe staprun.send_control_message - Sending a control message
286 * @type: type of message being send; defined in runtime/transport/transport_msgs.h
287 * @data: a ptr to a binary blob of data sent as the control message
288 * @len: the length (in bytes) of the data blob
289 *
290 * Fires at the beginning of the send_request function.
291 */
292 probe staprun.send_control_message = process("staprun").mark("send__ctlmsg") {
293 type = $arg1
294 data = $arg2
295 len = $arg3
296 }
297
298 /**
299 * probe stapio.receive_control_message - Received a control message
300 * @type: type of message being send; defined in runtime/transport/transport_msgs.h
301 * @data: a ptr to a binary blob of data sent as the control message
302 * @len: the length (in bytes) of the data blob
303 *
304 * Fires just after a message was receieved and before it's processed.
305 */
306 /*
307 *** Due to stapio not being in a user's PATH and the build environment of ***
308 *** stap, there is no immediate 'good' way to insert the correct path here ***
309 *** so comment out this probe. Note however, the static marker is still ***
310 *** present in source. ***
311 probe stapio.receive_control_message = process("@libexecdir@/systemtap/stapio").mark("recv__ctlmsg") {
312 type = $arg1
313 data = $arg2
314 len = $arg3
315 }
316 */