Debian Codegraph @

doc/SystemTap_Tapset_Reference/man_pages/tapset::context.3stap

raw
1 .\" -*- nroff -*-
2 .TH TAPSET::CONTEXT 3stap "October 2025" "SystemTap Tapset Reference"
3 .SH NAME
4 tapset::context \- systemtap context tapset
5
6 .SH DESCRIPTION
7
8 Context functions provide additional information about where an event occurred. These functions can
9 provide information such as a backtrace to where the event occurred and the current register values for the
10 processor.
11
12 .TP
13 .P
14 .TP
15 .B print_regs
16 Print a register dump
17 .IP
18 See
19 .IR function::print_regs (3stap)
20 for details.
21 .P
22 .TP
23 .B pp
24 Returns the active probe point
25 .IP
26 See
27 .IR function::pp (3stap)
28 for details.
29 .P
30 .TP
31 .B ppfunc
32 Returns the function name parsed from pp()
33 .IP
34 See
35 .IR function::ppfunc (3stap)
36 for details.
37 .P
38 .TP
39 .B probe_type
40 The low level probe handler type of the current probe.
41 .IP
42 See
43 .IR function::probe_type (3stap)
44 for details.
45 .P
46 .TP
47 .B execname
48 Returns the execname of a target process (or group of processes)
49 .IP
50 See
51 .IR function::execname (3stap)
52 for details.
53 .P
54 .TP
55 .B pexecname
56 Returns the execname of a target process's parent process
57 .IP
58 See
59 .IR function::pexecname (3stap)
60 for details.
61 .P
62 .TP
63 .B pid
64 Returns the ID of a target process
65 .IP
66 See
67 .IR function::pid (3stap)
68 for details.
69 .P
70 .TP
71 .B ns_pid
72 Returns the ID of a target process as seen in a pid namespace
73 .IP
74 See
75 .IR function::ns_pid (3stap)
76 for details.
77 .P
78 .TP
79 .B tid
80 Returns the thread ID of a target process
81 .IP
82 See
83 .IR function::tid (3stap)
84 for details.
85 .P
86 .TP
87 .B ns_tid
88 Returns the thread ID of a target process as seen in a pid namespace
89 .IP
90 See
91 .IR function::ns_tid (3stap)
92 for details.
93 .P
94 .TP
95 .B ppid
96 Returns the process ID of a target process's parent process
97 .IP
98 See
99 .IR function::ppid (3stap)
100 for details.
101 .P
102 .TP
103 .B ns_ppid
104 Returns the process ID of a target process's parent process as seen in a pid namespace
105 .IP
106 See
107 .IR function::ns_ppid (3stap)
108 for details.
109 .P
110 .TP
111 .B pgrp
112 Returns the process group ID of the current process
113 .IP
114 See
115 .IR function::pgrp (3stap)
116 for details.
117 .P
118 .TP
119 .B ns_pgrp
120 Returns the process group ID of the current process as seen in a pid namespace
121 .IP
122 See
123 .IR function::ns_pgrp (3stap)
124 for details.
125 .P
126 .TP
127 .B sid
128 Returns the session ID of the current process
129 .IP
130 See
131 .IR function::sid (3stap)
132 for details.
133 .P
134 .TP
135 .B ns_sid
136 Returns the session ID of the current process as seen in a pid namespace
137 .IP
138 See
139 .IR function::ns_sid (3stap)
140 for details.
141 .P
142 .TP
143 .B gid
144 Returns the group ID of a target process
145 .IP
146 See
147 .IR function::gid (3stap)
148 for details.
149 .P
150 .TP
151 .B ns_gid
152 Returns the group ID of a target process as seen in a user namespace
153 .IP
154 See
155 .IR function::ns_gid (3stap)
156 for details.
157 .P
158 .TP
159 .B egid
160 Returns the effective gid of a target process
161 .IP
162 See
163 .IR function::egid (3stap)
164 for details.
165 .P
166 .TP
167 .B ns_egid
168 Returns the effective gid of a target process as seen in a user namespace
169 .IP
170 See
171 .IR function::ns_egid (3stap)
172 for details.
173 .P
174 .TP
175 .B uid
176 Returns the user ID of a target process
177 .IP
178 See
179 .IR function::uid (3stap)
180 for details.
181 .P
182 .TP
183 .B ns_uid
184 Returns the user ID of a target process as seen in a user namespace
185 .IP
186 See
187 .IR function::ns_uid (3stap)
188 for details.
189 .P
190 .TP
191 .B euid
192 Return the effective uid of a target process
193 .IP
194 See
195 .IR function::euid (3stap)
196 for details.
197 .P
198 .TP
199 .B ns_euid
200 Returns the effective user ID of a target process as seen in a user namespace
201 .IP
202 See
203 .IR function::ns_euid (3stap)
204 for details.
205 .P
206 .TP
207 .B is_myproc
208 Determines if the current probe point has occurred in the user's own process
209 .IP
210 See
211 .IR function::is_myproc (3stap)
212 for details.
213 .P
214 .TP
215 .B cpuid
216 Returns the current cpu number
217 .IP
218 See
219 .IR function::cpuid (3stap)
220 for details.
221 .P
222 .TP
223 .B cpu
224 Returns the current cpu number
225 .IP
226 See
227 .IR function::cpu (3stap)
228 for details.
229 .P
230 .TP
231 .B registers_valid
232 Determines validity of register() and u_register() in current context
233 .IP
234 See
235 .IR function::registers_valid (3stap)
236 for details.
237 .P
238 .TP
239 .B user_mode
240 Determines if probe point occurs in user-mode
241 .IP
242 See
243 .IR function::user_mode (3stap)
244 for details.
245 .P
246 .TP
247 .B is_return
248 Whether the current probe context is a return probe
249 .IP
250 See
251 .IR function::is_return (3stap)
252 for details.
253 .P
254 .TP
255 .B target
256 Return the process ID of the target process
257 .IP
258 See
259 .IR function::target (3stap)
260 for details.
261 .P
262 .TP
263 .B module_name
264 The module name of the current script
265 .IP
266 See
267 .IR function::module_name (3stap)
268 for details.
269 .P
270 .TP
271 .B module_size
272 The module size of the current script
273 .IP
274 See
275 .IR function::module_size (3stap)
276 for details.
277 .P
278 .TP
279 .B stp_pid
280 The process id of the stapio process
281 .IP
282 See
283 .IR function::stp_pid (3stap)
284 for details.
285 .P
286 .TP
287 .B remote_id
288 The index of this instance in a remote execution.
289 .IP
290 See
291 .IR function::remote_id (3stap)
292 for details.
293 .P
294 .TP
295 .B remote_uri
296 The name of this instance in a remote execution.
297 .IP
298 See
299 .IR function::remote_uri (3stap)
300 for details.
301 .P
302 .TP
303 .B stack_size
304 Return the size of the kernel stack
305 .IP
306 See
307 .IR function::stack_size (3stap)
308 for details.
309 .P
310 .TP
311 .B stack_used
312 Returns the amount of kernel stack used
313 .IP
314 See
315 .IR function::stack_used (3stap)
316 for details.
317 .P
318 .TP
319 .B stack_unused
320 Returns the amount of kernel stack currently available
321 .IP
322 See
323 .IR function::stack_unused (3stap)
324 for details.
325 .P
326 .TP
327 .B addr
328 Address of the current probe point.
329 .IP
330 See
331 .IR function::addr (3stap)
332 for details.
333 .P
334 .TP
335 .B uaddr
336 User space address of current running task
337 .IP
338 See
339 .IR function::uaddr (3stap)
340 for details.
341 .P
342 .TP
343 .B cmdline_args
344 Fetch command line arguments from current process
345 .IP
346 See
347 .IR function::cmdline_args (3stap)
348 for details.
349 .P
350 .TP
351 .B cmdline_arg
352 Fetch a command line argument
353 .IP
354 See
355 .IR function::cmdline_arg (3stap)
356 for details.
357 .P
358 .TP
359 .B cmdline_str
360 Fetch all command line arguments from current process
361 .IP
362 See
363 .IR function::cmdline_str (3stap)
364 for details.
365
366 .SH SEE ALSO
367 .BR
368 .IR \%function::print_regs (3stap),
369 .BR
370 .IR \%function::pp (3stap),
371 .BR
372 .IR \%function::ppfunc (3stap),
373 .BR
374 .IR \%function::probe_type (3stap),
375 .BR
376 .IR \%function::execname (3stap),
377 .BR
378 .IR \%function::pexecname (3stap),
379 .BR
380 .IR \%function::pid (3stap),
381 .BR
382 .IR \%function::ns_pid (3stap),
383 .BR
384 .IR \%function::tid (3stap),
385 .BR
386 .IR \%function::ns_tid (3stap),
387 .BR
388 .IR \%function::ppid (3stap),
389 .BR
390 .IR \%function::ns_ppid (3stap),
391 .BR
392 .IR \%function::pgrp (3stap),
393 .BR
394 .IR \%function::ns_pgrp (3stap),
395 .BR
396 .IR \%function::sid (3stap),
397 .BR
398 .IR \%function::ns_sid (3stap),
399 .BR
400 .IR \%function::gid (3stap),
401 .BR
402 .IR \%function::ns_gid (3stap),
403 .BR
404 .IR \%function::egid (3stap),
405 .BR
406 .IR \%function::ns_egid (3stap),
407 .BR
408 .IR \%function::uid (3stap),
409 .BR
410 .IR \%function::ns_uid (3stap),
411 .BR
412 .IR \%function::euid (3stap),
413 .BR
414 .IR \%function::ns_euid (3stap),
415 .BR
416 .IR \%function::is_myproc (3stap),
417 .BR
418 .IR \%function::cpuid (3stap),
419 .BR
420 .IR \%function::cpu (3stap),
421 .BR
422 .IR \%function::registers_valid (3stap),
423 .BR
424 .IR \%function::user_mode (3stap),
425 .BR
426 .IR \%function::is_return (3stap),
427 .BR
428 .IR \%function::target (3stap),
429 .BR
430 .IR \%function::module_name (3stap),
431 .BR
432 .IR \%function::module_size (3stap),
433 .BR
434 .IR \%function::stp_pid (3stap),
435 .BR
436 .IR \%function::remote_id (3stap),
437 .BR
438 .IR \%function::remote_uri (3stap),
439 .BR
440 .IR \%function::stack_size (3stap),
441 .BR
442 .IR \%function::stack_used (3stap),
443 .BR
444 .IR \%function::stack_unused (3stap),
445 .BR
446 .IR \%function::addr (3stap),
447 .BR
448 .IR \%function::uaddr (3stap),
449 .BR
450 .IR \%function::cmdline_args (3stap),
451 .BR
452 .IR \%function::cmdline_arg (3stap),
453 .BR
454 .IR \%function::cmdline_str (3stap),
455 .BR
456 .IR \%stap (1),
457 .IR \%stapprobes (3stap)