]> sourceware.org Git - systemtap.git/blob - stap.1
PR13513: undo PR11759 PREEMPT_RT hack
[systemtap.git] / stap.1
1 .\" -*- nroff -*-
2 .TH STAP 1
3 .SH NAME
4 stap \- systemtap script translator/driver
5
6 .\" macros
7 .de SAMPLE
8 .br
9 .RS
10 .nf
11 .nh
12 ..
13 .de ESAMPLE
14 .hy
15 .fi
16 .RE
17 ..
18
19 .SH SYNOPSIS
20
21 .br
22 .B stap
23 [
24 .I OPTIONS
25 ]
26 .I FILENAME
27 [
28 .I ARGUMENTS
29 ]
30 .br
31 .B stap
32 [
33 .I OPTIONS
34 ]
35 .B \-
36 [
37 .I ARGUMENTS
38 ]
39 .br
40 .B stap
41 [
42 .I OPTIONS
43 ]
44 .BI \-e " SCRIPT"
45 [
46 .I ARGUMENTS
47 ]
48 .br
49 .B stap
50 [
51 .I OPTIONS
52 ]
53 .BI \-l " PROBE"
54 [
55 .I ARGUMENTS
56 ]
57 .br
58 .B stap
59 [
60 .I OPTIONS
61 ]
62 .BI \-L " PROBE"
63 [
64 .I ARGUMENTS
65 ]
66
67 .SH DESCRIPTION
68
69 The
70 .IR stap
71 program is the front-end to the Systemtap tool. It accepts probing
72 instructions (written in a simple scripting language), translates
73 those instructions into C code, compiles this C code, and loads the
74 resulting kernel module into a running Linux kernel to perform the
75 requested system trace/probe functions. You can supply the script in
76 a named file, from standard input, or from the command line. The
77 program runs until it is interrupted by the user, or if the script
78 voluntarily invokes the
79 .I exit()
80 function, or by sufficient number of soft errors.
81 .PP
82 The language, which is described in a later section, is strictly typed,
83 declaration free, procedural, and inspired by
84 .IR awk .
85 It allows source code points or events in the kernel to be associated
86 with handlers, which are subroutines that are executed synchronously. It is
87 somewhat similar conceptually to "breakpoint command lists" in the
88 .IR gdb
89 debugger.
90
91 .SH OPTIONS
92 The systemtap translator supports the following options. Any other option
93 prints a list of supported options.
94 .TP
95 .B \-h \-\-help
96 Show help message.
97 .TP
98 .B \-V \-\-version
99 Show version message.
100 .TP
101 .BI \-p " NUM"
102 Stop after pass NUM. The passes are numbered 1-5: parse, elaborate,
103 translate, compile, run. See the
104 .B PROCESSING
105 section for details.
106 .TP
107 .B \-v
108 Increase verbosity for all passes. Produce a larger volume of
109 informative (?) output each time option repeated.
110 .TP
111 .B \-\-vp ABCDE
112 Increase verbosity on a per-pass basis. For example, "\-\-vp\ 002"
113 adds 2 units of verbosity to pass 3 only. The combination "\-v\ \-\-vp\ 00004"
114 adds 1 unit of verbosity for all passes, and 4 more for pass 5.
115 .TP
116 .B \-k
117 Keep the temporary directory after all processing. This may be useful
118 in order to examine the generated C code, or to reuse the compiled
119 kernel object.
120 .TP
121 .B \-g
122 Guru mode. Enable parsing of unsafe expert-level constructs like
123 embedded C.
124 .TP
125 .B \-P
126 Prologue-searching mode. Activate heuristics to work around incorrect
127 debugging information for $target variables.
128 .TP
129 .B \-u
130 Unoptimized mode. Disable unused code elision during elaboration.
131 .TP
132 .B \-w
133 Suppressed warnings mode. Disables all warning messages.
134 .TP
135 .BI \-b
136 Use bulk mode (percpu files) for kernel-to-user data transfer.
137 .TP
138 .B \-t
139 Collect timing information on the number of times probe executes
140 and average amount of time spent in each probe-point. Also shows
141 the derivation for each probe-point.
142 .TP
143 .BI \-s NUM
144 Use NUM megabyte buffers for kernel-to-user data transfer. On a
145 multiprocessor in bulk mode, this is a per-processor amount.
146 .TP
147 .BI \-I " DIR"
148 Add the given directory to the tapset search directory. See the
149 description of pass 2 for details.
150 .TP
151 .BI \-D " NAME=VALUE"
152 Add the given C preprocessor directive to the module Makefile. These can
153 be used to override limit parameters described below.
154 .TP
155 .BI \-B " NAME=VALUE"
156 Add the given make directive to the kernel module build's make invocation.
157 These can be used to add or override kconfig options.
158 .TP
159 .BI \-\-modinfo " NAME=VALUE"
160 Add the name/value pair as a MODULE_INFO macro call to the generated module.
161 This may be useful to inform or override various module-related checks in
162 the kernel.
163 .TP
164 .BI \-G " NAME=VALUE"
165 Sets the value of global variable NAME to VALUE when staprun is invoked.
166 This applies to scalar variables declared global in the script/tapset.
167 .TP
168 .BI \-R " DIR"
169 Look for the systemtap runtime sources in the given directory.
170 .TP
171 .BI \-r " /DIR"
172 Build for kernel in given build tree. Can also be set with the
173 .I SYSTEMTAP_RELEASE
174 environment variable.
175 .TP
176 .BI \-r " RELEASE"
177 Build for kernel in build tree
178 .BR /lib/modules/RELEASE/build .
179 Can also be set with the
180 .I SYSTEMTAP_RELEASE
181 environment variable.
182 .TP
183 .BI \-m " MODULE"
184 Use the given name for the generated kernel object module, instead
185 of a unique randomized name. The generated kernel object module is
186 copied to the current directory.
187 .TP
188 .BI \-d " MODULE"
189 Add symbol/unwind information for the given module into the kernel object
190 module. This may enable symbolic tracebacks from those modules/programs,
191 even if they do not have an explicit probe placed into them.
192 .TP
193 .BI \-\-ldd
194 Add symbol/unwind information for all shared libraries suspected by
195 ldd to be necessary for user-space binaries being probe or listed with
196 the \-d option. Caution: this can make the probe modules considerably
197 larger.
198 .TP
199 .BI \-\-all\-modules
200 Equivalent to specifying "\-dkernel" and a "\-d" for each kernel module that is
201 currently loaded. Caution: this can make the probe modules considerably
202 larger.
203 .TP
204 .BI \-o " FILE"
205 Send standard output to named file. In bulk mode, percpu files will
206 start with FILE_ (FILE_cpu with \-F) followed by the cpu number.
207 This supports strftime(3) formats for FILE.
208 .TP
209 .BI \-c " CMD"
210 Start the probes, run CMD, and exit when CMD finishes. This also has the
211 effect of setting target() to the pid of the command ran.
212 .TP
213 .BI \-x " PID"
214 Sets target() to PID. This allows scripts to be written that filter on
215 a specific process.
216 .TP
217 .BI \-l " PROBE"
218 Instead of running a probe script, just list all available probe
219 points matching the given single probe point. The pattern may include
220 wildcards and aliases, but not comma-separated multiple probe points.
221 The process result code will indicate failure if there are no matches.
222 .TP
223 .BI \-L " PROBE"
224 Similar to "\-l", but list probe points and script-level local variables.
225 .TP
226 .BI \-F
227 Without \-o option, load module and start probes, then detach from the module
228 leaving the probes running.
229 With \-o option, run staprun in background as a daemon and show its pid.
230 .TP
231 .BI \-S " size[,N]"
232 Sets the maximum size of output file and the maximum number of output files.
233 If the size of output file will exceed
234 .B size
235 , systemtap switches output file to the next file. And if the number of
236 output files exceed
237 .B N
238 , systemtap removes the oldest output file. You can omit the second argument.
239 .\" PR6864: disable temporarily
240 .\".TP
241 .\".B \-\-kelf
242 .\"For names and addresses of functions to probe,
243 .\"consult the symbol tables in the kernel and modules.
244 .\"This can be useful if your kernel and/or modules were compiled
245 .\"without debugging information, or the function you want to probe
246 .\"is in an assembly-language file built without debugging information.
247 .\"See the
248 .\".B "MAKING DO WITH SYMBOL TABLES"
249 .\"section for more information.
250 .\".TP
251 .\".BI \-\-kmap [=FILE]
252 .\"For names and addresses of kernel functions to probe,
253 .\"consult the symbol table in the indicated text file.
254 .\"The default is /boot/System.map\-VERSION.
255 .\"The contents of this file should be in the form of the default output from
256 .\".IR nm (1).
257 .\"Only symbols of type T or t are used.
258 .\"If you specify /proc/kallsyms or some other file in that format,
259 .\"where lines for module symbols contain a fourth column,
260 .\"reading of the symbol table stops with the first module symbol
261 .\"(which should be right after the last kernel symbol).
262 .\"As with
263 .\".BR \-\-kelf ,
264 .\"the symbol table in each module's .ko file will also be consulted.
265 .\"See the
266 .\".B "MAKING DO WITH SYMBOL TABLES"
267 .\"section for more information.
268 .\" \-\-ignore\-{vmlinux,dwarf} shouldn't be visible
269 .TP
270 .B \-\-skip\-badvars
271 Ignore unresolvable or run-time-inaccessible context variables and
272 substitute with 0, without errors.
273
274 .TP
275 .B \-\-suppress\-handler\-errors
276 Wrap all probe handlers into something like this
277 .SAMPLE
278 try { ... } catch { next }
279 .ESAMPLE
280 block, which causes any runtime errors to be quietly suppressed.
281 Suppressed errors do not count against
282 .BR MAXERRORS
283 limits. In this mode, the
284 .BR MAXSKIPPED
285 limits are also suppressed, so that many errors and skipped probes
286 may be accumulated during a script's runtime. Any overall counts will
287 still be reported at shutdown.
288
289 .TP
290 .BI \-\-compatible " VERSION"
291 Suppress recent script language or tapset changes which are incompatible
292 with given older version of systemtap. This may be useful if a much older
293 systemtap script fails to run. See the DEPRECATION section for more
294 details.
295
296 .TP
297 .BI \-\-check\-version
298 This option is used to check if the active script has any constructors
299 that may be systemtap version specific. See the DEPRECATION section
300 for more details.
301
302 .TP
303 .BI \-\-clean\-cache
304 This option prunes stale entries from the cache directory. This is normally
305 done automatically after successful runs, but this option will trigger the
306 cleanup manually and then exit. See the CACHING section for more details about
307 cache limits.
308
309 .TP
310 .BI \-\-disable\-cache
311 This option disables all use of the cache directory. No files will be either
312 read from or written to the cache.
313
314 .TP
315 .BI \-\-poison\-cache
316 This option treats files in the cache directory as invalid. No files will be
317 read from the cache, but resulting files from this run will still be written to
318 the cache. This is meant as a troubleshooting aid when stap's cached behavior
319 seems to be misbehaving.
320
321 .TP
322 \fB\-\-privilege\fR[=\fIstapusr\fR | =\fIstapsys\fR | =\fIstapdev\fR]
323 This option instructs \fIstap\fR to examine the script looking for constructs
324 which are not allowed for the specified privilege level (see \fIUNPRIVILEGED USERS\fR).
325 Compilation fails if any such
326 constructs are used.
327 If \fIstapusr\fR or \fIstapsys\fR are specified when using a compile server
328 (see \fI\-\-use\-server\fR),
329 the server will examine the script and, if compilation succeeds, the
330 server will cryptographically sign the resulting kernel module, certifying
331 that is it safe for use by users at the specified privilege level.
332
333 If \fI\-\-privilege\fR has not been specified,
334 \fI\-pN\fR has not been specified with N < 5,
335 and the invoking user is not
336 \fIroot\fR, and is not a member of the group \fIstapdev\fR,
337 then \fIstap\fR will automatically
338 add the appropriate \fI\-\-privilege\fR option to the options already specified.
339
340 .TP
341 .BI \-\-unprivileged
342 This option is equivalent to \fI\-\-privilege=stapusr\fR.
343
344 .TP
345 \fB\-\-use\-server\fR[=\fIHOSTNAME\fR[\fI:PORT\fR] | =\fIIP_ADDRESS\fR[\fI:PORT\fR] | =\fICERT_SERIAL\fR]
346 Specify compile\-server(s) to be used for compilation and/or in conjunction
347 with
348 .I \-\-list\-servers
349 and
350 .I \-\-trust\-servers
351 (see below). If no argument is
352 supplied, then the default in unprivileged mode (see
353 .IR \-\-privilege )
354 is to select compatible servers which are trusted as SSL peers and as
355 module signers and currently online. Otherwise the default is to select
356 compatible servers which are trusted as SSL peers
357 and currently online.
358 .I \-\-use\-server
359 may be
360 specified more than once, in which case a list of servers is accumulated
361 in the order specified. Servers may be specified by host name, ip address, or
362 by certificate serial number (obtained using
363 .IR \-\-list\-servers ).
364 The latter is most commonly used when revoking
365 trust in a server (see
366 .I \-\-trust\-servers
367 below). If a server is specified by host name or ip address, then an optional
368 port number may be specified. This is useful for accessing servers which are
369 not on the local network or to specify a particular server.
370
371 If \fI\-\-use\-server\fR has not been specified,
372 \fI\-pN\fR has not been specified with N < 5,
373 and the invoking user not \fIroot\fR,
374 is not a member of the group \fIstapdev\fR, but is a member of the group
375 \fIstapusr\fR, then \fIstap\fR will automatically
376 add \fI\-\-use\-server\fR to the options already specified.
377
378 .TP
379 \fB\-\-use\-server\-on\-error\fR[=\fByes\fR|=\fBno\fR]
380 Instructs stap to retry compilation of a script using a compile server if
381 compilation on the local host fails in a manner which suggests that it might
382 succeed using a server.
383 If this option is not specified, the default is \fIno\fR.
384 If no argument is provided, then the default
385 is \fIyes\fR. Compilation will be retried for certain types of errors
386 (e.g. insufficient data or resources) which may not occur during
387 re\-compilation by a compile
388 server. Compile servers will be selected automatically for the
389 re\-compilation attempt as if \fI\-\-use\-server\fR was specified with no
390 arguments.
391
392 .TP
393 .BI \-\-list\-servers "[=SERVERS]"
394 Display the status of the requested
395 .IR SERVERS ,
396 where
397 .I SERVERS
398 is a comma\-separated
399 list of server attributes. The list of attributes is combined to filter the
400 list of servers displayed. Supported attributes are:
401 .RS
402 .TP
403 .BI all
404 specifies all known servers (trusted SSL peers, trusted module signers, online
405 servers).
406 .TP
407 .BI specified
408 specifies servers specified using
409 .IR \-\-use\-server .
410 .TP
411 .BI online
412 filters the output by retaining information about servers which are currently
413 online.
414 .TP
415 .BI trusted
416 filters the output by retaining information about servers which are trusted as
417 SSL peers.
418 .TP
419 .BI signer
420 filters the output by retaining information about servers which are trusted as
421 module signers (see
422 .IR \-\-privilege ).
423 .TP
424 .BI compatible
425 filters the output by retaining information about servers which are compatible
426 with the current kernel release and architecture.
427 .RE
428 .IP
429 If no argument is provided, then the default is
430 .BR specified .
431 If no servers were specified using
432 .IR \-\-use\-server ,
433 then the default servers for
434 .IR \-\-use\-server
435 are listed.
436
437 .TP
438 .BI \-\-trust\-servers "[=TRUST_SPEC]"
439 Grant or revoke trust in compile\-servers, specified using
440 .IR \-\-use\-server
441 as specified by TRUST_SPEC,
442 where TRUST_SPEC is a comma\-separated list specifying the trust which is to
443 be granted or revoked. Supported elements are:
444 .RS
445 .TP
446 .BI ssl
447 trust the specified servers as SSL peers.
448 .TP
449 .BI signer
450 trust the specified servers as module signers (see
451 .IR \-\-privilege ).
452 Only root can specify
453 .BR signer.
454 .TP
455 .BI all\-users
456 grant trust as an ssl peer for all users on the local host. The default is
457 to grant trust as an ssl peer for the current user only. Trust as a module
458 signer is always granted for all users. Only root can specify
459 .BR all\-users .
460 .TP
461 .BI revoke
462 revoke the specified trust. The default is to grant it.
463 .TP
464 .BI no\-prompt
465 do not prompt the user for confirmation before carrying out the requested
466 action. The default is to prompt the user for confirmation.
467 .RE
468 .IP
469 If no argument is provided, then the default is
470 .BR ssl .
471 If no servers were specified using
472 .IR \-\-use\-server ,
473 then no trust will be granted or revoked.
474 .IP
475 Unless \fBno\-prompt\fR has been specified,
476 the user will be prompted to confirm the trust to be granted or revoked before
477 the operation is performed.
478
479 .TP
480 .BI \-\-dump-probe-types
481 Dumps a list of supported probe types. If
482 .IR \-\-privilege=stapusr
483 is also specified, the list will be limited to probe types available to unprivileged users.
484
485 .TP
486 .BI \-\-remote " URL"
487 Set the execution target to the given host. This option may be
488 repeated to target multiple execution targets. Passes 1-4 are
489 completed locally as normal to build the script, and then pass 5 will
490 copy the module to the target and run it. Acceptable URL forms include:
491 .B [USER@]HOSTNAME
492 and
493 .B ssh://[USER@]HOSTNAME/
494 This mode uses ssh, optionally using a username not matching your own.
495 If a custom ssh_config file is in use, add
496 .B SendEnv LANG
497 to retain internationalization functionality.
498 The
499 .B direct://
500 URL is available as a special loopback mode to run on the local host.
501
502 .TP
503 .BI \-\-remote\-prefix
504 Prefix each line of remote output with "N:", where N is the index of the remote
505 execution target from which the given line originated.
506
507 .TP
508 .BI \-\-download\-debuginfo "[=OPTION]"
509 Enable, disable or set a timeout for the automatic debuginfo downloading feature
510 offered by abrt as specified by OPTION, where OPTION is one of the following:
511 .RS
512 .TP
513 .BI yes
514 enable automatic downloading of debuginfo with no timeout. This is the same
515 as not providing an OPTION value to
516 .IR \-\-download\-debuginfo
517 .TP
518 .BI no
519 explicitly disable automatic dowloading of debuginfo. This is the same as
520 not using the option at all.
521 .TP
522 .BI ask
523 show abrt output, and ask before continuing download. No timeout will be set.
524 .TP
525 .BI <timeout>
526 specify a timeout as a positive number to stop the download if it is taking
527 too long.
528
529
530 .SH ARGUMENTS
531
532 Any additional arguments on the command line are passed to the script
533 parser for substitution. See below.
534
535 .SH SCRIPT LANGUAGE
536
537 The systemtap script language resembles
538 .IR awk .
539 There are two main outermost constructs: probes and functions. Within
540 these, statements and expressions use C-like operator syntax and
541 precedence.
542
543 .SS GENERAL SYNTAX
544 Whitespace is ignored. Three forms of comments are supported:
545 .RS
546 .br
547 .BR # " ... shell style, to the end of line, except for $# and @#"
548 .br
549 .BR // " ... C++ style, to the end of line"
550 .br
551 .BR /* " ... C style ... " */
552 .RE
553 Literals are either strings enclosed in double-quotes (passing through
554 the usual C escape codes with backslashes), or integers (in decimal,
555 hexadecimal, or octal, using the same notation as in C). All strings
556 are limited in length to some reasonable value (a few hundred bytes).
557 Integers are 64-bit signed quantities, although the parser also accepts
558 (and wraps around) values above positive 2**63.
559 .PP
560 In addition, script arguments given at the end of the command line may
561 be inserted. Use
562 .B $1 ... $<NN>
563 for insertion unquoted,
564 .B @1 ... @<NN>
565 for insertion as a string literal. The number of arguments may be accessed
566 through
567 .B $#
568 (as an unquoted number) or through
569 .B @#
570 (as a quoted number). These may be used at any place a token may begin,
571 including within the preprocessing stage. Reference to an argument
572 number beyond what was actually given is an error.
573
574 .SS PREPROCESSING
575 A simple conditional preprocessing stage is run as a part of parsing.
576 The general form is similar to the
577 .RB cond " ? " exp1 " : " exp2
578 ternary operator:
579 .SAMPLE
580 .BR %( " CONDITION " %? " TRUE-TOKENS " %)
581 .BR %( " CONDITION " %? " TRUE-TOKENS " %: " FALSE-TOKENS " %)
582 .ESAMPLE
583 The CONDITION is either an expression whose format is determined by its
584 first keyword, or a string literals comparison or a numeric literals
585 comparison. It can be also composed of many alternatives and conjunctions
586 of CONDITIONs (meant as in previous sentence) using || and && respectively.
587 However, parentheses are not supported yet, so remembering that conjunction
588 takes precedence over alternative is important.
589 .PP
590 If the first part is the identifier
591 .BR kernel_vr " or " kernel_v
592 to refer to the kernel version number, with ("2.6.13\-1.322FC3smp") or
593 without ("2.6.13") the release code suffix, then
594 the second part is one of the six standard numeric comparison operators
595 .BR < ", " <= ", " == ", " != ", " > ", and " >= ,
596 and the third part is a string literal that contains an RPM-style
597 version-release value. The condition is deemed satisfied if the
598 version of the target kernel (as optionally overridden by the
599 .BR \-r
600 option) compares to the given version string. The comparison is
601 performed by the glibc function
602 .BR strverscmp .
603 As a special case, if the operator is for simple equality
604 .RB ( == ),
605 or inequality
606 .RB ( != ),
607 and the third part contains any wildcard characters
608 .RB ( * " or " ? " or " [ "),"
609 then the expression is treated as a wildcard (mis)match as evaluated
610 by
611 .BR fnmatch .
612 .PP
613 If, on the other hand, the first part is the identifier
614 .BR arch
615 to refer to the processor architecture (as named by the kernel
616 build system ARCH/SUBARCH), then the second
617 part is one of the two string comparison operators
618 .BR == " or " != ,
619 and the third part is a string literal for matching it. This
620 comparison is a wildcard (mis)match.
621 .PP
622 Similarly, if the first part is an identifier like
623 .BR CONFIG_something
624 to refer to a kernel configuration option, then the second part is
625 .BR == " or " != ,
626 and the third part is a string literal for matching the value
627 (commonly "y" or "m"). Nonexistent or unset kernel configuration
628 options are represented by the empty string. This comparison is also
629 a wildcard (mis)match.
630 .PP
631 If the first part is the identifier
632 .BR systemtap_v ,
633 the test refers to the systemtap compatibility version, which may be
634 overridden for old scripts with the
635 .BI \-\-compatible
636 flag. The comparison operator is as is for
637 .BR kernel_v
638 and the right operand is a version string. See also the DEPRECATION
639 section below.
640 .PP
641 Otherwise, the CONDITION is expected to be a comparison between two string
642 literals or two numeric literals. In this case, the arguments are the only
643 variables usable.
644 .PP
645 The TRUE-TOKENS and FALSE-TOKENS are zero or more general parser
646 tokens (possibly including nested preprocessor conditionals), and are
647 passed into the input stream if the condition is true or false. For
648 example, the following code induces a parse error unless the target
649 kernel version is newer than 2.6.5:
650 .SAMPLE
651 %( kernel_v <= "2.6.5" %? **ERROR** %) # invalid token sequence
652 .ESAMPLE
653 The following code might adapt to hypothetical kernel version drift:
654 .SAMPLE
655 probe kernel.function (
656 %( kernel_v <= "2.6.12" %? "__mm_do_fault" %:
657 %( kernel_vr == "2.6.13*smp" %? "do_page_fault" %:
658 UNSUPPORTED %) %)
659 ) { /* ... */ }
660
661 %( arch == "ia64" %?
662 probe syscall.vliw = kernel.function("vliw_widget") {}
663 %)
664 .ESAMPLE
665
666 .SS VARIABLES
667 Identifiers for variables and functions are an alphanumeric sequence,
668 and may include "_" and "$" characters. They may not start with a
669 plain digit, as in C. Each variable is by default local to the probe
670 or function statement block within which it is mentioned, and therefore
671 its scope and lifetime is limited to a particular probe or function
672 invocation.
673 .\" XXX add statistics type here once it's supported
674 .PP
675 Scalar variables are implicitly typed as either string or integer.
676 Associative arrays also have a string or integer value, and a
677 tuple of strings and/or integers serving as a key. Here are a
678 few basic expressions.
679 .SAMPLE
680 var1 = 5
681 var2 = "bar"
682 array1 [pid()] = "name" # single numeric key
683 array2 ["foo",4,i++] += 5 # vector of string/num/num keys
684 if (["hello",5,4] in array2) println ("yes") # membership test
685 .ESAMPLE
686 .PP
687 The translator performs
688 .I type inference
689 on all identifiers, including array indexes and function parameters.
690 Inconsistent type-related use of identifiers signals an error.
691 .PP
692 Variables may be declared global, so that they are shared amongst all
693 probes and live as long as the entire systemtap session. There is one
694 namespace for all global variables, regardless of which script file
695 they are found within. Concurrent access to global variables is
696 automatically protected with locks, see the
697 .B SAFETY AND SECURITY
698 section for more details. A global declaration may be written at the
699 outermost level anywhere, not within a block of code. Global
700 variables which are written but never read will be displayed
701 automatically at session shutdown. The translator will
702 infer for each its value type, and if it is used as an array, its key
703 types. Optionally, scalar globals may be initialized with a string
704 or number literal. The following declaration marks variables as global.
705 .RS
706 .BR global " var1" , " var2" , " var3=4"
707 .RE
708 .PP
709 Global variables can also be set as module options. One can do this by either
710 using the \-G option, or the module must first be compiled using stap \-p4.
711 Global variables can then be set on the command line when calling staprun on
712 the module generated by stap \-p4. See
713 .IR staprun (8)
714 for more information.
715 .RS
716 .RE
717 .PP
718 Arrays are limited in size by the MAXMAPENTRIES variable -- see the
719 .B SAFETY AND SECURITY
720 section for details. Optionally, global arrays may be declared with a
721 maximum size in brackets, overriding MAXMAPENTRIES for that array only.
722 Note that this doesn't indicate the type of keys for the array, just the
723 size.
724 .RS
725 .BR global " tiny_array[10]" , " normal_array" , " big_array[50000]"
726 .RE
727 .PP
728 Arrays may be wrapped using the '%' character causing previously entered
729 elements to be overwritten if more elements are inserted than the array can
730 hold. This works for both associative and statistics typed arrays.
731 .RS
732 .BR global " wrapped_array1%[10]", " wrapped_array2%"
733 .RE
734 .\" XXX add statistics type here once it's supported
735
736 .SS STATEMENTS
737 Statements enable procedural control flow. They may occur within
738 functions and probe handlers. The total number of statements executed
739 in response to any single probe event is limited to some number
740 defined by a macro in the translated C code, and is in the
741 neighbourhood of 1000.
742 .TP
743 EXP
744 Execute the string- or integer-valued expression and throw away
745 the value.
746 .TP
747 .BR { " STMT1 STMT2 ... " }
748 Execute each statement in sequence in this block. Note that
749 separators or terminators are generally not necessary between statements.
750 .TP
751 .BR ;
752 Null statement, do nothing. It is useful as an optional separator between
753 statements to improve syntax-error detection and to handle certain
754 grammar ambiguities.
755 .TP
756 .BR if " (EXP) STMT1 [ " else " STMT2 ]"
757 Compare integer-valued EXP to zero. Execute the first (non-zero)
758 or second STMT (zero).
759 .TP
760 .BR while " (EXP) STMT"
761 While integer-valued EXP evaluates to non-zero, execute STMT.
762 .TP
763 .BR for " (EXP1; EXP2; EXP3) STMT"
764 Execute EXP1 as initialization. While EXP2 is non-zero, execute
765 STMT, then the iteration expression EXP3.
766 .TP
767 .BR foreach " (VAR " in " ARRAY [ "limit " EXP ]) STMT"
768 Loop over each element of the named global array, assigning current
769 key to VAR. The array may not be modified within the statement.
770 By adding a single
771 .BR + " or " \-
772 operator after the VAR or the ARRAY identifier, the iteration will
773 proceed in a sorted order, by ascending or descending index or value.
774 Using the optional
775 .BR limit
776 keyword limits the number of loop iterations to EXP times. EXP is
777 evaluated once at the beginning of the loop.
778 .TP
779 .BR foreach " ([VAR1, VAR2, ...] " in " ARRAY [ "limit " EXP ]) STMT"
780 Same as above, used when the array is indexed with a tuple of keys.
781 A sorting suffix may be used on at most one VAR or ARRAY identifier.
782 .TP
783 .BR foreach " (VALUE = VAR " in " ARRAY [ "limit " EXP ]) STMT"
784 This variant of foreach saves current value into VALUE on each
785 iteration, so it is the same as ARRAY[VAR]. This also works with a
786 tuple of keys. Sorting suffixes on VALUE have the same effect as on ARRAY.
787 .TP
788 .BR break ", " continue
789 Exit or iterate the innermost nesting loop
790 .RB ( while " or " for " or " foreach )
791 statement.
792 .TP
793 .BR return " EXP"
794 Return EXP value from enclosing function. If the function's value is
795 not taken anywhere, then a return statement is not needed, and the
796 function will have a special "unknown" type with no return value.
797 .TP
798 .BR next
799 Return now from enclosing probe handler. This is especially useful in
800 probe aliases that apply event filtering predicates.
801 .TP
802 .BR try " { STMT1 } " catch " { STMT2 }"
803 Run the statements in the first block. Upon any run-time errors, abort
804 STMT1 and start executing STMT2. Any errors in STMT2 will propagate to
805 outer try/catch blocks, if any.
806 .TP
807 .BR try " { STMT1 } " catch "(VAR) { STMT2 }"
808 Same as above, plus assign the error message to the string scalar variable VAR.
809 .TP
810 .BR delete " ARRAY[INDEX1, INDEX2, ...]"
811 Remove from ARRAY the element specified by the index tuple. The value will no
812 longer be available, and subsequent iterations will not report the element.
813 It is not an error to delete an element that does not exist.
814 .TP
815 .BR delete " ARRAY"
816 Remove all elements from ARRAY.
817 .TP
818 .BR delete " SCALAR"
819 Removes the value of SCALAR. Integers and strings are cleared to 0 and ""
820 respectively, while statistics are reset to the initial empty state.
821
822 .SS EXPRESSIONS
823 Systemtap supports a number of operators that have the same general syntax,
824 semantics, and precedence as in C and awk. Arithmetic is performed as per
825 typical C rules for signed integers. Division by zero or overflow is
826 detected and results in an error.
827 .TP
828 binary numeric operators
829 .B * / % + \- >> << & ^ | && ||
830 .TP
831 binary string operators
832 .B .
833 (string concatenation)
834 .TP
835 numeric assignment operators
836 .B = *= /= %= += \-= >>= <<= &= ^= |=
837 .TP
838 string assignment operators
839 .B = .=
840 .TP
841 unary numeric operators
842 .B + \- ! ~ ++ \-\-
843 .TP
844 binary numeric or string comparison operators
845 .B < > <= >= == !=
846 .TP
847 ternary operator
848 .RB cond " ? " exp1 " : " exp2
849 .TP
850 grouping operator
851 .BR ( " exp " )
852 .TP
853 function call
854 .RB "fn " ( "[ arg1, arg2, ... ]" )
855 .TP
856 array membership check
857 .RB exp " in " array
858 .br
859 .BR "[" exp1 ", " exp2 ", " ... "] in " array
860
861 .SS PROBES
862 The main construct in the scripting language identifies probes.
863 Probes associate abstract events with a statement block ("probe
864 handler") that is to be executed when any of those events occur. The
865 general syntax is as follows:
866 .SAMPLE
867 .BR probe " PROBEPOINT [" , " PROBEPOINT] " { " [STMT ...] " }
868 .ESAMPLE
869 .PP
870 Events are specified in a special syntax called "probe points". There
871 are several varieties of probe points defined by the translator, and
872 tapset scripts may define further ones using aliases. These are
873 listed in the
874 .IR stapprobes (3stap)
875 manual pages.
876 .PP
877 The probe handler is interpreted relative to the context of each
878 event. For events associated with kernel code, this context may
879 include
880 .I variables
881 defined in the
882 .I source code
883 at that spot. These "target variables" are presented to the script as
884 variables whose names are prefixed with "$". They may be accessed
885 only if the kernel's compiler preserved them despite optimization.
886 This is the same constraint that a debugger user faces when working
887 with optimized code. Some other events have very little context.
888 See the
889 .IR stapprobes (3stap)
890 man pages to see the kinds of context variables available at each kind
891 of probe point.
892 .PP
893 New probe points may be defined using "aliases". Probe point aliases
894 look similar to probe definitions, but instead of activating a probe
895 at the given point, it just defines a new probe point name as an alias
896 to an existing one. There are two types of alias, i.e. the prologue
897 style and the epilogue style which are identified by "=" and "+="
898 respectively.
899 .PP
900 For prologue style alias, the statement block that follows an alias
901 definition is implicitly added as a prologue to any probe that refers
902 to the alias. While for the epilogue style alias, the statement block
903 that follows an alias definition is implicitly added as an epilogue to
904 any probe that refers to the alias. For example:
905
906 .SAMPLE
907 probe syscall.read = kernel.function("sys_read") {
908 fildes = $fd
909 if (execname() == "init") next # skip rest of probe
910 }
911 .ESAMPLE
912 defines a new probe point
913 .nh
914 .IR syscall.read ,
915 .hy
916 which expands to
917 .nh
918 .IR kernel.function("sys_read") ,
919 .hy
920 with the given statement as a prologue, which is useful to predefine
921 some variables for the alias user and/or to skip probe processing
922 entirely based on some conditions. And
923 .SAMPLE
924 probe syscall.read += kernel.function("sys_read") {
925 if (tracethis) println ($fd)
926 }
927 .ESAMPLE
928 defines a new probe point with the given statement as an epilogue, which
929 is useful to take actions based upon variables set or left over by the
930 the alias user. Please note that in each case, the statements in the
931 alias handler block are treated ordinarily, so that variables assigned
932 there constitute mere initialization, not a macro substitution.
933
934 An alias is used just like a built-in probe type.
935 .SAMPLE
936 probe syscall.read {
937 printf("reading fd=%d\n", fildes)
938 if (fildes > 10) tracethis = 1
939 }
940 .ESAMPLE
941
942 .SS FUNCTIONS
943 Systemtap scripts may define subroutines to factor out common work.
944 Functions take any number of scalar (integer or string) arguments, and
945 must return a single scalar (integer or string). An example function
946 declaration looks like this:
947 .SAMPLE
948 function thisfn (arg1, arg2) {
949 return arg1 + arg2
950 }
951 .ESAMPLE
952 Note the general absence of type declarations, which are instead
953 inferred by the translator. However, if desired, a function
954 definition may include explicit type declarations for its return value
955 and/or its arguments. This is especially helpful for embedded-C
956 functions. In the following example, the type inference engine need
957 only infer type type of arg2 (a string).
958 .SAMPLE
959 function thatfn:string (arg1:long, arg2) {
960 return sprint(arg1) . arg2
961 }
962 .ESAMPLE
963 Functions may call others or themselves
964 recursively, up to a fixed nesting limit. This limit is defined by
965 a macro in the translated C code and is in the neighbourhood of 10.
966
967 .SS PRINTING
968 There are a set of function names that are specially treated by the
969 translator. They format values for printing to the standard systemtap
970 output stream in a more convenient way. The
971 .IR sprint*
972 variants return the formatted string instead of printing it.
973 .TP
974 .BR print ", " sprint
975 Print one or more values of any type, concatenated directly together.
976 .TP
977 .BR println ", " sprintln
978 Print values like
979 .IR print " and " sprint ,
980 but also append a newline.
981 .TP
982 .BR printd ", " sprintd
983 Take a string delimiter and two or more values of any type, and print the
984 values with the delimiter interposed. The delimiter must be a literal
985 string constant.
986 .TP
987 .BR printdln ", " sprintdln
988 Print values with a delimiter like
989 .IR printd " and " sprintd ,
990 but also append a newline.
991 .TP
992 .BR printf ", " sprintf
993 Take a formatting string and a number of values of corresponding types,
994 and print them all. The format must be a literal string constant.
995 .PP
996 The
997 .IR printf
998 formatting directives similar to those of C, except that they are
999 fully type-checked by the translator:
1000 .RS
1001 .TP
1002 %b
1003 Writes a binary blob of the value given, instead of ASCII text. The width specifier determines the number of bytes to write; valid specifiers are %b %1b %2b %4b %8b. Default (%b) is 8 bytes.
1004 .TP
1005 %c
1006 Character.
1007 .TP
1008 %d,%i
1009 Signed decimal.
1010 .TP
1011 %m
1012 Safely reads kernel memory at the given address, outputs its content. The precision specifier determines the number of bytes to read. Default is 1 byte.
1013 .TP
1014 %M
1015 Same as %m, but outputs in hexadecimal. The minimal size of output is double the precision specifier.
1016 .TP
1017 %o
1018 Unsigned octal.
1019 .TP
1020 %p
1021 Unsigned pointer address.
1022 .TP
1023 %s
1024 String.
1025 .TP
1026 %u
1027 Unsigned decimal.
1028 .TP
1029 %x
1030 Unsigned hex value, in all lower-case.
1031 .TP
1032 %X
1033 Unsigned hex value, in all upper-case.
1034 .TP
1035 %%
1036 Writes a %.
1037 .RE
1038 .PP
1039 Examples:
1040 .SAMPLE
1041 a = "alice", b = "bob", p = 0x1234abcd, i = 123, j = \-1, id[a] = 1234, id[b] = 4567
1042 print("hello")
1043 Prints: hello
1044 println(b)
1045 Prints: bob\\n
1046 println(a . " is " . sprint(16))
1047 Prints: alice is 16
1048 foreach (name in id) printdln("|", strlen(name), name, id[name])
1049 Prints: 5|alice|1234\\n3|bob|4567
1050 printf("%c is %s; %x or %X or %p; %d or %u\\n",97,a,p,p,p,j,j)
1051 Prints: a is alice; 1234abcd or 1234ABCD or 0x1234abcd; \-1 or 18446744073709551615\\n
1052 printf("2 bytes of kernel buffer at address %p: %2m", p, p)
1053 Prints: 2 byte of kernel buffer at address 0x1234abcd: <binary data>
1054 printf("%4b", p)
1055 Prints (these values as binary data): 0x1234abcd
1056 .ESAMPLE
1057
1058 .SS STATISTICS
1059 It is often desirable to collect statistics in a way that avoids the
1060 penalties of repeatedly exclusive locking the global variables those
1061 numbers are being put into. Systemtap provides a solution using a
1062 special operator to accumulate values, and several pseudo-functions to
1063 extract the statistical aggregates.
1064 .PP
1065 The aggregation operator is
1066 .IR <<< ,
1067 and resembles an assignment, or a C++ output-streaming operation.
1068 The left operand specifies a scalar or array-index lvalue, which must
1069 be declared global. The right operand is a numeric expression. The
1070 meaning is intuitive: add the given number to the pile of numbers to
1071 compute statistics of. (The specific list of statistics to gather
1072 is given separately, by the extraction functions.)
1073 .SAMPLE
1074 foo <<< 1
1075 stats[pid()] <<< memsize
1076 .ESAMPLE
1077 .PP
1078 The extraction functions are also special. For each appearance of a
1079 distinct extraction function operating on a given identifier, the
1080 translator arranges to compute a set of statistics that satisfy it.
1081 The statistics system is thereby "on-demand". Each execution of
1082 an extraction function causes the aggregation to be computed for
1083 that moment across all processors.
1084 .PP
1085 Here is the set of extractor functions. The first argument of each is
1086 the same style of lvalue used on the left hand side of the accumulate
1087 operation. The
1088 .IR @count(v) ", " @sum(v) ", " @min(v) ", " @max(v) ", " @avg(v)
1089 extractor functions compute the number/total/minimum/maximum/average
1090 of all accumulated values. The resulting values are all simple
1091 integers.
1092 .PP
1093 Histograms are also available, but are more complicated because they
1094 have a vector rather than scalar value.
1095 .I @hist_linear(v,start,stop,interval)
1096 represents a linear histogram from "start" to "stop" by increments
1097 of "interval". The interval must be positive. Similarly,
1098 .I @hist_log(v)
1099 represents a base-2 logarithmic histogram. Printing a histogram
1100 with the
1101 .I print
1102 family of functions renders a histogram object as a tabular
1103 "ASCII art" bar chart.
1104 .SAMPLE
1105 probe foo {
1106 x <<< $value
1107 }
1108 probe end {
1109 printf ("avg %d = sum %d / count %d\\n",
1110 @avg(x), @sum(x), @count(x))
1111 print (@hist_log(v))
1112 }
1113 .ESAMPLE
1114
1115 .SS TYPECASTING
1116 Once a pointer has been saved into a script integer variable, the
1117 translator loses the type information necessary to access members from
1118 that pointer. Using the
1119 .I @cast()
1120 operator tells the translator how to read a pointer.
1121 .SAMPLE
1122 @cast(p, "type_name"[, "module"])\->member
1123 .ESAMPLE
1124 .PP
1125 This will interpret
1126 .I p
1127 as a pointer to a struct/union named
1128 .I type_name
1129 and dereference the
1130 .I member
1131 value. Further
1132 .IR \->subfield
1133 expressions may be appended to dereference more levels.
1134 .BR
1135 NOTE:
1136 the same dereferencing operator
1137 .IR \->
1138 is used to refer to both direct containment or pointer indirection.
1139 Systemtap automatically determines which. The optional
1140 .I module
1141 tells the translator where to look for information about that type.
1142 Multiple modules may be specified as a list with
1143 .IR :
1144 separators. If the module is not specified, it will default either to
1145 the probe module for dwarf probes, or to "kernel" for functions and all
1146 other probes types.
1147 .PP
1148 The translator can create its own module with type information from a header
1149 surrounded by angle brackets, in case normal debuginfo is not available. For
1150 kernel headers, prefix it with "kernel" to use the appropriate build system.
1151 All other headers are build with default GCC parameters into a user module.
1152 Multiple headers may be specified in sequence to resolve a codependency.
1153 .SAMPLE
1154 @cast(tv, "timeval", "<sys/time.h>")\->tv_sec
1155 @cast(task, "task_struct", "kernel<linux/sched.h>")\->tgid
1156 @cast(task, "task_struct",
1157 "kernel<linux/sched.h><linux/fs_struct.h>")\->fs\->umask
1158 .ESAMPLE
1159 Values acquired by
1160 .BR @cast
1161 may be pretty-printed by the
1162 .BR
1163 $ " and " $$
1164 suffix operators, the same way as described in the CONTEXT VARIABLES
1165 section of the
1166 .IR stapprobes (3stap)
1167 manual page.
1168
1169 .PP
1170 When in guru mode, the translator will also allow scripts to assign new
1171 values to members of typecasted pointers.
1172 .PP
1173 Typecasting is also useful in the case of
1174 .I void*
1175 members whose type may be determinable at runtime.
1176 .SAMPLE
1177 probe foo {
1178 if ($var\->type == 1) {
1179 value = @cast($var\->data, "type1")\->bar
1180 } else {
1181 value = @cast($var\->data, "type2")\->baz
1182 }
1183 print(value)
1184 }
1185 .ESAMPLE
1186
1187 .SS EMBEDDED C
1188 When in guru mode, the translator accepts embedded code in the
1189 script. Such code is enclosed between
1190 .IR %{
1191 and
1192 .IR %}
1193 markers, and is transcribed verbatim, without analysis, in some
1194 sequence, into the generated C code. At the outermost level, this may
1195 be useful to add
1196 .IR #include
1197 instructions, and any auxiliary definitions for use by other embedded
1198 code.
1199 .PP
1200 Another place where embedded code is permitted is as a function body.
1201 In this case, the script language body is replaced entirely by a piece
1202 of C code enclosed again between
1203 .IR %{ " and " %}
1204 markers.
1205 This C code may do anything reasonable and safe. There are a number
1206 of undocumented but complex safety constraints on atomicity,
1207 concurrency, resource consumption, and run time limits, so this
1208 is an advanced technique.
1209 .PP
1210 The memory locations set aside for input and output values
1211 are made available to it using a macro
1212 .IR THIS .
1213 Here are some examples:
1214 .SAMPLE
1215 function add_one (val) %{
1216 THIS\->__retvalue = THIS\->val + 1;
1217 %}
1218 function add_one_str (val) %{
1219 strlcpy (THIS\->__retvalue, THIS\->val, MAXSTRINGLEN);
1220 strlcat (THIS\->__retvalue, "one", MAXSTRINGLEN);
1221 %}
1222 .ESAMPLE
1223 The function argument and return value types have to be inferred by
1224 the translator from the call sites in order for this to work. The
1225 user should examine C code generated for ordinary script-language
1226 functions in order to write compatible embedded-C ones.
1227 .PP
1228 The last place where embedded code is permitted is as an expression rvalue.
1229 In this case, the C code enclosed between
1230 .IR %{ " and " %}
1231 markers is interpreted as an ordinary expression value. It is assumed
1232 to be a normal 64-bit signed number, unless the marker
1233 .I /* string */
1234 is included, in which case it's treated as a string.
1235 .SAMPLE
1236 function add_one (val) {
1237 return val + %{ 1 %}
1238 }
1239 function add_string_two (val) {
1240 return val . %{ /* string */ "two" %}
1241 }
1242 .ESAMPLE
1243 .PP
1244 The embedded-C code may contain markers to assert optimization
1245 and safety properties.
1246 .TP
1247 .I /* pure */
1248 means that the C code has no side effects and may be elided entirely if its
1249 value is not used by script code.
1250 .TP
1251 .I /* unprivileged */
1252 means that the C code is so safe that even unprivileged users are permitted
1253 to use it.
1254 .TP
1255 .I /* myproc\-unprivileged */
1256 means that the C code is so safe that even unprivileged users are permitted
1257 to use it, provided that the target of the current probe is within the user's
1258 own process.
1259 .TP
1260 .I /* guru */
1261 means that the C code is so unsafe that a systemtap user must specify
1262 .IR \-g
1263 (guru mode) to use this.
1264 .TP
1265 .I /* string */
1266 in embedded-C expressions only, means that the expression has
1267 .I const char *
1268 type and should be treated as a string value, instead of
1269 the default long numeric.
1270
1271 .SS BUILT-INS
1272 A set of builtin functions and probe point aliases are provided
1273 by the scripts installed in the directory specified in the stappaths (7)
1274 manual page. The functions are described in the
1275 .IR stapfuncs "(3stap) and " stapprobes (3stap)
1276 manual pages.
1277
1278 .SH PROCESSING
1279 The translator begins pass 1 by parsing the given input script,
1280 and all scripts (files named
1281 .IR *.stp )
1282 found in a tapset directory. The directories listed
1283 with
1284 .BR \-I
1285 are processed in sequence, each processed in "guru mode". For each
1286 directory, a number of subdirectories are also searched. These
1287 subdirectories are derived from the selected kernel version (the
1288 .BR \-R
1289 option),
1290 in order to allow more kernel-version-specific scripts to override less
1291 specific ones. For example, for a kernel version
1292 .IR 2.6.12\-23.FC3
1293 the following patterns would be searched, in sequence:
1294 .IR 2.6.12\-23.FC3/*.stp ,
1295 .IR 2.6.12/*.stp ,
1296 .IR 2.6/*.stp ,
1297 and finally
1298 .IR *.stp
1299 Stopping the translator after pass 1 causes it to print the parse trees.
1300
1301 .PP
1302 In pass 2, the translator analyzes the input script to resolve symbols
1303 and types. References to variables, functions, and probe aliases that
1304 are unresolved internally are satisfied by searching through the
1305 parsed tapset scripts. If any tapset script is selected because it
1306 defines an unresolved symbol, then the entirety of that script is
1307 added to the translator's resolution queue. This process iterates
1308 until all symbols are resolved and a subset of tapset scripts is
1309 selected.
1310 .PP
1311 Next, all probe point descriptions are validated
1312 against the wide variety supported by the translator. Probe points that
1313 refer to code locations ("synchronous probe points") require the
1314 appropriate kernel debugging information to be installed. In the
1315 associated probe handlers, target-side variables (whose names begin
1316 with "$") are found and have their run-time locations decoded.
1317 .PP
1318 Next, all probes and functions are analyzed for optimization
1319 opportunities, in order to remove variables, expressions, and
1320 functions that have no useful value and no side-effect. Embedded-C
1321 functions are assumed to have side-effects unless they include the
1322 magic string
1323 .BR /*\ pure\ */ .
1324 Since this optimization can hide latent code errors such as type
1325 mismatches or invalid $target variables, it sometimes may be useful
1326 to disable the optimizations with the
1327 .BR \-u
1328 option.
1329 .PP
1330 Finally, all variable, function, parameter, array, and index types are
1331 inferred from context (literals and operators). Stopping the
1332 translator after pass 2 causes it to list all the probes, functions,
1333 and variables, along with all inferred types. Any inconsistent or
1334 unresolved types cause an error.
1335
1336 .PP
1337 In pass 3, the translator writes C code that represents the actions
1338 of all selected script files, and creates a
1339 .IR Makefile
1340 to build that into a kernel object. These files are placed into a
1341 temporary directory. Stopping the translator at this point causes
1342 it to print the contents of the C file.
1343
1344 .PP
1345 In pass 4, the translator invokes the Linux kernel build system to
1346 create the actual kernel object file. This involves running
1347 .IR make
1348 in the temporary directory, and requires a kernel module build
1349 system (headers, config and Makefiles) to be installed in the usual
1350 spot
1351 .IR /lib/modules/VERSION/build .
1352 Stopping the translator after pass 4 is the last chance before
1353 running the kernel object. This may be useful if you want to
1354 archive the file.
1355
1356 .PP
1357 In pass 5, the translator invokes the systemtap auxiliary program
1358 .I staprun
1359 program for the given kernel object. This program arranges to load
1360 the module then communicates with it, copying trace data from the
1361 kernel into temporary files, until the user sends an interrupt signal.
1362 Any run-time error encountered by the probe handlers, such as running
1363 out of memory, division by zero, exceeding nesting or runtime limits,
1364 results in a soft error indication. Soft errors in excess of
1365 MAXERRORS block of all subsequent probes (except error-handling
1366 probes), and terminate the session. Finally,
1367 .I staprun
1368 unloads the module, and cleans up.
1369
1370 .SS ABNORMAL TERMINATION
1371
1372 One should avoid killing the stap process forcibly, for example with
1373 SIGKILL, because the stapio process (a child process of the stap
1374 process) and the loaded module may be left running on the system. If
1375 this happens, send SIGTERM or SIGINT to any remaining stapio
1376 processes, then use rmmod to unload the systemtap module.
1377
1378
1379 .SH EXAMPLES
1380 See the
1381 .IR stapex (3stap)
1382 manual page for a collection of samples.
1383
1384 .SH CACHING
1385 The systemtap translator caches the pass 3 output (the generated C
1386 code) and the pass 4 output (the compiled kernel module) if pass 4
1387 completes successfully. This cached output is reused if the same
1388 script is translated again assuming the same conditions exist (same kernel
1389 version, same systemtap version, etc.). Cached files are stored in
1390 the
1391 .I $SYSTEMTAP_DIR/cache
1392 directory. The cache can be limited by having the file
1393 .I cache_mb_limit
1394 placed in the cache directory (shown above) containing only an ASCII
1395 integer representing how many MiB the cache should not exceed. In the
1396 absence of this file, a default will be created with the limit set to 256MiB.
1397 This is a 'soft' limit in that the cache will be cleaned after a new entry
1398 is added if the cache clean interval is exceeded, so the total cache size may
1399 temporarily exceed this limit. This interval can be specified by having the
1400 file
1401 .I cache_clean_interval_s
1402 placed in the cache directory (shown above) containing only an ASCII integer
1403 representing the interval in seconds. In the absence of this file, a default
1404 will be created with the interval set to 30 s.
1405
1406 .SH SAFETY AND SECURITY
1407 Systemtap is an administrative tool. It exposes kernel internal data
1408 structures and potentially private user information.
1409
1410 To actually run the kernel objects it builds, a user must be one of
1411 the following:
1412 .IP \(bu 4
1413 the root user;
1414 .IP \(bu 4
1415 a member of the
1416 .I stapdev
1417 and
1418 .I stapusr
1419 groups;
1420 .IP \(bu 4
1421 a member of the
1422 .I stapsys
1423 and
1424 .I stapusr
1425 groups; or
1426 .IP \(bu 4
1427 a member of the
1428 .I stapusr
1429 group.
1430 .PP
1431 The root user or a user who is a member of both the
1432 .I stapdev
1433 and
1434 .I stapusr
1435 groups can build and run any systemtap script.
1436 .PP
1437 A user who is a member of both the
1438 .I stapsys
1439 and
1440 .I stapusr
1441 groups can only use pre\-built modules under the following conditions:
1442 .IP \(bu 4
1443 The module has been signed by a trusted signer. Trusted signers are normally
1444 systemtap compile\-servers which sign modules when the \fI\-\-privilege\fR option is
1445 specified by the client. See the
1446 .IR stap\-server (8)
1447 manual page for more information.
1448 .IP \(bu 4
1449 The module was built using the \fI\-\-privilege=stapsys\fR or the \fI\-\-privilege=stapusr\fR
1450 options.
1451 .PP
1452 Members of only the
1453 .I stapusr
1454 group can only use pre\-built modules under the following conditions:
1455 .IP \(bu 4
1456 The module is located in
1457 the /lib/modules/VERSION/systemtap directory. This directory
1458 must be owned by root and not be world writable.
1459 .PP
1460 or
1461 .IP \(bu 4
1462 The module has been signed by a trusted signer. Trusted signers are normally
1463 systemtap compile\-servers which sign modules when the \fI\-\-privilege\fR option is
1464 specified by the client. See the
1465 .IR stap\-server (8)
1466 manual page for more information.
1467 .IP \(bu 4
1468 The module was built using the \FI\-\-privilege=stapusr\fR option.
1469 .PP
1470 The kernel modules generated by
1471 .I stap
1472 program are run by the
1473 .IR staprun
1474 program. The latter is a part of the Systemtap package, dedicated to
1475 module loading and unloading (but only in the white zone), and
1476 kernel-to-user data transfer. Since
1477 .IR staprun
1478 does not perform any additional security checks on the kernel objects
1479 it is given, it would be unwise for a system administrator to add
1480 untrusted users to the
1481 .I stapdev
1482 or
1483 .I stapusr
1484 groups.
1485 .PP
1486 The translator asserts certain safety constraints. It aims to ensure
1487 that no handler routine can run for very long, allocate memory,
1488 perform unsafe operations, or in unintentionally interfere with the
1489 kernel. Uses of script global variables are automatically read/write
1490 locked as appropriate, to protect against manipulation by concurrent probe
1491 handlers. (Deadlocks are detected with timeouts. Use the
1492 .BR \-t
1493 flag to receive reports of excessive lock contention.) Use of guru mode
1494 constructs such as embedded C can violate these constraints, leading
1495 to kernel crash or data corruption.
1496 .PP
1497 The resource use limits are set by macros in the generated C code.
1498 These may be overridden with the
1499 .BR \-D
1500 flag. A selection of these is as follows:
1501 .TP
1502 MAXNESTING
1503 Maximum number of nested function calls. Default determined by
1504 script analysis, with a bonus 10 slots added for recursive
1505 scripts.
1506 .TP
1507 MAXSTRINGLEN
1508 Maximum length of strings, default 128.
1509 .TP
1510 MAXTRYLOCK
1511 Maximum number of iterations to wait for locks on global variables
1512 before declaring possible deadlock and skipping the probe, default 1000.
1513 .TP
1514 MAXACTION
1515 Maximum number of statements to execute during any single probe hit
1516 (with interrupts disabled),
1517 default 1000.
1518 .TP
1519 MAXACTION_INTERRUPTIBLE
1520 Maximum number of statements to execute during any single probe hit
1521 which is executed with interrupts enabled (such as begin/end probes),
1522 default (MAXACTION * 10).
1523 .TP
1524 MAXBACKTRACE
1525 Maximum number of stack frames that will be be processed by the stap
1526 runtime unwinder as produced by the backtrace functions in the
1527 [u]context-unwind.stp tapsets, default 20.
1528 .TP
1529 MAXMAPENTRIES
1530 Default maximum number of rows in any single global array, default 2048.
1531 Individual arrays may be declared with a larger or smaller limit instead:
1532 .SAMPLE
1533 global big[10000],little[5]
1534 .ESAMPLE
1535 .TP
1536 MAXERRORS
1537 Maximum number of soft errors before an exit is triggered, default 0, which
1538 means that the first error will exit the script. Note that with the
1539 .B \-\-suppress\-handler\-errors
1540 option, this limit is not enforced.
1541 .TP
1542 MAXSKIPPED
1543 Maximum number of skipped probes before an exit is triggered, default 100.
1544 Running systemtap with \-t (timing) mode gives more details about skipped
1545 probes. With the default \-DINTERRUPTIBLE=1 setting, probes skipped due to
1546 reentrancy are not accumulated against this limit. Note that with the
1547 .B \-\-suppress\-handler\-errors
1548 option, this limit is not enforced.
1549 .TP
1550 MINSTACKSPACE
1551 Minimum number of free kernel stack bytes required in order to
1552 run a probe handler, default 1024. This number should be large enough
1553 for the probe handler's own needs, plus a safety margin.
1554 .TP
1555 MAXUPROBES
1556 Maximum number of concurrently armed user-space probes (uprobes), default
1557 somewhat larger than the number of user-space probe points named in the script.
1558 This pool needs to be potentialy large because individual uprobe objects (about
1559 64 bytes each) are allocated for each process for each matching script-level probe.
1560 .TP
1561 STP_MAXMEMORY
1562 Maximum amount of memory (in kilobytes) that the systemtap module
1563 should use, default unlimited. The memory size includes the size of
1564 the module itself, plus any additional allocations. This only tracks
1565 direct allocations by the systemtap runtime. This does not track
1566 indirect allocations (as done by kprobes/uprobes/etc. internals).
1567 .TP
1568 STP_PROCFS_BUFSIZE
1569 Size of procfs probe read buffers (in bytes). Defaults to
1570 .IR MAXSTRINGLEN .
1571 This value can be overridden on a per-procfs file basis using the
1572 procfs read probe
1573 .I .maxsize(MAXSIZE)
1574 parameter.
1575 .PP
1576 With scripts that contain probes on any interrupt path, it is possible that
1577 those interrupts may occur in the middle of another probe handler. The probe
1578 in the interrupt handler would be skipped in this case to avoid reentrance.
1579 To work around this issue, execute stap with the option
1580 .BR \-DINTERRUPTIBLE=0
1581 to mask interrupts throughout the probe handler. This does add some extra
1582 overhead to the probes, but it may prevent reentrance for common problem
1583 cases. However, probes in NMI handlers and in the callpath of the stap
1584 runtime may still be skipped due to reentrance.
1585
1586 .PP
1587 Multiple scripts can write data into a relay buffer concurrently. A host
1588 script provides an interface for accessing its relay buffer to guest scripts.
1589 Then, the output of the guests are merged into the output of the host.
1590 To run a script as a host, execute stap with
1591 .BR \-DRELAYHOST[=name]
1592 option. The
1593 .BR name
1594 identifies your host script among several hosts.
1595 While running the host, execute stap with
1596 .BR \-DRELAYGUEST[=name]
1597 to add a guest script to the host.
1598 Note that you must unload guests before unloading a host. If there are some
1599 guests connected to the host, unloading the host will be failed.
1600
1601 .PP
1602 In case something goes wrong with
1603 .IR stap " or " staprun
1604 after a probe has already started running, one may safely kill both
1605 user processes, and remove the active probe kernel module with
1606 .IR rmmod .
1607 Any pending trace messages may be lost.
1608
1609 .PP
1610 In addition to the methods outlined above, the generated kernel module
1611 also uses overload processing to make sure that probes can't run for
1612 too long. If more than STP_OVERLOAD_THRESHOLD cycles (default
1613 500000000) have been spent in all the probes on a single cpu during
1614 the last STP_OVERLOAD_INTERVAL cycles (default 1000000000), the probes
1615 have overloaded the system and an exit is triggered.
1616 .PP
1617 By default, overload processing is turned on for all modules. If you
1618 would like to disable overload processing, define STP_NO_OVERLOAD (or
1619 its alias STAP_NO_OVERLOAD).
1620
1621 .SH UNPRIVILEGED USERS
1622
1623 Systemtap exposes kernel internal data
1624 structures and potentially private user information. Because of this, use of
1625 systemtap's full capabilities are restricted to root and to users who are
1626 members of the groups stapdev and stapusr.
1627
1628 However, a restricted set of systemtap's features can be made available to
1629 trusted, unprivileged users. These users are members of the group stapusr
1630 only, or members of the groups stapusr and stapsys.
1631 These users can load systemtap modules which have been compiled and
1632 certified by a trusted systemtap compile\-server. See the descriptions of the
1633 options \fI\-\-privilege\fR and \fI\-\-use\-server\fR. See
1634 \fIREADME.unprivileged\fR in the systemtap source code for information about
1635 setting up a trusted compile server.
1636
1637 The restrictions enforced when \fI\-\-privilege=stapsys\fR is specified are designed
1638 to prevent unprivileged users from:
1639 .RS
1640 .IP \(bu 4
1641 harming the system maliciously.
1642 .RE
1643
1644 The restrictions enforced when \fI\-\-privilege=stapusr\fR is specified are designed
1645 to prevent unprivileged users from:
1646 .RS
1647 .IP \(bu 4
1648 harming the system maliciously.
1649 .IP \(bu 4
1650 gaining access to information which would not normally be available to an
1651 unprivileged user.
1652 .IP \(bu 4
1653 disrupting the performance of processes owned by other users of the system.
1654 Some overhead to the system in general is unavoidable since the
1655 unprivileged user's probes
1656 will be triggered at the appropriate times. What we would like to avoid is
1657 targeted interruption of another user's processes which would not normally be
1658 possible by an unprivileged user.
1659 .RE
1660
1661 .SS PROBE RESTRICTIONS
1662 A member of the groups stapusr and stapsys may use all probe points.
1663 .PP
1664 A member of only the group stapusr may use only the following probes:
1665 .RS
1666 .IP \(bu 4
1667 begin, begin(n)
1668 .IP \(bu 4
1669 end, end(n)
1670 .IP \(bu 4
1671 error(n)
1672 .IP \(bu 4
1673 never
1674 .IP \(bu 4
1675 process.*, where the target process is owned by the user.
1676 .IP \(bu 4
1677 timer.{jiffies,s,sec,ms,msec,us,usec,ns,nsec}(n)*
1678 .IP \(bu 4
1679 timer.hz(n)
1680 .RE
1681
1682 .SS SCRIPTING LANGUAGE RESTRICTIONS
1683 The following scripting language features are unavailable to all unprivileged users:
1684
1685 .RS
1686 .IP \(bu 4
1687 any feature enabled by the Guru Mode (-g) option.
1688 .IP \(bu 4
1689 embedded C code.
1690 .RE
1691
1692 .SS RUNTIME RESTRICTIONS
1693 The following runtime restrictions are placed upon all unprivileged users:
1694 .RS
1695 .IP \(bu 4
1696 Only the default runtime code (see \fI-R\fR) may be used.
1697 .RE
1698
1699 Additional restrictions are placed on members of only the group stapusr:
1700 .RS
1701 .IP \(bu 4
1702 Probing of processes owned by other users is not permitted.
1703 .IP \(bu 4
1704 Access of kernel memory (read and write) is not permitted.
1705 .RE
1706
1707 .SS COMMAND LINE OPTION RESTRICTIONS
1708 Some command line options provide access to features which must not be available
1709 to all unprivileged users:
1710
1711 .RS
1712 .IP \(bu 4
1713 -g may not be specified.
1714 .IP \(bu 4
1715 The following options may not be used by the compile-server client:
1716 .SAMPLE
1717 -a, -B, -D, -I, -r, -R
1718 .ESAMPLE
1719 .RE
1720
1721 .SS ENVIRONMENT RESTRICTIONS
1722 The following environment variables must not be set for all unprivileged users:
1723 .SAMPLE
1724
1725 SYSTEMTAP_RUNTIME
1726 SYSTEMTAP_TAPSET
1727 SYSTEMTAP_DEBUGINFO_PATH
1728 .ESAMPLE
1729
1730 .SS TAPSET RESTRICTIONS
1731 The following built-in tapset functions are unconditionally available to all users:
1732 .SAMPLE
1733
1734 _ehostunreach:long ()
1735 _enetunreach:long ()
1736 _icmp_dest_unreach:long ()
1737 _icmp_exc_fragtime:long ()
1738 _icmp_prot_unreach:long ()
1739 _icmp_time_exceeded:long ()
1740 _MM_ANONPAGES:long()
1741 _MM_FILEPAGES:long()
1742 _net_rx_drop:long ()
1743 _rtn_broadcast:long ()
1744 _rtn_multicast:long ()
1745 _rtn_unspec:long ()
1746 _sys_pipe2_flag_str:string (f:long)
1747 AF_INET:long()
1748 cpu:long ()
1749 cputime_to_msecs:long (cputime:long)
1750 egid:long ()
1751 error (msg:string)
1752 euid:long ()
1753 execname:string ()
1754 exit ()
1755 get_cycles:long ()
1756 gettimeofday_ns:long ()
1757 GFP_KERNEL:long()
1758 gid:long ()
1759 HZ:long ()
1760 is_myproc:long ()
1761 isdigit:long(str:string)
1762 isinstr:long(s1:string,s2:string)
1763 jiffies:long ()
1764 log (msg:string)
1765 mem_page_size:long ()
1766 module_name:string ()
1767 pexecname:string ()
1768 pgrp:long ()
1769 pid:long ()
1770 pn:string ()
1771 pp:string ()
1772 ppid:long ()
1773 randint:long(n:long)
1774 registers_valid:long ()
1775 sid:long ()
1776 str_replace:string (prnt_str:string, srch_str:string, rplc_str:string)
1777 stringat:long(str:string, pos:long)
1778 strlen:long(s:string)
1779 strtol:long(str:string, base:long)
1780 substr:string(str:string,start:long, length:long)
1781 target:long ()
1782 task_utime:long ()
1783 task_stime:long ()
1784 text_str:string(input:string)
1785 text_strn:string(input:string, len:long, quoted:long)
1786 tid:long ()
1787 tokenize:string(input:string, delim:string)
1788 tz_gmtoff() {
1789 tz_name() {
1790 uid:long ()
1791 user_mode:long ()
1792 warn (msg:string)
1793 .ESAMPLE
1794
1795 The following built-in tapset functions are available to
1796 members of only the group stapusr
1797 within their own processes. Scripts written by these users must test the
1798 result of the tapset function \fIis_myproc\fR and only call these functions if
1799 the result is 1. The script will exit immediately if any of these functions is
1800 called by an unprivileged user within a probe within a process which is not
1801 owned by that user.
1802 .SAMPLE
1803
1804 _utrace_syscall_nr:long ()
1805 _utrace_syscall_arg:long (n:long)
1806 _utrace_syscall_return:long ()
1807 print_ubacktrace ()
1808 print_ubacktrace_brief ()
1809 print_ustack(stk:string)
1810 sprint_ubacktrace:string ()
1811 uaddr:long ()
1812 ubacktrace:string ()
1813 umodname:string (addr:long)
1814 user_char:long (addr:long)
1815 user_char_warn:long (addr:long)
1816 user_int:long (addr:long)
1817 user_int_warn:long (addr:long)
1818 user_int16:long (addr:long)
1819 user_int32:long (addr:long)
1820 user_int64:long (addr:long)
1821 user_int8:long (addr:long)
1822 user_long:long (addr:long)
1823 user_long_warn:long (addr:long)
1824 user_short:long (addr:long)
1825 user_short_warn:long (addr:long)
1826 user_string_quoted:string (addr:long)
1827 user_string_n_quoted:string (addr:long, n:long)
1828 user_string_n_warn:string (addr:long, n:long)
1829 user_string_n2:string (addr:long, n:long, err_msg:string)
1830 user_string_warn:string (addr:long)
1831 user_string2:string (addr:long, err_msg:string)
1832 user_uint16:long (addr:long)
1833 user_uint32:long (addr:long)
1834 user_uint8:long (addr:long)
1835 user_ushort:long (addr:long)
1836 user_ushort_warn:long (addr:long)
1837 usymdata:string (addr: long)
1838 usymname:string (addr: long)
1839 .ESAMPLE
1840
1841 No other built-in tapset functions may be used by
1842 members of only the group stapusr.
1843
1844 .\" PR6864: disable temporarily
1845 .\".SH MAKING DO WITH SYMBOL TABLES
1846 .\"Systemtap performs best when it has access to the debugging information
1847 .\"associated with your kernel and modules.
1848 .\"However, if this information is not available,
1849 .\"systemtap can still support probing of function entries and returns
1850 .\"using symbols read from vmlinux and/or the modules in /lib/modules.
1851 .\"Systemtap can also read the kernel symbol table from a text file
1852 .\"such as /boot/System.map or /proc/kallsyms.
1853 .\"See the
1854 .\".B \-\-kelf
1855 .\"and
1856 .\".B \-\-kmap
1857 .\"options.
1858 .\".PP
1859 .\"If systemtap finds relevant debugging information,
1860 .\"it will use it even if you specify
1861 .\".B \-\-kelf
1862 .\"or
1863 .\".BR \-\-kmap .
1864 .\".PP
1865 .\"Without debugging information, systemtap cannot support the
1866 .\"following types of language constructs:
1867 .\".IP \(bu 4
1868 .\"probe specifications that refer to source files or line numbers
1869 .\".IP \(bu 4
1870 .\"probe specifications that refer to inline functions
1871 .\".IP \(bu 4
1872 .\"statements that refer to $target variables
1873 .\".IP \(bu 4
1874 .\"statements that refer to @cast() variables
1875 .\".IP \(bu 4
1876 .\"tapset-defined variables defined using any of the above constructs.
1877 .\"In particular, at this writing,
1878 .\"the prologue blocks for certain aliases in the syscall tapset
1879 .\"(e.g., syscall.open) contain "if" statements that refer to $target variables.
1880 .\"If your script refers to any such aliases,
1881 .\"systemtap must have access to the kernel's debugging information.
1882 .\".PP
1883 .\"Most T and t symbols correspond to function entry points, but some do not.
1884 .\"Based only on the symbol table, systemtap cannot tell the difference.
1885 .\"Placing return probes on symbols that aren't entry points
1886 .\"will most likely lead to kernel stack corruption.
1887
1888 .SH EXIT STATUS
1889
1890 The systemtap translator generally returns with a success code of 0 if
1891 the requested script was processed and executed successfully through
1892 the requested pass. Otherwise, errors may be printed to stderr and
1893 a failure code is returned. Use
1894 .I \-v
1895 or
1896 .I \-vp N
1897 to increase (global or per-pass) verbosity to identify the source of the
1898 trouble.
1899
1900 In listings mode
1901 .RI ( \-l " and " \-L ),
1902 error messages are normally suppressed. A success code of 0 is returned
1903 if at least one matching probe was found.
1904
1905 A script executing in pass 5 that is interrupted with ^C / SIGINT is
1906 considered to be successful.
1907
1908 .SH DEPRECATION
1909
1910 Over time, some features of the script language and the tapset library
1911 may undergo incompatible changes, so that a script written against
1912 an old version of systemtap may no longer run. In these cases, it may
1913 help to run systemtap with the
1914 .I \-\-compatible VERSION
1915 flag, specifying the last known working version of systemtap. Running
1916 systemtap with the
1917 .I \-\-check\-version
1918 flag will output a warning if any possible incompatible elements have
1919 been parsed. Below is a table of recently deprecated tapset functions
1920 and syntax elements that require the given \-\-compatible flag to use:
1921 .PP
1922 .TP
1923 \-\-compatible=1.2
1924 (none yet)
1925 .TP
1926 \-\-compatible=1.3
1927 The tapset alias 'syscall.compat_pselect7a' was misnamed. It should
1928 have been 'syscall.compat_pselect7' (without the trailing 'a').
1929 Starting in release 1.4, the old name will be deprecated.
1930 .TP
1931 \-\-compatible=1.4
1932 In the 'syscall.add_key' probe, the 'description_auddr' variable
1933 has been deprecated in favor of the new 'description_uaddr'
1934 variable.
1935 .IP
1936 In the 'syscall.fgetxattr', 'syscall.fsetxattr', 'syscall.getxattr',
1937 \'syscall.lgetxattr', 'syscall.lremovexattr', 'nd_syscall.fgetxattr',
1938 \'nd_syscall.fremovexattr', 'nd_syscall.fsetxattr', 'nd_syscall.getxattr',
1939 and 'nd_syscall.lremovexattr' probes, the 'name2' variable has been
1940 deprecated in favor of the new 'name_str' variable.
1941 .IP
1942 In the 'nd_syscall.accept' probe the 'flag_str' variable
1943 has been deprecated in favor of the new 'flags_str' variable.
1944 .IP
1945 In the 'nd_syscall.dup' probe the 'old_fd' variable has been
1946 deprecated in favor of the new 'oldfd' variable.
1947 .IP
1948 The tapset alias 'nd_syscall.compat_pselect7a' was misnamed. It should
1949 have been 'nd_syscall.compat_pselect7' (without the trailing 'a').
1950 .IP
1951 The tapset function 'cpuid' is deprecated in favor of the better known 'cpu'.
1952 .IP
1953 In the i386 'syscall.sigaltstack' probe, the 'ussp' variable has
1954 been deprecated in favor of the new 'uss_uaddr' variable.
1955 .IP
1956 In the ia64 'syscall.sigaltstack' probe, the 'ss_uaddr' and
1957 \'oss_uaddr' variables have been deprecated in favor of the new
1958 \'uss_uaddr' and 'uoss_uaddr' variables.
1959 .IP
1960 The powerpc tapset alias 'syscall.compat_sysctl' was deprecated
1961 and renamed 'syscall.sysctl32'.
1962 .IP
1963 In the x86_64 'syscall.sigaltstack' probe, the 'regs_uaddr'
1964 variable has been deprecated in favor of the new 'regs' variable.
1965 .TP
1966 \-\-compatible=1.7
1967 In the 'kprocess.release probe, the 'pid variable
1968 has been deprecated in favor of the new 'released_pid'
1969 variable.
1970 .IP
1971 In the '_sunrpc.clnt.create_client.rpc_new_client_inline' probe,
1972 the 'args' variable in the has been deprecated in favor of the new
1973 internal-only '__args' variable.
1974 .\" e.g. tapset_function()
1975 .\" e.g. post-incrementing a frobozz in a while loop
1976
1977 .\" .... or for really deprecated stuff:
1978 .\" .TP
1979 .\" support removed in version X.Y
1980 .\" really_old_tapset_function()
1981
1982 .SH FILES
1983 .\" consider autoconf-substituting these directories
1984 .TP
1985 Important files and their corresponding paths can be located in the
1986 stappaths (7) manual page.
1987
1988 .SH SEE ALSO
1989 .IR stapprobes (3stap),
1990 .IR stapfuncs (3stap),
1991 .IR stappaths (7),
1992 .IR staprun (8),
1993 .IR stapvars (3stap),
1994 .IR stapex (3stap),
1995 .IR stap\-server (8),
1996 .IR awk (1),
1997 .IR gdb (1)
1998
1999 .SH BUGS
2000 Use the Bugzilla link of the project web page or our mailing list.
2001 .nh
2002 .BR http://sourceware.org/systemtap/ , <systemtap@sourceware.org> .
2003 .hy
This page took 0.199055 seconds and 5 git commands to generate.