1 * What's new in version 3.0
2 - Add Czech version of manual pages.
4 - The stap compile server will log the stap client's options that are passed
5 to the server. The options that get logged on the server will include the
6 script name or the -e script, depending on which is used by the client.
8 - Embedded-C functions and blocks may now access script level global variables
9 using the STAP_GLOBAL_GET_* and STAP_GLOBAL_SET_* macros.
11 To read or write the script global var, the /* pragma:read:var */ or
12 /* pragma:write:var */ marker must be placed in the embedded-C function or block.
13 The written type must match the type inferred at script level.
16 STAP_GLOBAL_SET_var(STAP_GLOBAL_GET_var()+1) -> increments script global var by 1
17 STAP_GLOBAL_SET_var("hello")
20 STAP_GLOBAL_GET_var(index-1, ..., index-n)
21 STAP_GLOBAL_SET_var(index-1, ..., index-n, new value)
23 - Probe point brace expansion is now supported to improve brevity in
24 specifying probe points. For example,
26 process.{function("a"), function("b").{call,return}}
27 => process.function("a"), process.function("b").call, process.function("b").return
29 process.{function("*").callees,plt}?
30 => process.function("*").callees?, process.plt?
32 {kernel,module("nfs")}.function("nfs*")!
33 => kernel.function("nfs*")!, module("nfs").function("nfs*")!
35 - Profiling timers at arbitrary frequencies are now provided and perf probes
36 now support a frequency field as an alternative to sampling counts.
38 probe timer.profile.freq.hz(N)
39 probe perf.type(N).config(M).hz(X)
41 The specified frequency is only accurate up to around 100hz. You may
42 need to provide a higher value to achieve the desired rate.
44 - New --monitor[=INTERVAL] option similar to unix "top". This allows users to
45 see statistics about the running module(uptime, module name, invoker uid,
46 memory sizes, global variables, and the current probe list along with
49 An interface is also provided to allow control over the running
50 module(resetting global variables, sorting the list of probes, deactivating
51 and reactivating probes).
53 - Added support for private global variables and private functions. The scope
54 of these is limited to the tapset file they are defined in (PR19136).
56 - New tapset function string_quoted() to quote and \-escape general strings.
57 String $context variables that are pretty-printed are now processed with
58 such a quotation engine, falling back to a 0x%x (hex pointer) on errors.
60 - Functions get_mmap_args() and get_32mmap_args() got deprecated.
62 * What's new in version 2.9, 2015-10-08
64 - SystemTap now uses symbols from /proc/kallsyms when kernel debuginfo is not
67 - New --prologue-searching[=WHEN] option has been added to stap with '-P' being
68 its short counterpart. Using --prologue-searching=never turns prologue
69 searching deliberately off working around issue of int_arg() returning wrong
70 value when a 32-bit userspace binary having debug info is being probed with
71 active prologue searching (PR18649).
73 - The powerpc variant of nd_syscall.compat_sysctl got deprecated on favor of
74 nd_syscall.sysctl32. This aligns the nd_syscall to its respective syscall and
75 to ia64/s390/x86_64 variants too.
77 - New tapset function assert(expression, msg) has been added.
79 - Embedded-C functions may now use the new STAP_PRINTF(fmt, ...)
82 - New tapset functions fullname_struct_path and fullname_struct_nameidata
83 resolve full path names from internal kernel struct pointers.
85 - New tapset functions arch_bytes() and uarch_bytes() to obtain address size
86 for kernel and user space respectively.
88 - New tapset function switch_file() allows control over rotation
91 - The [nd_]syscall tapset got autodocumented. Related paragraph got added to PDF
92 and HTML tapset reference. Also a new tapset::syscall 3stap man page got added.
94 - Embedded-C functions with parameter arity-0 can now be marked with
95 the /* stable */ /* pure */ pragmas, if (roughly speaking) the
96 function is side-effect-free and idempotent. The translator may
97 execute these speculatively and have their results memoized. This
98 lets probes with multiple calls to such functions run faster.
100 Context variable ($foo) getter functions (in non-guru mode), and
101 numerous tapset functions are now marked as /* stable */ /* pure */.
102 Several example scripts have been modified to eschew explicit
105 - Callee probe points now support '.return' and '.call' suffix.
108 process("proc").function("foo").callee("bar").return
110 will fire upon returning from bar when called by foo.
112 process("proc").function("foo").callee("bar").call
114 will only fire for non-inlined callees.
116 - The following tapset variables and functions are deprecated in
118 - The '__int32_compat' library macro got deprecated in favor of
119 new '__compat_long' library macro.
120 - The 'uargs' convenience variable of the 'seccomp' syscall probe
121 got deprecated in favor of new 'uargs_uaddr' variable.
123 - SystemTap has reduced its memory consumption by using interned_strings (a
124 wrapper for boost::string_ref) in place of std::string instances. The change
125 is to reduce the number of duplicate strings created by replacing them with
126 interned_strings which act like pointers to existing strings.
128 For the implementation of interned_string, see stringtable.h
130 * What's new in version 2.8, 2015-06-17
132 - SystemTap has improved support for probing golang programs. Work has been
133 done to be able to handle DWARF information, reporting file names, line
134 numbers, and column numbers, and tolerance of odd characters in symbol names.
136 - The function::*, probe::* and new macro::* man pages cross-references the
137 enclosing tapset::* man page. For example:
139 function::pn(3stap) mentions tapset::pn(3stap) in the SEE ALSO section
141 - New stapref(1) man page provides a reference for the scripting language. The
142 stapref page contains an overview of the features available in the language,
143 such as keywords, data types, operators and more.
145 - The @task macro performs the very common @cast to a task_struct.
147 The embedded-C bodies of task_current() and pid2task() are now wrapped
148 by @task, which gives them a debuginfo type on the return value. With
149 autocast type propagation, this removes the need for any explicit @cast
152 Other places which take untyped task pointers as parameters, for
153 instance, now use @task as well to simplify their code.
155 - New namespace-aware tapset functions [task_]ns_*() and ia new option
156 --target-namespaces=PID to denote a target set of namespaces corresponding to
157 the PID's namespaces. The namespace-aware tapsets will return values
158 relative to the target namespaces if specified, or the stap process' namespaces.
160 - Netfilter probes now attempt to decode Spanning Tree Protocol packets
161 into local variables: probe netfilter.bridge.*, br_* variables,
162 stp_dump.stp sample script.
164 - Colorization of error string tokens is made more robust, especially
165 in presence of $N/@N substitution.
167 - The following tapset variables and functions are deprecated in
169 - The 'hostname_uaddr' variable in the syscall.setdomainname and
170 nd_syscall.setdomainname probe aliases have been deprecated in
171 favor of the new 'domainname_uaddr' variable.
172 - The 'fd' and 'fd_str' variables in the syscall.execveat and
173 nd_syscall.execveat probe aliases have been deprecated in favor of
174 the new 'dirfd' and 'dirfd_str' variables.
176 * What's new in version 2.7, 2015-02-18
178 - Some systemtap sample scripts are now identified with the "_best" keyword,
179 because they are generally useful or educational. They are now promoted
180 within the generated index files.
182 - Passing strings to and from functions has become faster due to optimization
183 (passing some strings by reference instead of by value/copy). It may
184 be disabled by using the unoptimize flag (-u).
186 To make embedded-C functions eligible for the same optimization, use the pragma
187 /* unmodified-fnargs */ to indicate that the function body will not modify
188 the function arguments. Remember to use MAXSTRINGLEN for string length,
189 rather than sizeof(string_arg) (which might now be a pointer).
191 - SystemTap now allows .function probes to be specified by their full function
192 name, file, and declaration line number. Use the .statement probe to probe a
193 specific line number.
195 - Tracepoint probes can now also be specified by the target subsystem. For
196 example, the following are all supported:
198 probe kernel.trace("sched:sched_switch") --> probe sched_switch found in the
200 probe kernel.trace("sched:*") --> probe all tracepoints in sched subsystem
202 As a result, tapset functions such as pn() will now return a different string
203 than before. To retain the previous behaviour, use '--compatible=2.6'.
205 - The following functions are deprecated in release 2.7:
206 - _adjtx_mode_str(), _statfs_f_type_str(), _waitid_opt_str(),
207 _internal_wait_opt_str(), and _epoll_events_str().
209 - New tapset functions [u]symfileline(), [u]symfile() and [u]symline() will
210 return a string containing the specified portion of the filename:linenumber
211 match from a given address.
213 Using these functions may result in large generated modules from stored
214 address->file:line information.
216 * What's new in version 2.6, 2014-09-05
218 - SystemTap now supports on-the-fly arming/disarming of certain probe types:
219 kprobes, uprobes, and timer.*s(NUM) probes. For example, this probe
221 probe kernel.function("vfs_read") if (i > 4) { ... }
223 will automatically register/unregister the associated kprobe on vfs_read
224 whenever the value of the condition changes (as some probe handler
225 modifies 'i'). This allows us to avoid probe overhead when we're not
226 interested. If the arming capability is not relevant/useful, nest the
227 condition in the normal probe handler:
229 probe kernel.function("vfs_read") { if (i > 4) { ... } }
231 - statement("*@file:NNN").nearest probes now available to let systemtap
232 translate probe to nearest probe-able line to one given if necessary
234 - process("PATH").library("PATH").plt("NAME").return probes are now supported.
236 - SystemTap now supports SDT probes with operands that refer to symbols.
238 - While in listing mode (-l/-L), probes printed are now more consistent
241 - Statement probes now support enumerated linenos to probe discontiguous
242 linenos using the form:
244 process.statement("foo@file.c:3,5-7,9")
246 - Statement counting is now suppressed in the generated c code for probes that
247 are non-recursive and loop-free. Statement counting can be turned back on in
248 unoptimize mode (-u).
250 - SystemTap now asserts that the PID provided for a process probe corresponds
251 to a running process.
253 - DWARF process probes can be bound to a specific process using the form:
255 process(PID).function("*")
257 - SystemTap now accepts additional scripts through the new -E SCRIPT option.
258 There still needs to be a main script specified through -e or file in order
259 to provide an additional script. This makes it feasible to have scripts in
260 the $HOME/.systemtap/rc file. For example:
262 -E 'probe begin, end, error { log("systemtap script " . pn()) }'
263 -E 'probe timer.s(30) { error ("timeout") }
265 The -E SCRIPT option can also be used in listing mode (-l/-L), such that
266 probe points for the additional scripts will not listed, but other parts of
267 the script are still available, such as macros or aliases.
269 - SystemTap now supports array slicing within foreach loop conditions, delete
270 statements and membership tests. Wildcards are represented by "*". Examples
271 of the expressions are:
273 foreach ([a,b,c] in val[*,2,*])
277 - Integer expressions which are derived from DWARF values, like context $vars,
278 @cast, and @var, will now carry that type information into subsequent reads.
279 Such expressions can now use "->" and "[]" operators, as can local variables
280 which were assigned such values.
282 foo = $param->foo; printf("x:%d y:%d\n", foo->x, foo->y)
283 printf("my value is %d\n", ($type == 42 ? $foo : $bar)->value)
284 printf("my parent pid is %d\n", task_parent(task_current())->tgid)
286 * What's new in version 2.5, 2014-04-30
288 - Systemtap now supports backtracing through its own, invoking module.
290 - Java probes now support backtracing using the print_java_backtrace()
291 and sprint_java_backtrace() functions.
293 - Statement probes (e.g. process.statement) are now faster to resolve,
294 more precise, and work better with inlined functions.
296 - New switches have been added to help inspect the contents of installed
299 stap --dump-functions --> list all library functions and their args
300 stap --dump-probe-aliases --> list all library probe aliases
302 - The heuristic algorithms used to search for function-prologue
303 endings were improved, to cover more optimization (or
304 lack-of-optimization, or incorrect-debuginfo) cases. These
305 heuristics are necessary to find $context parameters for some
306 function-call/entry probes. We recommend programs be built with
307 CFLAGS+=-grecord-gcc-switches to feed information to the heuristics.
309 - The stap --use-server option now more correctly supports address:port
310 type parametrization, for manual use in the absence of avahi.
312 - A new probe alias "oneshot" allows a single quick script fragment to run,
315 - The argv tapset now merges translate-time and run-time positional
316 arguments, so all of these work:
318 stap -e 'probe oneshot {println(argv[1]," ",argv[2])}' hello world
320 stap -e 'probe oneshot {println(argv[1]," ",argv[2])}' \
321 -G argv_1=hello -G argv_2=world
323 staprun hello.ko argv_1=hello argv_2=world
325 - SystemTap now falls back on the symbol table for probing
326 functions in processes if the debuginfo is not available.
328 - SystemTap now supports a %( guru_mode == 0 /* or 1 */ %)
329 conditional for making dual-use scripts.
331 - SystemTap now supports UEFI/SecureBoot systems, via
332 machine-owner-keys maintained by a trusted stap-server on the
333 network. (Key enrollment requires a one-time reboot and BIOS
335 https://sourceware.org/systemtap/wiki/SecureBoot
337 - SystemTap now reports more accurate and succinct errors on type
340 - Embedded-C functions may use STAP_RETURN(value) instead of the
341 more wordy STAP_RETVALUE assignment followed by a "goto out".
342 The macro supports numeric or string values as appropriate.
343 STAP_ERROR(...) is available to return with a (catchable) error.
345 - Some struct-sockaddr fields are now individually decoded for
346 socket-related syscalls:
347 probe syscall.connect { println (uaddr_af, ":", uaddr_ip) }
349 - The documentation for the SystemTap initscript service and the
350 SystemTap compile-server service have been completely converted from
351 README files to man pages (see systemtap(8) and stap-server(8)).
353 - SystemTap is now capable of inserting modules early during the boot
354 process on dracut-based systems. See the 'onboot' command in
355 systemtap(8) for more information.
357 - DWARF probes can now use the '.callee[s]' variants, which allow more
358 precise function probing. For example, the probe point
360 process("myproc").function("foo").callee("bar")
362 will fire upon entering bar() from foo(). A '.callees' probe will
363 instead place probes on all callees of foo().
364 Note that this also means that probe point wildcards should be used
365 with more care. For example, use signal.*.return rather than
366 signal.*.*, which would also match '.callees'. See stapprobes(3stap)
367 for more info. This feature requires at least GCC 4.7.
369 - A few new functions in the task_time tapsets, as well as a new tapset
370 function task_ancestry(), which prints out the parentage of a process.
372 - The kprocess.exec probe has been updated to use syscall.execve, which
373 allows access to the new process' arguments (through the new 'argstr'
374 or 'args' variables) as well as giving better support across kernel
375 versions. Note also that the 'filename' variable now holds the
376 filename (quoted), or the address (unquoted) if it couldn't be
379 - The [s]println() function can now be called without any arguments to
380 simply print a newline.
382 - Suggestions are now provided when markers could not be resolved. For
383 example, process("stap").mark("benchmart") will suggest 'benchmark'.
385 - SystemTap colors can now be turned off by simply setting
386 SYSTEMTAP_COLORS to be empty, rather than having to make it invalid.
388 - There is a new context tapset function, pnlabel(), which returns the
389 name of the label which fired.
391 - The following tapset variables and functions are deprecated in
393 - The 'clone_flags', 'stack_start', 'stack_size',
394 'parent_tid_uaddr', and 'child_tid_uaddr' variables in the
395 'syscall.fork' and 'nd_syscall.fork' probe aliases.
396 - The '_sendflags_str()' and '_recvflags_str()' functions have been
397 deprecated in favor of the new '_msg_flags_str()' function.
398 - The 'flags' and 'flags_str' variables in the 'syscall.accept' and
399 'nd_syscall.accept' probe alias.
400 - The 'first', 'second', and 'uptr_uaddr' variables in the
401 'syscall.compat_sys_shmctl', and 'nd_syscall.compat_sys_shmctl'
402 probe aliases have been deprecated in favor of the new 'shmid',
403 'cmd', and 'buf_uaddr' variables.
405 * What's new in version 2.4, 2013-11-06
407 - Better suggestions are given in many of the semantic errors in which
408 alternatives are provided. Additionally, suggestions are now provided
409 when plt and trace probes could not be resolved. For example,
410 kernel.trace("sched_siwtch") will suggest 'sched_switch'.
412 - SystemTap is now smarter about error reporting. Errors from the same
413 source are considered duplicates and suppressed. A message is
414 displayed on exit if any errors/warnings were suppressed.
416 - Statistics aggregate typed objects are now implemented locklessly,
417 if the translator finds that they are only ever read (using the
418 foreach / @count / etc. constructs) in a probe-begin/end/error.
420 - SystemTap now supports probing inside virtual machines using the
421 libvirt and unix schemes, e.g.
423 stap -ve 'probe timer.s(1) { printf("hello!\n") }' \
424 --remote=libvirt://MyVirtualMachine
426 Virtual machines managed by libvirt can be prepared using stapvirt.
427 See stapvirt(1) and the --remote option in stap(1) for more details.
429 - Systemtap now checks for and uses (when available) the .gnu_debugdata
430 section which contains a subset of debuginfo, useful for backtraces
433 - SystemTap map variables are now allocated with vmalloc() instead of
434 with kmalloc(), which should cause memory to be less fragmented.
436 - Although SystemTap itself requires elfutils 0.148+, staprun only
437 requires elfutils 0.142+, which could be useful with the
438 '--disable-translator' configure switch.
440 - Under FIPS mode (/proc/sys/crypto/fips_enabled=1), staprun will
441 refuse to load systemtap modules (since these are not normally
442 signed with the kernel's build-time keys). This protection may
443 be suppressed with the $STAP_FIPS_OVERRIDE environment variable.
445 - The stap-server client & server code now enable all SSL/TLS
446 ciphers rather than just the "export" subset.
448 - For systems with in-kernel utrace, 'process.end' and 'thread.end'
449 probes will hit before the target's parent process is notified of
450 the target's death. This matches the behavior of newer kernels
451 without in-kernel utrace.
453 * What's new in version 2.3, 2013-07-25
455 - More context-accessing functions throw systemtap exceptions upon a
456 failure, whereas in previous versions they might return non-error
457 sentinel values like "" or "<unknown>". Use try { } / catch { }
458 around these, or new wrapper functions such as user_string_{n_}quoted()
459 that internally absorb exceptions.
461 - java("org.my.MyApp") probes are now restricted to pre-existing jvm pid's with
462 a listing in jps -l output to avoid recursive calls
464 - The tapset [nd_]syscall.semop parameter tsops_uaddr is renamed sops_uaddr for
465 consistency with [nd_]syscall.semtimedop.
467 - The udp.stp tapset adds some ip-address/port variables.
469 - A new guru-mode-only tapset function raise() is available to send signals
472 - Support for the standard Posix ERE named character classes has been
473 added to the regexp engine, e.g. [:digit:], [:alpha:], ...
475 - A substantial internal overhaul of the regexp engine has resulted in
476 correct behaviour on further obscure edge cases. The regexp engine
477 now implements the ERE standard and correctly passes the testsuite
478 for the glibc regexp engine (minus portions corresponding to
479 unimplemented features -- i.e. subexpression capture and reuse).
481 - Alternative functions are now suggested when function probes could not be
482 resolved. For example, kernel.function("vfs_reads") will suggest vfs_read.
483 Other probes for which suggestions are made are module.function,
484 process.function, and process.library.function.
486 - Has life been a bit bland lately? Want to spice things up? Why not write a
487 few faulty probes and feast your eyes upon the myriad of colours adorning
488 your terminal as SystemTap softly whispers in your ear... 'parse error'.
489 Search for '--color' in 'man stap' for more info.
491 - The following tapset functions are deprecated in release 2.3:
492 'stap_NFS_CLIENT', '__getfh_inode', '_success_check',
493 '_sock_prot_num', '_sock_fam_num', '_sock_state_num',
494 '_sock_type_num', and '_sock_flags_num'.
496 * What's new in version 2.2.1, 2013-05-16
497 * What's new in version 2.2, 2013-05-14
499 - Experimental support has been added for probing Java methods using
500 Byteman 2.0 as a backend. Java method probes can target method entries,
501 returns, or specific statements in the method as specified by line number.
503 probe java("org.my.MyApp").class("^java.lang.Object").method("foo(int)")
506 See java/README for information on how to set up Java/Byteman
507 functionality. Set env STAPBM_VERBOSE=yes for more tracing.
509 - The stap -l output and pn() tapset function's return value may be slightly
510 different for complicated web of wildcarded/aliased probes.
512 - The dyninst backend has improved in several aspects:
514 - Setting custom values for global variables is now supported, both
515 with -G when compiling a script, and from the stapdyn command line
516 when loading a precompiled module.
518 - A high-performance shared-memory-based transport is used for
521 - A systemd service file and tmpfile have been added to allow
522 systemtap-server to be managed natively by systemd.
524 - Due to the removal of register_timer_hook in recent kernels, the
525 behaviour of timer.profile has been changed slightly. This probe is
526 now an alias which uses the old mechanism where possible, but falls
527 back to perf.sw.cpu_clock or another mechanism when the kernel timer
528 hook is not available.
530 To require the kernel timer hook mechanism in your script, use
531 timer.profile.tick instead of timer.profile.
533 - The following tapset variables are deprecated in release 2.2:
534 - The 'origin' variables in the 'generic.fop.llseek',
535 'generic.fop.llseek.return', and 'nfs.fop.llseek' probes. The
536 'origin' variable has been replaced by the 'whence' variable.
537 - The 'page_index' variable in the 'vfs.block_sync_page' and
538 'vfs.buffer_migrate_page' probe aliases.
539 - The 'write_from' and 'write_upto' variables in the
540 '_vfs.block_prepare_write' and '_vfs.block_prepare_write.return'
542 - The 'regs' variable in the 'syscall.sigaltstack',
543 'nd_syscall.sigaltstack', 'syscall.fork', and 'nd_syscall.fork'
545 - The 'first', 'second', 'third', and 'uptr_uaddr' variables in the
546 'syscall.compat_sys_shmat' and 'nd_syscall.compat_sys_shmat' probe
549 - The following tapset functions are deprecated in release 2.2:
550 'ppos_pos', '_dev_minor', and '_dev_major'
552 - The folowing tapset functions used to return error strings instead
553 of raising an error. The original behavior is deprecated in release
556 'ctime', 'probemod', 'modname'
558 * What's new in version 2.1, 2013-02-13
560 - EMACS and VIM editor modes for systemtap source files are included / updated.
562 - The translator now eliminates duplicate tapset files between its
563 preferred directory (as configured during the build with --prefix=/
564 or specified with the -I /path option), and files it may find under
565 $XDG_DATA_DIRS. This should eliminate a class of conflicts between
566 parallel system- and hand-built systemtap installations.
568 - The translator accepts a --suppress-time-limits option, which defeats
569 time-related constraints, to allows probe handlers to run for indefinite
570 periods. It requires the guru mode (-g) flag to work. Add the earlier
571 --suppress-handler-errors flag for a gung-ho "just-keep-going" attitude.
573 - Perf event probes may now be read on demand. The counter probe is
574 defined using the counter-name part:
575 probe perf.type(0).config(0).counter("NAME"). The counter is
576 read in a user space probe using @perf("NAME"), e.g.
577 process("PROCESS").statement("func@file") {stat <<< @perf("NAME")}
579 - Perf event probes may now be bound to a specific task using the
580 process-name part: probe perf.type(0).config(0).process("NAME") { }
581 If the probed process name is not specified, then it is inferred
582 from the -c CMD argument.
584 - Some error messages and warnings now refer to additional information
585 that is found in man pages. These are generally named
586 error::FOO or warning::BAR (in the 7stap man page section)
591 - The dyninst backend has improved in several aspects:
592 - The runtime now allows much more concurrency when probing multithreaded
593 processes, and will also follow probes across forks.
594 - Several new probe types are now supported, including timers, function
595 return, and process.begin/end and process.thread.begin/end.
596 - Semaphores for SDT probes are now set properly.
597 - Attaching to existing processes with -x PID now works.
599 - The foreach looping construct can now sort aggregate arrays by the user's
600 choice of aggregating function. Previously, @count was implied. e.g.:
601 foreach ([x,y] in array @sum +) { println(@sum(array[x,y])) }
603 - Proof of concept support for regular expression matching has been added:
604 if ("aqqqqqb" =~ "q*b") { ... }
605 if ("abc" !~ "q*b") { ... }
607 The eventual aim is to support roughly the same functionality as
608 the POSIX Extended Regular Expressions implemented by glibc.
609 Currently missing features include extraction of the matched string
610 and subexpressions, and named character classes ([:alpha:], [:digit:], &c).
612 Special thanks go to the re2c project, whose public domain code this
613 functionality has been based on. For more info on re2c, see:
614 http://sourceforge.net/projects/re2c/
616 - The folowing tapset variables are deprecated in release 2.1 and will
617 be removed in release 2.2:
618 - The 'send2queue' variable in the 'signal.send' probe.
619 - The 'oldset_addr' and 'regs' variables in the 'signal.handle' probe.
621 - The following tapset probes are deprecated in release 2.1 and will
622 be removed in release 2.2:
624 - signal.handle.return
626 * What's new in version 2.0, 2012-10-09
628 - Systemtap includes a new prototype backend, which uses Dyninst to instrument
629 a user's own processes at runtime. This backend does not use kernel modules,
630 and does not require root privileges, but is restricted with respect to the
631 kinds of probes and other constructs that a script may use.
633 Users from source should configure --with-dyninst and install a
634 fresh dyninst snapshot such as that in Fedora rawhide. It may be
635 necessary to disable conflicting selinux checks; systemtap will advise.
637 Select this new backend with the new stap option --runtime=dyninst
638 and a -c target process, along with normal options. (-x target
639 processes are not supported in this prototype version.) For example:
641 stap --runtime=dyninst -c 'stap -l begin' \
642 -e 'probe process.function("main") { println("hi from dyninst!") }'
644 - To aid diagnosis, when a kernel panic occurs systemtap now uses
645 the panic_notifier_list facility to dump a summary of its trace
646 buffers to the serial console.
648 - The systemtap preprocessor now has a simple macro facility as follows:
650 @define add(a,b) %( ((@a)+(@b)) %)
651 @define probegin(x) %(
657 @probegin( foo = @add(40, 2); print(foo) )
659 Macros defined in the user script and regular tapset .stp files are
660 local to the file. To get around this, the tapset library can define
661 globally visible 'library macros' inside .stpm files. (A .stpm file
662 must contain a series of @define directives and nothing else.)
664 The status of the feature is experimental; semantics of macroexpansion
665 may change (unlikely) or expand in the future.
667 - Systemtap probe aliases may be used with additional suffixes
668 attached. The suffixes are passed on to the underlying probe
669 point(s) as shown below:
671 probe foo = bar, baz { }
672 probe foo.subfoo.option("gronk") { }
673 // expands to: bar.subfoo.option("gronk"), baz.subfoo.option("gronk")
675 In practical terms, this allows us to specify additional options to
676 certain tapset probe aliases, by writing e.g.
677 probe syscall.open.return.maxactive(5) { ... }
679 - To support the possibility of separate kernel and dyninst backends,
680 the tapsets have been reorganized into separate folders according to
681 backend. Thus kernel-specific tapsets are located under linux/, the
682 dyninst-specific ones under dyninst/
684 - The backtrace/unwind tapsets have been expanded to allow random
685 access to individual elements of the backtrace. (A caching mechanism
686 ensures that the backtrace computation run at most once for each
687 time a probe fires, regardless of how many times or what order the
688 query functions are called in.) New tapset functions are:
689 stack/ustack - return n'th element of backtrace
690 callers/ucallers - return first n elements of backtrace
691 print_syms/print_usyms - print full information on a list of symbols
692 sprint_syms/sprint_usyms - as above, but return info as a string
694 The following existing functions have been superseded by print_syms()
695 et al.; new scripts are recommended to avoid using them:
701 - The probefunc() tapset function is now myproc-unprivileged, and can
702 now be used in unprivileged scripts for such things as profiling in
703 userspace programs. For instance, try running
704 systemtap.examples/general/para-callgraph.stp in unprivileged mode
705 with a stapusr-permitted probe. The previous implementation of
706 probefunc() is available with "stap --compatible=1.8".
708 - Preprocessor conditional to vary code based on script privilege level:
709 unprivileged -- %( systemtap_privilege == "stapusr" %? ... %)
710 privileged -- %( systemtap_privilege != "stapusr" %? ... %)
711 or, alternately %( systemtap_privilege == "stapsys"
712 || systemtap_privilege == "stapdev" %? ... %)
714 - To ease migration to the embedded-C locals syntax introduced in 1.8
715 (namely, STAP_ARG_* and STAP_RETVALUE), the old syntax can now be
716 re-enabled on a per-function basis using the /* unmangled */ pragma:
718 function add_foo:long(a:long, b:long) %{ /* unmangled */
719 THIS->__retvalue = THIS->a + STAP_ARG_b;
722 Note that both the old and the new syntax may be used in an
723 /* unmangled */ function. Functions not marked /* unmangled */
724 can only use the new syntax.
726 - Adjacent string literals are now glued together irrespective of
727 intervening whitespace or comments:
728 "foo " "bar" --> "foo bar"
729 "foo " /* comment */ "bar" --> "foo bar"
730 Previously, the first pair of literals would be glued correctly,
731 while the second would cause a syntax error.
733 * What's new in version 1.8, 2012-06-17
735 - staprun accepts a -T timeout option to allow less frequent wake-ups
736 to poll for low-throughput output from scripts.
738 - When invoked by systemtap, the kbuild $PATH environment is sanitized
739 (prefixed with /usr/bin:/bin:) in an attempt to exclude compilers
740 other than the one the kernel was presumed built with.
742 - Printf formats can now use "%#c" to escape non-printing characters.
744 - Pretty-printed bitfields use integers and chars use escaped formatting
747 - The systemtap compile-server and client now support IPv6 networks.
748 - IPv6 addresses may now be specified on the --use-server option and will
749 be displayed by --list-servers, if the avahi-daemon service is running and
751 - Automatic server selection will automatically choose IPv4 or IPv6 servers
752 according to the normal server selection criteria when avahi-daemon is
753 running. One is not preferred over the other.
754 - The compile-server will automatically listen on IPv6 addresses, if
756 - To enable IPv6 in avahi-daemon, ensure that /etc/avahi/avahi-daemon.conf
757 contains an active "use-ipv6=yes" line. After adding this line run
758 "service avahi-daemon restart" to activate IPv6 support.
759 - See man stap(1) for details on how to use IPv6 addresses with the
762 - Support for DWARF4 .debug_types sections (for executables and shared
763 libraries compiled with recent GCC's -gdwarf-4 / -fdebug-types-section).
764 PR12997. SystemTap now requires elfutils 0.148+, full .debug_types support
765 depends on elfutils 0.154+.
767 - Systemtap modules are somewhat smaller & faster to compile. Their
768 debuginfo is now suppressed by default; use -B CONFIG_DEBUG_INFO=y to
771 - @var now an alternative language syntax for accessing DWARF variables
772 in uprobe and kprobe handlers (process, kernel, module). @var("somevar")
773 can be used where $somevar can be used. The @var syntax also makes it
774 possible to access non-local, global compile unit (CU) variables by
775 specifying the CU source file as follows @var("somevar@some/src/file.c").
776 This will provide the target variable value of global "somevar" as defined
777 in the source file "some/src/file.c". The @var syntax combines with all
778 normal features of DWARF target variables like @defined(), @entry(),
779 [N] array indexing, field access through ->, taking the address with
780 the & prefix and shallow or deep pretty printing with a $ or $$ suffix.
782 - Stap now has resource limit options:
788 All resource limiting has been moved from the compile server to stap
789 itself. When running the server as "stap-server", default resource
790 limit values are specified in ~stap-server/.systemtap/rc.
792 - Bug CVE-2012-0875 (kernel panic when processing malformed DWARF unwind data)
795 - The systemtap compile-server now supports multiple concurrent connections.
796 Specify the desired maximum number of concurrent connections with
797 the new stap-server/stap-serverd --max-threads option. Specify a
798 value of '0' to tell the server not to spawn any new threads (handle
799 all connections serially in the main thread). The default value is
800 the number of processor cores on the host.
802 - The following tapset functions are deprecated in release 1.8 and will be
803 removed in release 1.9:
806 - SystemTap now mangles local variables to avoid collisions with C
807 headers included by tapsets. This required a change in how
808 embedded-C functions access local parameters and the return value slot.
810 Instead of THIS->foo in an embedded-C function, please use the newly
811 defined macro STAP_ARG_foo (substitute the actual name of the
812 argument for 'foo'); instead of THIS->__retvalue, use the newly
813 defined STAP_RETVALUE. All of the tapsets and test cases have been
814 adapted to use this new notation.
816 If you need to run code which uses the old THIS-> notation, run stap
817 with the --compatible=1.7 option.
819 - There is updated support for user-space probing against kernels >=
820 3.5, which have no utrace but do have the newer inode-uprobes work
821 by Srikar Dronamraju and colleagues. For kernels < 3.5, the
822 following 3 sets of kernel patches would need to be backported to
823 your kernel to use this preliminary user-space probing support:
825 - inode-uprobes patches:
826 - 2b144498350860b6ee9dc57ff27a93ad488de5dc
827 - 7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89
828 - a5f4374a9610fd7286c2164d4e680436727eff71
829 - 04a3d984d32e47983770d314cdb4e4d8f38fccb7
830 - 96379f60075c75b261328aa7830ef8aa158247ac
831 - 3ff54efdfaace9e9b2b7c1959a865be6b91de96c
832 - 35aa621b5ab9d08767f7bc8d209b696df281d715
833 - 900771a483ef28915a48066d7895d8252315607a
834 - e3343e6a2819ff5d0dfc4bb5c9fb7f9a4d04da73
835 - exec tracepoint kernel patch:
836 - 4ff16c25e2cc48cbe6956e356c38a25ac063a64d
837 - task_work_add kernel patches:
838 - e73f8959af0439d114847eab5a8a5ce48f1217c4
839 - 4d1d61a6b203d957777d73fcebf19d90b038b5b2
840 - 413cd3d9abeaef590e5ce00564f7a443165db238
841 - dea649b8ac1861107c5d91e1a71121434fc64193
842 - f23ca335462e3c84f13270b9e65f83936068ec2c
844 * What's new in version 1.7, 2012-02-01
846 - Map inserting and deleting is now significantly faster due to
847 improved hashing and larger hash tables. The hashes are also
848 now randomized to provide better protection against deliberate
851 - Formatted printing is faster by compiling the formatting directives
852 to C code rather than interpreting at run time.
854 - Systemtap loads extra command line options from $SYSTEMTAP_DIR/rc
855 ($HOME/.systemtap/rc by default) before the normal argc/argv. This
856 may be useful to activate site options such as --use-server or
857 --download-debuginfo or --modinfo.
859 - The stap-server has seen many improvements, and is no longer considered
862 - The stap-server service (initscript) now supports four new options:
867 These allow the specification of macro definitions to be passed to stap
868 by the server, the location of the log file, network port number and
869 NSS certificate database location respectively. These options are also
870 supported within individual server configuration files. See stap-server
871 and initscript/README.stap-server for details. The stap-server is no
872 longer activated by default.
874 - process("PATH").[library("PATH")].function("NAME").exported probes are now
875 supported to filter function() to only exported instances.
877 - The translator supports a new --suppress-handler-errors option, which
878 causes most runtime errors to be turned into quiet skipped probes. This
879 also disables the MAXERRORS and MAXSKIPPED limits.
881 - Translator warnings have been standardized and controlled by the -w / -W
884 - The translator supports a new --modinfo NAME=VALUE option to emit additional
885 MODULE_INFO(n,v) macros into the generated code.
887 - There is no more fixed maximum number of VMA pages that will be tracked
888 at runtime. This reduces memory use for those scripts that don't need any,
889 or only limited target process VMA tracking and allows easier system
890 wide probes inspecting shared library variables and/or user backtraces.
891 stap will now silently ignore -DTASK_FINDER_VMA_ENTRY_ITEMS.
893 - The tapset functions remote_id() and remote_uri() identify the member of a
894 swarm of "stap --remote FOO --remote BAR baz.stp" concurrent executions.
896 - Systemtap now supports a new privilege level and group, "stapsys", which
897 is equivalent to the privilege afforded by membership in the group "stapdev",
898 except that guru mode (-g) functionality may not be used. To support this, a
899 new option, --privilege=[stapusr|stapsys|stapdev] has been added.
900 --privilege=stapusr is equivalent to specifying the existing --unprivileged
901 option. --privilege=stapdev is the default. See man stap(1) for details.
903 - Scripts that use kernel.trace("...") probes compile much faster.
905 - The systemtap module cache is cleaned less frequently, governed by the
906 number of seconds in the $SYSTEMTAP_DIR/cache/cache_clean_interval_s file.
908 - SDT can now define up to 12 arguments in a probe point.
910 - Parse errors no longer generate a cascade of false errors. Instead, a
911 parse error skips the rest of the current probe or function, and resumes
912 at the next one. This should generate fewer and better messages.
914 - Global array wrapping is now supported for both associative and statistics typed
915 arrays using the '%' character to signify a wrapped array. For example,
916 'global foo%[100]' would allow the array 'foo' to be wrapped if more than 100
917 elements are inserted.
919 - process("PATH").library("PATH").plt("NAME") probes are now supported.
920 Wildcards are supported in the plt-name part, to refer to any function in the
921 program linkage table which matches the glob pattern and the rest of the
924 - A new option, --dump-probe-types, will dump a list of supported probe types.
925 If --unprivileged is also specified, the list will be limited to probe types
926 which are available to unprivileged users.
928 - Systemtap can now automatically download the required debuginfo
929 using abrt. The --download-debuginfo[=OPTION] can be used to
930 control this feature. Possible values are: 'yes', 'no', 'ask',
931 and a positive number representing the timeout desired. The
932 default behavior is to not automatically download the debuginfo.
934 - The translator has better support for probing C++ applications by
935 better undertanding of compilation units, nested types, templates,
936 as used in probe point and @cast constructs.
938 - On 2.6.29+ kernels, systemtap can now probe kernel modules that
939 arrive and/or depart during the run-time of a session. This allows
940 probing of device driver initialization functions, which had formerly been
943 - New tapset functions for cpu_clock and local_clock access were added.
945 - There is some limited preliminary support for user-space probing
946 against kernels such as linux-next, which have no utrace but do have
947 the newer inode-uprobes work by Srikar Dronamraju and colleagues.
949 - The following probe types are deprecated in release 1.7 and will be
950 removed in release 1.8:
951 kernel.function(number).inline
952 module(string).function(number).inline
953 process.function(number).inline
954 process.library(string).function(number).inline
955 process(string).function(number).inline
956 process(string).library(string).function(number).inline
958 - The systemtap-grapher is deprecated in release 1.7 and will be removed in
961 - The task_backtrace() tapset function was deprecated in 1.6 and has been
964 - MAXBACKTRACE did work in earlier releases, but has now been documented
965 in the stap 1 manual page.
967 - New tapset function probe_type(). Returns a short string describing
968 the low level probe handler type for the current probe point.
970 - Both unwind and symbol data is now only collected and emitted for
971 scripts actually using backtracing or function/data symbols.
972 Tapset functions are marked with /* pragma:symbols */ or
973 /* pragma:unwind */ to indicate they need the specific data.
975 - Kernel backtraces can now be generated for non-pt_regs probe context
976 if the kernel support dump_trace(). This enables backtraces from
977 certain timer probes and tracepoints.
979 - ubacktrace() should now also work for some kernel probes on x86 which can
980 use the dwarf unwinder to recover the user registers to provide
981 more accurate user backtraces.
983 - For s390x the systemtap runtime now properly splits kernel and user
984 addresses (which are in separate address spaces on that architecture)
985 which enable user space introspection.
987 - ppc and s390x now supports user backtraces through the DWARF unwinder.
989 - ppc now handles function descriptors as symbol names correctly.
991 - arm support kernel backtraces through the DWARF unwinder.
993 - arm now have a uprobes port which enables user probes. This still
994 requires some kernel patches (user_regsets and tracehook support for
997 - Starting in release 1.7, these old variables will be deprecated:
998 - The 'pid' variable in the 'kprocess.release' probe has been
999 deprecated in favor of the new 'released_pid' variable.
1000 - The 'args' variable in the
1001 '_sunrpc.clnt.create_client.rpc_new_client_inline' probe has been
1002 deprecated in favor of the new internal-only '__args' variable.
1004 - Experimental support for recent kernels without utrace has been
1005 added for the following probe types:
1008 process("PATH").begin
1010 process(PID).thread.begin
1011 process("PATH").thread.begin
1012 process.thread.begin
1016 process(PID).thread.end
1017 process("PATH").thread.end
1019 process(PID).syscall
1020 process("PATH").syscall
1022 process(PID).syscall.return
1023 process("PATH").syscall.return
1024 process.syscall.return
1026 - staprun disables kprobe-optimizations in recent kernels, as problems
1027 were found. (PR13193)
1029 * What's new in version 1.6, 2011-07-25
1031 - Security fixes for CVE-2011-2503: read instead of mmap to load modules,
1032 CVE-2011-2502: Don't allow path-based auth for uprobes
1034 - The systemtap compile-server no longer uses the -k option when calling the
1035 translator (stap). As a result, the server will now take advantage of the
1036 module cache when compiling the same script more than once. You may observe
1037 an improvement in the performance of the server in this situation.
1039 - The systemtap compile-server and client now each check the version of the
1040 other, allowing both to adapt when communicating with a down-level
1041 counterpart. As a result, all version of the client can communicate
1042 with all versions of the server and vice-versa. Client will prefer newer
1043 servers when selecting a server automatically.
1045 - SystemTap has improved support for the ARM architecture. The
1046 kread() and kwrite() operations for ARM were corrected allowing many
1047 of the tapsets probes and function to work properly on the ARM
1050 - Staprun can now rename the module to a unique name with the '-R' option before
1051 inserting it. Systemtap itself will also call staprun with '-R' by default.
1052 This allows the same module to be inserted more than once, without conflicting
1055 - Systemtap error messages now provide feedback when staprun or any other
1056 process fails to launch. This also specifically covers when the user
1057 doesn't have the proper permissions to launch staprun.
1059 - Systemtap will now map - to _ in module names. Previously,
1060 stap -L 'module("i2c-core").function("*")' would be empty. It now returns
1061 a list had stap -L 'module("i2c_core").function("*") been specified.
1063 - Systemtap now fills in missing process names to probe points, to
1064 avoid having to name them twice twice:
1065 % stap -e 'probe process("a.out").function("*") {}' -c 'a.out ...'
1066 Now the probed process name is inferred from the -c CMD argument.
1067 % stap -e 'probe process.function("*") {}' -c 'a.out ...'
1069 - stap -L 'process("PATH").syscall' will now list context variables
1071 - Depends on elfutils 0.142+.
1073 - Deprecated task_backtrace:string (task:long). This function will go
1074 away after 1.6. Please run your scripts with stap --check-version.
1076 * What's new in version 1.5, 2011-05-23
1078 - Security fixes for CVE-2011-1781, CVE-2011-1769: correct DW_OP_{mod,div}
1079 division-by-zero bug
1081 - The compile server and its related tools (stap-gen-ert, stap-authorize-cert,
1082 stap-sign-module) have been re-implemented in C++. Previously, these
1083 components were a mix of bash scripts and C code. These changes should be
1084 transparent to the end user with the exception of NSS certificate database
1085 password prompting (see below). The old implementation would prompt more
1086 than once for the same password in some situations.
1088 - eventcount.stp now allows for event counting in the format of
1089 'stap eventcount.stp process.end syscall.* ...', and also reports
1090 corresponding event tid's.
1092 - Systemtap checks that the build-id of the module being probed matches the
1093 build-id saved in the systemtap module. Invoking systemtap with
1094 -DSTP_NO_BUILDID_CHECK will bypass this build-id runtime verification. See
1095 man ld(1) for info on --build-id.
1097 - stapio will now report if a child process has an abnormal exit along with
1098 the associated status or signal.
1100 - Compiler optimization may sometimes result in systemtap not being able to
1101 access a user-space probe argument. Compiling the application with
1102 -DSTAP_SDT_ARG_CONSTRAINT=nr will force the argument to be an immediate or
1103 register value which should enable systemtap to access the argument.
1105 - GNU Gettext has now been intergrated with systemtap. Our translation
1106 page can be found at http://www.transifex.net/projects/p/systemtap/ .
1107 "make update-po" will generate the necessary files to use translated
1108 messages. Please refer to the po/README file for more info and
1109 please consider contributing to this I18N effort!
1111 - The new addr() function returns the probe's instruction pointer.
1113 - process("...").library("...") probes are now supported. Wildcards
1114 are supported in the library-name part, to refer to any shared
1115 library that is required by process-name, which matches the glob
1116 pattern and the rest of the probe point.
1118 - The "--remote USER@HOST" functionality can now be specified multiple times
1119 to fan out on multiple targets. If the targets have distinct kernel and
1120 architecture configurations, stap will automatically build the script
1121 appropriately for each one. This option is also no longer considered
1124 - The NSS certificate database generated for use by the compile server is now
1125 generated with no password. Previously, a random password was generated and
1126 used to access the database. This change should be transparent to most users.
1127 However, if you are prompted for a password when using systemtap, then
1128 running $libexecdir/stap-gen-cert should correct the problem.
1130 - The timestamp tapset includes jiffies() and HZ() for lightweight approximate
1133 - A powerful new command line option --version has been added.
1135 - process.mark now supports $$parms for reading probe parameters.
1137 - A new command line option, --use-server-on-error[=yes|no] is available
1138 for stap. It instructs stap to retry compilation of a script using a
1139 compile server if it fails on the local host. The default setting
1142 - The following deprecated tools have been removed:
1144 stap-authorize-server-cert
1145 stap-authorize-signing-cert
1146 stap-find-or-start-server
1148 Use the --use-server, --trust-server and --list-servers options of stap
1151 * What's new in version 1.4, 2011-01-17
1153 - Security fixes for CVE-2010-4170, CVE-2010-4171: staprun module
1156 - A new /* myproc-unprivileged */ marker is now available for embedded C
1157 code and and expressions. Like the /* unprivileged */ marker, it makes
1158 the code or expression available for use in unprivileged mode (see
1159 --unprivileged). However, it also automatically adds a call to
1160 assert_is_myproc() to the code or expression, thus, making it available
1161 to the unprivileged user only if the target of the current probe is within
1162 the user's own process.
1164 - The experimental "--remote USER@HOST" option will run pass 5 on a given
1165 ssh host, after building locally (or with --use-server) for that target.
1167 - Warning messages from the script may now be suppressed with the stap
1168 and/or staprun -w option. By default, duplicate warning messages are
1169 suppressed (up to a certain limit). With stap --vp 00002 and above,
1170 the duplicate elimination is defeated.
1172 - The print_ubacktrace and usym* functions attempt to print the full
1173 path of the user-space binaries' paths, instead of just the basename.
1174 The maximum saved path length is set by -DTASK_FINDER_VMA_ENTRY_PATHLEN,
1175 default 64. Warning messages are produced if unwinding fails due to
1176 a missing 'stap -d MODULE' option, providing preloaded unwind data.
1178 - The new tz_ctime() tapset function prints times in the local time zone.
1180 - More kernel tracepoints are accessible to the kernel.trace("...") mechanism,
1181 if kernel source trees or debuginfo are available. These formerly "hidden"
1182 tracepoints are those that are declared somewhere other than the usual
1183 include/linux/trace/ headers, such as xfs and kvm.
1185 - debuginfo-based process("...").function/.statement/.mark probes support
1186 wildcards in the process-name part, to refer to any executable files that
1187 match the glob pattern and the rest of the probe point.
1189 - The -t option now displays information per probe-point rather than a summary
1190 for each probe. It also now shows the derivation chain for each probe-point.
1192 - A rewrite of the sys/sdt.h header file provides zero-cost startup (few or
1193 no ELF relocations) for the debuginfo-less near-zero-cost runtime probes.
1194 Binaries compiled with earlier sdt.h versions remain supported. The
1195 stap -L (listing) option now lists parameters for sys/sdt.h markers.
1197 - The implementation of the integrated compile-server client has been
1199 o --use-server now accepts an argument representing a particular server and
1200 may be specified more than once.
1201 o --list-servers now accepts an expanded range of arguments.
1202 o a new --trust-servers option has been added to stap to replace several
1203 old certificate-management scripts.
1204 o The following tools are now deprecated and will be removed in release 1.5:
1206 stap-authorize-server-cert
1207 stap-authorize-signing-cert
1208 stap-find-or-start-server
1210 See man stap(1) for complete details.
1212 - The compile-server now returns the uprobes.ko to the client when it is
1213 required by the script being compiled. The integrated compile-server client
1214 now makes it available to be loaded by staprun. The old (deprecated)
1215 stap-client does not do this.
1217 - process probes with scripts as the target are recognized by stap and the
1218 interpreter would be selected for probing.
1220 - Starting in release 1.5, these old variables/functions will be deprecated
1221 and will only be available when the '--compatible=1.4' flag is used:
1223 - In the 'syscall.add_key' probe, the 'description_auddr' variable
1224 has been deprecated in favor of the new 'description_uaddr'
1226 - In the 'syscall.fgetxattr', 'syscall.fsetxattr',
1227 'syscall.getxattr', 'syscall.lgetxattr', and
1228 'syscall.lremovexattr' probes, the 'name2' variable has been
1229 deprecated in favor of the new 'name_str' variable.
1230 - In the 'nd_syscall.accept' probe the 'flag_str' variable
1231 has been deprecated in favor of the new 'flags_str' variable.
1232 - In the 'nd_syscall.dup' probe the 'old_fd' variable has been
1233 deprecated in favor of the new 'oldfd' variable.
1234 - In the 'nd_syscall.fgetxattr', 'nd_syscall.fremovexattr',
1235 'nd_syscall.fsetxattr', 'nd_syscall.getxattr', and
1236 'nd_syscall.lremovexattr' probes, the 'name2' variable has been
1237 deprecated in favor of the new 'name_str' variable.
1238 - The tapset alias 'nd_syscall.compat_pselect7a' was misnamed. It should
1239 have been 'nd_syscall.compat_pselect7' (without the trailing 'a').
1240 - The tapset function 'cpuid' is deprecated in favor of the better known
1242 - In the i386 'syscall.sigaltstack' probe, the 'ussp' variable has
1243 been deprecated in favor of the new 'uss_uaddr' variable.
1244 - In the ia64 'syscall.sigaltstack' probe, the 'ss_uaddr' and
1245 'oss_uaddr' variables have been deprecated in favor of the new
1246 'uss_uaddr' and 'uoss_uaddr' variables.
1247 - The powerpc tapset alias 'syscall.compat_sysctl' was deprecated
1248 and renamed 'syscall.sysctl32'.
1249 - In the x86_64 'syscall.sigaltstack' probe, the 'regs_uaddr'
1250 variable has been deprecated in favor of the new 'regs' variable.
1252 * What's new in version 1.3, 2010-07-21
1254 - The uprobes kernel module now has about half the overhead when probing
1255 NOPs, which is particularly relevant for sdt.h markers.
1257 - New stap option -G VAR=VALUE allows overriding global variables
1258 by passing the settings to staprun as module options.
1260 - The tapset alias 'syscall.compat_pselect7a' was misnamed. It should
1261 have been 'syscall.compat_pselect7' (without the trailing 'a').
1262 Starting in release 1.4, the old name will be deprecated and
1263 will only be available when the '--compatible=1.3' flag is used.
1265 - A new procfs parameter .umask(UMASK) which provides modification of
1266 file permissions using the proper umask value. Default file
1267 permissions for a read probe are 0400, 0200 for a write probe, and
1268 0600 for a file with a read and write probe.
1270 - It is now possible in some situations to use print_ubacktrace() to
1271 get a user space stack trace from a kernel probe point. e.g. for
1272 user backtraces when there is a pagefault:
1273 $ stap -d /bin/sort --ldd -e 'probe vm.pagefault {
1274 if (pid() == target()) {
1275 printf("pagefault @0x%x\n", address); print_ubacktrace();
1278 pagefault @0x7fea0595fa70
1279 0x000000384f07f958 : __GI_strcmp+0x12b8/0x1440 [libc-2.12.so]
1280 0x000000384f02824e : __gconv_lookup_cache+0xee/0x5a0 [libc-2.12.so]
1281 0x000000384f021092 : __gconv_find_transform+0x92/0x2cf [libc-2.12.so]
1282 0x000000384f094896 : __wcsmbs_load_conv+0x106/0x2b0 [libc-2.12.so]
1283 0x000000384f08bd90 : mbrtowc+0x1b0/0x1c0 [libc-2.12.so]
1284 0x0000000000404199 : ismbblank+0x39/0x90 [sort]
1285 0x0000000000404a4f : inittables_mb+0xef/0x290 [sort]
1286 0x0000000000406934 : main+0x174/0x2510 [sort]
1287 0x000000384f01ec5d : __libc_start_main+0xfd/0x1d0 [libc-2.12.so]
1288 0x0000000000402509 : _start+0x29/0x2c [sort]
1291 - New tapset functions to get a string representation of a stack trace:
1292 sprint_[u]backtrace() and sprint_[u]stack().
1294 - New tapset function to get the module (shared library) name for a
1295 user space address umodname:string(long). The module name will now
1296 also be in the output of usymdata() and in backtrace addresses even
1297 when they were not given with -d at the command line.
1299 - Kernel backtraces are now much faster (replaced a linear search
1300 with a binary search).
1302 - A new integrated compile-server client is now available as part of stap.
1304 o 'stap --use-server ...' is equivalent to 'stap-client ...'
1305 o 'stap --list-servers' is equivalent to 'stap-find-servers'
1306 o 'stap --list-servers=online' is equivalent to 'stap-find-servers --all'
1307 o stap-client and its related tools will soon be deprecated.
1308 o the nss-devel and avahi-devel packages are required for building stap with
1309 the integrated client (checked during configuration).
1310 o nss and avahi are required to run the integrated client.
1312 - A new operator @entry is available for automatically saving an expression
1313 at entry time for use in a .return probe.
1314 probe foo.return { println(get_cycles() - @entry(get_cycles())) }
1316 - Probe $target variables and @cast() can now use a suffix to print complex
1317 data types as strings. Use a single '$' for a shallow view, or '$$' for a
1318 deeper view that includes nested types. For example, with fs_struct:
1319 $fs$ : "{.users=%i, .lock={...}, .umask=%i,
1320 .in_exec=%i, .root={...}, .pwd={...}}"
1321 $fs$$ : "{.users=%i, .lock={.raw_lock={.lock=%u}}, .umask=%i, .in_exec=%i,
1322 .root={.mnt=%p, .dentry=%p}, .pwd={.mnt=%p, .dentry=%p}}"
1324 - The <sys/sdt.h> user-space markers no longer default to an implicit
1325 MARKER_NAME_ENABLED() semaphore check for each marker. To check for
1326 enabled markers use a .d declaration file, then:
1327 if (MARKER_NAME_ENABLED()) MARKER_NAME()
1329 - Hyphenated <sys/sdt.h> marker names such as process(...).mark("foo-bar")
1330 are now accepted in scripts. They are mapped to the double-underscore
1333 - More robust <sys/sdt.h> user-space markers support is included. For
1334 some platforms (x86*, ppc*), this can let systemtap probe the markers
1335 without debuginfo. This implementation also supports preserving
1336 the "provider" name associated with a marker:
1337 probe process("foo").provider("bar").mark("baz") to match
1338 STAP_PROBE<n>(bar, baz <...>)
1339 (Compile with -DSTAP_SDT_V1 to revert to the previous implementation.
1340 Systemtap supports pre-existing or new binaries using them.)
1342 - Embedded-C may be used within expressions as values, when in guru mode:
1343 num = %{ LINUX_VERSION_CODE %} // int64_t
1344 name = %{ /* string */ THIS_MODULE->name %} // const char*
1345 printf ("%s %x\n", name, num)
1346 The usual /* pure */, /* unprivileged */, and /* guru */ markers may be used
1347 as with embedded-C functions.
1349 - By default the systemtap-runtime RPM builds now include a shared
1350 library, staplog.so, that allows crash to extract systemtap data from
1353 - Iterating with "foreach" can now explicitly save the value for the loop.
1354 foreach(v = [i,j] in array)
1355 printf("array[%d,%s] = %d\n", i, j, v /* array[i,j] */)
1357 - The new "--ldd" option automatically adds any additional shared
1358 libraries needed by probed or -d-listed userspace binaries to the -d
1359 list, to enable symbolic backtracing through them. Similarly, the
1360 new "--all-modules" option automatically adds any currently loaded
1361 kernel modules (listed in /proc/modules) to the -d list.
1363 - A new family of set_kernel_* functions make it easier for gurus to write
1364 new values at arbitrary memory addresses.
1366 - Probe wildcards can now use '**' to cross the '.' separator.
1367 $ stap -l 'sys**open'
1371 - Backward compatibility flags (--compatible=VERSION, and matching
1372 script preprocessing predicate %( systemtap_v CMP "version" %)
1373 and a deprecation policy are being introduced, in case future
1374 tapset/language changes break valid scripts.
1376 * What's new in version 1.2, 2010-03-22
1378 - Prototype support for "perf events", where the kernel supports the
1379 2.6.33 in-kernel API. Probe points may refer to low-level
1380 perf_event_attr type/config numbers, or to a number of aliases
1381 defined in the new perf.stp tapset:
1382 probe perf.sw.cpu_clock, perf.type(0).config(4) { }
1384 - Type-casting can now use multiple headers to resolve codependencies.
1385 @cast(task, "task_struct",
1386 "kernel<linux/sched.h><linux/fs_struct.h>")->fs->umask
1388 - Tapset-related man pages have been renamed. 'man -k 3stap' should show
1389 the installed list, which due to prefixing should no longer collide over
1390 ordinary system functions.
1392 - User space marker arguments no longer use volatile if the version of gcc,
1393 which must be at least 4.5.0, supports richer DWARF debuginfo. Use cflags
1394 -DSTAP_SDT_VOLATILE=volatile or -DSTAP_SDT_VOLATILE= when building
1395 the sys/sdt.h application to override this one way or another.
1397 - A new construct for error handling is available. It is similar to c++
1398 exception catching, using try and catch as new keywords. Within a handler
1399 or function, the following is valid and may be nested:
1400 try { /* arbitrary statements */ }
1401 catch (er) { /* e.g. println("caught error ", er) */ }
1403 - A new command line flag '-W' forces systemtap to abort translation of
1404 a script if any warnings are produced. It is similar to gcc's -Werror.
1405 (If '-w' is also supplied to suppress warnings, it wins.)
1407 - A new predicate @defined is available for testing whether a
1408 particular $variable/expression is resolvable at translate time:
1409 probe foo { if (@defined($bar)) log ("$bar is available here") }
1411 - Adjacent string literals are glued together, making this
1413 probe process("/usr" @1 "/bin").function("*") { ... }
1415 - In order to limit potential impact from future security problems,
1416 the stap-server process does not permit its being launched as root.
1418 - On recent kernels, for some architectures/configurations, hardware
1419 breakpoint probes are supported. The probe point syntax is:
1421 probe kernel.data(ADDRESS).write
1422 probe kernel.data(ADDRESS).length(LEN).write
1423 probe kernel.data("SYMBOL_NAME").write
1425 * What's new in version 1.1, 2010-01-15
1427 - New tracepoint based tapset for memory subsystem.
1429 - The loading of signed modules by staprun is no longer allowed for
1430 ordinary, unprivileged users. This means that only root, members of
1431 the group 'stapdev' and members of the group 'stapusr' can load
1432 systemtap modules using staprun, stap or stap-client. The minimum
1433 privilege required to run arbitrary --unprivileged scripts is now
1434 'stapusr' membership.
1436 - The stap-server initscript is available. This initscript allows you
1437 to start systemtap compile servers as a system service and to manage
1438 these servers as a group or individually. The stap-server initscript
1439 is installed by the systemtap-server rpm. The build directory for
1440 the uprobes module (/usr/share/systemtap/runtime/uprobes) is made
1441 writable by the 'stap-server' group. All of the files generated when
1442 building the uprobes module, including the digital signature, are
1443 also writable by members of stap-server.
1445 See initscript/README.stap-server for details.
1447 - Some of the compile server client, server and certificate management
1448 tools have been moved from $bindir to $libexecdir/systemtap.
1449 You should use the new stap-server script or the stap-server initscript
1450 for server management where possible. The stap-server script provides the same
1451 functionality as the stap-server initscript except that the servers are
1452 run by the invoking user by default as opposed to servers started by the
1453 stap-server initscript which are run by the user stap-server
1454 by default. See stap-server(8) for more information.
1456 You may continue to use these tools by adding $libexecdir/systemtap to
1457 your path. You would need to do this, for example, if you are not root,
1458 you want to start a compile server and you are not running systemtap from a
1459 private installation. In this case you still need to use stap-start-server.
1461 - Any diagnostic output line that starts with "ERROR", as in
1462 error("foo"), will promote a "Pass 5: run failed", and the return
1465 - Systemtap now warns about global variables being referenced from other
1466 script files. This aims to protect against unintended local-vs-global
1467 namespace collisions such as:
1469 % cat some_tapset.stp
1470 probe baz.one = bar { foo = $foo; bar = $bar }
1471 % cat end_user_script.stp
1472 global foo # intended to be private variable
1473 probe timer.s(1) { foo ++ }
1474 probe baz.* { println(foo, pp()) }
1475 % stap end_user_script.stp
1476 WARNING: cross-file global variable reference to foo from some_tapset.stp
1478 - Preprocessor conditional for kernel configuration testing:
1479 %( CONFIG_foo == "y" %? ... %)
1481 - ftrace(msg:string) tapset function to send strings to the system-wide
1482 ftrace ring-buffer (if any).
1484 - Better support for richer DWARF debuginfo output from GCC 4.5
1485 (variable tracking assignments). Kernel modules are now always resolved
1486 against all their dependencies to find any info referring to missing
1487 symbols. DW_AT_const_value is now supported when no DW_AT_location
1490 * What's new in verson 1.0, 2009-09-22
1492 - process().mark() probes now use an enabling semaphore to reduce the
1493 computation overhead of dormant probes.
1495 - The function spec for dwarf probes now supports C++ scopes, so you can
1496 limit the probes to specific namespaces or classes. Multiple scopes
1497 can be specified, and they will be matched progressively outward.
1498 probe process("foo").function("std::vector<*>::*") { }
1499 probe process("foo").function("::global_function") { }
1501 - It is now possible to cross-compile systemtap scripts for foreign
1502 architectures, using the new '-a ARCH' and '-B OPT=VALUE' flags.
1503 For example, put arm-linux-gcc etc. into your $PATH, and point
1504 systemtap at the target kernel build tree with:
1505 stap -a arm -B CROSS_COMPILE=arm-linux- -r /build/tree [...]
1506 The -B option is passed to kbuild make. -r identifies the already
1507 configured/built kernel tree and -a its architecture (kbuild ARCH=...).
1508 Systemtap will infer -p4.
1510 - Cross compilation using the systemtap client and server
1511 - stap-start-server now accepts the -r, -R, -I, -B and -a options in
1512 order to start a cross compiling server. The server will correctly
1513 advertise itself with respect to the kernel release and architecture
1514 that it compiles for.
1515 - When specified on stap-client, the -r and -a options will be
1516 considered when searching for a suitable server.
1518 - When using the systemtap client and server udp port 5353 must be open
1519 in your firewall in order for the client to find servers using
1520 avahi-browse. Also the systemtap server will choose a random port in
1521 the range 1024-63999 for accepting ssl connections.
1523 - Support for unprivileged users:
1524 ***********************************************************************
1525 * WARNING!!!!!!!!!! *
1526 * This feature is EXPERIMENTAL at this time and should be used with *
1527 * care. This feature allows systemtap kernel modules to be loaded by *
1528 * unprivileged users. The user interface and restrictions will change *
1529 * as this feature evolves. *
1530 ***********************************************************************
1531 - Systemtap modules generated from scripts which use a restricted
1532 subset of the features available may be loaded by staprun for
1533 unprivileged users. Previously, staprun would load modules only for
1534 root or for members of the groups stapdev and stapusr.
1535 - Using the --unprivileged option on stap enables translation-time
1536 checking for use by unprivileged users (see restrictions below).
1537 - All modules deemed suitable for use by unprivileged users will be
1538 signed by the systemtap server when --unprivileged is specified on
1539 stap-client. See module signing in release 0.9.8 and stap-server in
1541 - Modules signed by trusted signers (servers) and verified by staprun
1542 will be loaded by staprun regardless of the user's privilege level.
1543 - The system administrator asserts the trustworthiness of a signer
1544 (server) by running stap-authorize-signing-cert <cert-file> as root,
1545 where the <cert-file> can be found in
1546 ~<user>/.systemtap/ssl/server/stap.cert for servers started by
1547 ordinary users and in $sysconfdir/systemtap/ssl/server/stap.cert for
1548 servers started by root.
1549 - Restrictions are intentionally strict at this time and may be
1550 relaxed in the future:
1551 - probe points are restricted to:
1552 begin, begin(n), end, end(n), error, error(n), never,
1553 timer.{jiffies,s,sec,ms,msec,us,usec,ns,nsec}(n)*, timer.hz(n),
1554 process.* (for processes owned by the user).
1555 - use of embedded C code is not allowed.
1556 - use of tapset functions is restricted.
1557 - some tapset functions may not be used at all. A message will be
1558 generated at module compilation time.
1559 - some actions by allowed tapset functions may only be performed
1560 in the context of the user's own process. A runtime fault will
1561 occur in these situations, for example, direct memory access.
1562 - The is_myproc() tapset function has been provided so that
1563 tapset writers for unprivileged users can check that the
1564 context is of the users own process before attempting these
1566 - accessing the kernel memory space is not allowed.
1567 - The following command line options may not be used by stap-client
1569 - The following environment variables are ignored by stap-client:
1570 SYSTEMTAP_RUNTIME, SYSTEMTAP_TAPSET, SYSTEMTAP_DEBUGINFO_PATH
1571 - nss and nss-tools are required to use this feature.
1573 - Support output file switching by SIGUSR2. Users can command running
1574 stapio to switch output file by sending SIGUSR2.
1576 - Memory consumption for scripts involving many uprobes has been
1577 dramatically reduced.
1579 - The preprocessor now supports || and && in the conditions.
1580 e.g. %( arch == "x86_64" || arch == "ia64" %: ... %)
1582 - The systemtap notion of "architecture" now matches the kernel's, rather
1583 than that of "uname -m". This means that 32-bit i386 family are all
1584 known as "i386" rather than "i386" or "i686"; "ppc64" as "powerpc";
1585 "s390x" as "s390", and so on. This is consistent between the new
1586 "-a ARCH" flag and the script-level %( arch ... %) conditional.
1588 - It is now possible to define multiple probe aliases with the same name.
1589 A probe will expand to all matching aliases.
1592 probe foo { } # expands twice, once to bar and once to baz
1594 - A new experimental transport mechanism, using ftrace's ring_buffer,
1595 has been added. This may become the default transport mechanism in
1596 future versions of systemtap. To test this new transport mechanism,
1597 define 'STP_USE_RING_BUFFER'.
1599 - Support for recognizing DW_OP_{stack,implicit}_value DWARF expressions
1600 as emitted by GCC 4.5.
1602 * What's new in version 0.9.9, 2009-08-04
1604 - Systemwide kernel .function.return (kretprobe) maxactive defaults may
1605 be overridden with the -DKRETACTIVE=nnn parameter.
1607 - Translation pass 2 is significantly faster by avoiding unnecessary
1608 searching through a kernel build/module directory tree.
1610 - When compiled against elfutils 0.142 systemtap now handles the new
1611 DW_OP_call_frame_CFA generated by by GCC.
1613 - uprobes and ustack() are more robust when used on applications that
1614 depend on prelinked/separate debuginfo shared libraries.
1616 - User space PROBE marks are not always found with or without separate
1617 debuginfo. The .probes section itself is now always put in the main
1618 elf file and marked as allocated. When building pic code the section
1619 is marked writable. The selinux memory check problems seen with
1620 programs using STAP_PROBES is fixed.
1622 - statement() probes can now override "address not at start of statement"
1623 errors in guru mode. They also provide alternative addresses to use
1626 - The stapgraph application can generate graphs of data and events
1627 emitted by systemtap scripts in real time. Run "stapgraph
1628 testsuite/systemtap.examples/general/grapher.stp" for an example of
1629 graphing the system load average and keyboard events.
1631 - Dwarf probes now show parameters and local variables in the verbose
1634 - Symbol aliases are now resolved to their canonical dwarf names. For
1635 example, probing "malloc" in libc resolves to "__libc_malloc".
1637 - The syntax for dereferencing $target variables and @cast() gained new
1639 - Array indexes can now be arbitrary numeric expressions.
1640 - Array subscripts are now supported on pointer types.
1641 - An '&' operator before a @cast or $target returns the address of the
1642 final component, especially useful for nested structures.
1644 - For reading all probe variables, kernel.mark now supports $$vars and
1645 $$parms, and process.syscall now supports $$vars.
1647 - The SNMP tapset provides probes and functions for many network
1648 statistics. See stapprobes.snmp(3stap) for more details.
1650 - The dentry tapset provides functions to map kernel VFS directory entries
1651 to file or full path names: d_path(), d_name() and reverse_path_walk().
1653 - SystemTap now has userspace markers in its own binaries, and the stap
1654 tapset provides the available probepoints and local variables.
1656 - Miscellaneous new tapset functions:
1657 - pgrp() returns the process group ID of the current process
1658 - str_replace() performs string replacement
1660 * What's new in version 0.9.8, 2009-06-11
1662 - Miscellaneous new tapset functions:
1663 - sid() returns the session ID of the current process
1664 - stringat() indexes a single character from a string.
1666 - Using %M in print formats for hex dumps can now print entire buffers,
1667 instead of just small numbers.
1669 - Dwarfless syscalls: The nd_syscalls tapset is now available to probe
1670 system calls without requiring kernel debugging information. All of
1671 the same probepoints in the normal syscalls tapset are available with
1672 an "nd_" prefix, e.g. syscall.open becomes nd_syscall.open. Most
1673 syscall arguments are also available by name in nd_syscalls.
1675 - Module signing: If the appropriate nss libraries are available on your
1676 system, stap-server will sign each compiled module using a self-generated
1677 certificate. This is the first step toward extending authority to
1678 load certain modules to unprivileged users. For now, if the system
1679 administrator adds a certificate to a database of trusted signers
1680 (stap-authorize-signing-cert), modules signed using that certificate
1681 will be verified by staprun against tampering. Otherwise, you should
1682 notice no difference in the operation of stap or staprun.
1684 * What's new in version 0.9.7, 2009-04-23
1686 - @cast can now determine its type information using an explicit header
1687 specification. For example:
1688 @cast(tv, "timeval", "<sys/time.h>")->tv_sec
1689 @cast(task, "task_struct", "kernel<linux/sched.h>")->tgid
1691 - The overlapping process.* tapsets are now separated. Those probe points
1692 documented in stapprobes(3stap) remain the same. Those that were formerly
1693 in stapprobes.process(3stap) have been renamed to kprocess, to reflect
1694 their kernel perspective on processes.
1696 - The --skip-badvars option now also suppresses run-time error
1697 messages that would otherwise result from erroneous memory accesses.
1698 Such accesses can originate from $context expressions fueled by
1699 erroneous debug data, or by kernel_{long,string,...}() tapset calls.
1701 - New probes kprobe.function(FUNCTION) and kprobe.function(FUNCTION).return
1702 for dwarfless probing. These postpone function address resolution to
1703 run-time and use the kprobe symbol-resolution mechanism.
1704 Probing of absolute statements can be done using the
1705 kprobe.statement(ADDRESS).absolute construct.
1707 - EXPERIMENTAL support for user process unwinding. A new collection of
1708 tapset functions have been added to handle user space backtraces from
1709 probe points that support them (currently process and timer probes -
1710 for timer probes test whether or not in user space first with the
1711 already existing user_mode() function). The new tapset functions are:
1712 uaddr - User space address of current running task.
1713 usymname - Return the symbol of an address in the current task.
1714 usymdata - Return the symbol and module offset of an address.
1715 print_ustack - Print out stack for the current task from string.
1716 print_ubacktrace - Print stack back trace for current task.
1717 ubacktrace - Hex backtrace of current task stack.
1718 Please read http://sourceware.org/ml/systemtap/2009-q2/msg00364.html
1719 on the current restrictions and possible changes in the future and
1720 give feedback if you want to influence future developments.
1722 * What's new in version 0.9.5, 2009-03-27
1724 - New probes process().insn and process().insn.block that allows
1725 inspection of the process after each instruction or block of
1726 instructions executed. So to count the total number of instructions
1727 a process executes during a run do something like:
1728 $ stap -e 'global steps; probe process("/bin/ls").insn {steps++}
1729 probe end {printf("Total instructions: %d\n", steps);}' \
1731 This feature can slow down execution of a process somewhat.
1733 - Systemtap probes and function man pages extracted from the tapsets
1734 are now available under 3stap. To show the page for probe vm.pagefault
1735 or the stap function pexecname do:
1736 $ man 3stap vm.pagefault
1737 $ man 3stap pexecname
1739 - Kernel tracepoints are now supported for probing predefined kernel
1740 events without any debuginfo. Tracepoints incur less overhead than
1741 kprobes, and context parameters are available with full type
1742 information. Any kernel 2.6.28 and later should have defined
1743 tracepoints. Try the following to see what's available:
1744 $ stap -L 'kernel.trace("*")'
1746 - Typecasting with @cast now supports modules search paths, which is
1747 useful in case there are multiple places where the type definition
1748 may be found. For example:
1749 @cast(sdev, "scsi_device", "kernel:scsi_mod")->sdev_state
1751 - On-file flight recorder is supported. It allows stap to record huge
1752 trace log on the disk and to run in background.
1753 Passing -F option with -o option runs stap in background mode. In this
1754 mode, staprun is detached from console, and stap itself shows staprun's
1756 Specifying the max size and the max number of log files are also available
1757 by passing -S option. This option has one or two arguments seperated by
1758 a comma. The first argument is the max size of a log file in MB. If the
1759 size of a log file exceeds it, stap switches to the next log file
1760 automatically. The second is how many files are kept on the disk. If the
1761 number of log files exceeds it, the oldest log file is removed
1762 automatically. The second argument can be omitted.
1764 For example, this will record output on log files each of them is smaller
1765 than 1024MB and keep last 3 logs, in background.
1766 % stap -F -o /tmp/staplog -S 1024,3 script.stp
1768 - In guru mode (-g), the kernel probing blacklist is disabled, leaving
1769 only a subset - the kernel's own internal kprobe blacklist - to attempt
1770 to filter out areas unsafe to probe. The differences may be enough to
1771 probe more interrupt handlers.
1773 - Variables unavailable in current context may be skipped by setting a
1774 session level flag with command line option --skip-badvars now available.
1775 This replaces any dwarf $variable expressions that could not be resolved
1776 with literal numeric zeros, along with a warning message.
1778 - Both kernel markers and kernel tracepoint support argument listing
1779 through stap -L 'kernel.mark("*")' or stap -L 'kernel.trace("*")'
1781 - Users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in
1782 their script, at the cost of a bit more overhead to toggle the
1785 - Added reentrancy debugging. If stap is run with the arguments
1786 "-t -DDEBUG_REENTRANCY", additional warnings will be printed for
1787 every reentrancy event, including the probe points of the
1788 resident and interloper probes.
1790 - Default to --disable-pie for configure.
1791 Use --enable-pie to turn it back on.
1793 - Improved sdt.h compatibility and test suite for static dtrace
1794 compatible user space markers.
1796 - Some architectures now use syscall wrappers (HAVE_SYSCALL_WRAPPERS).
1797 The syscall tapset has been enhanced to take care of the syscall
1798 wrappers in this release.
1800 - Security fix for CVE-2009-0784: stapusr module-path checking race.
1802 * What's new in version 0.9, 2009-02-19
1804 - Typecasting is now supported using the @cast operator. A script can
1805 define a pointer type for a "long" value, and then access type members
1806 using the same syntax as with $target variables. For example, this will
1807 retrieve the parent pid from a kernel task_struct:
1808 @cast(pointer, "task_struct", "kernel")->parent->pid
1810 - process().mark() probes are now possible to trace static user space
1811 markers put in programs with the STAP_PROBE macro using the new
1812 sys/sdt.h include file. This also provides dtrace compatible markers
1813 through DTRACE_PROBE and an associated python 'dtrace' script that
1814 can be used in builds based on dtrace that need dtrace -h or -G
1817 - For those that really want to run stap from the build tree there is
1818 now the 'run-stap' script in the top-level build directory that sets
1819 up the SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, SYSTEMTAP_STAPRUN, and
1820 SYSTEMTAP_STAPIO environment variables (installing systemtap, in a
1821 local prefix, is still recommended for common use).
1823 - Systemtap now comes with a new Beginners Guide that walks the user
1824 through their first steps setting up stap, understanding how it all
1825 works, introduces some useful scripts and describes some common
1826 pitfalls. It isn't created by default since it needs a Publican
1827 setup, but full build instructions can be found in the wiki:
1828 http://sourceware.org/systemtap/wiki/PublicanQuikHowto
1829 An online version can be found at:
1830 http://sourceware.org/systemtap/SystemTap_Beginners_Guide.pdf
1832 - Standard tapsets included with Systemtap were modified to include
1833 extractable documentation information based on the kernel-doc
1834 infrastructure. When configured --enabled-docs a HTML and PDF
1835 version of the Tapset Reference Manual is produced explaining probes
1836 defined in each tapset.
1838 - The systemtap client and compile server are now available.
1839 These allow you to compile a systemtap module on a host other than
1840 the one which it will be run, providing the client and server
1841 are compatible. Other than using a server for passes 1 through
1842 4, the client behaves like the 'stap' front end itself. This
1843 means, among other things, that the client will automatically
1844 load the resulting module on the local host unless -p[1234]
1845 was specified. See stap-server(8) for more details.
1846 The client/server now use SSL for network connection security and
1849 The systemtap client and server are prototypes only. Interfaces, options
1850 and usage may change at any time.
1852 - function("func").label("label") probes are now supported to allow matching
1853 the label of a function.
1855 - Systemtap initscript is available. This initscript allows you to run
1856 systemtap scripts as system services (in flight recorder mode) and
1857 control those scripts individually.
1858 See README.systemtap for details.
1860 - The stap "-r DIR" option may be used to identify a hand-made kernel
1861 build directory. The tool determines the appropriate release string
1862 automatically from the directory.
1864 - Serious problems associated with user-space probing in shared libraries
1865 were corrected, making it now possible to experiment with probe shared
1866 libraries. Assuming dwarf debugging information is installed, use this
1867 twist on the normal syntax:
1869 probe process("/lib64/libc-2.8.so").function("....") { ... }
1871 This would probe all threads that call into that library. Running
1872 "stap -c CMD" or "stap -x PID" naturally restricts this to the target
1873 command+descendants only. $$vars etc. may be used.
1875 - For scripts that sometimes terminate with excessive "skipped" probes,
1876 rerunning the script with "-t" (timing) will print more details about
1877 the skippage reasons.
1879 - Symbol tables and unwind (backtracing) data support were formerly
1880 compiled in for all probed modules as identified by the script
1881 (kernel; module("name"); process("file")) plus those listed by the
1882 stap "-d BINARY" option. Now, this data is included only if the systemtap
1883 script uses tapset functions like probefunc() or backtrace() that require
1884 such information. This shrinks the probe modules considerably for the rest.
1886 - Per-pass verbosity control is available with the new "--vp {N}+" option.
1887 "stap --vp 040" adds 4 units of -v verbosity only to pass 2. This is useful
1888 for diagnosing errors from one pass without excessive verbosity from others.
1890 - Most probe handlers now run with interrupts enabled, for improved
1891 system responsiveness and less probing overhead. This may result
1892 in more skipped probes, for example if a reentrant probe handler
1893 is attempted from within an interrupt handler. It may also make the
1894 systemtap overload detection facility more likely to be triggered, as
1895 interrupt handlers' run time would be included in the self-assessed
1896 overhead of running probe handlers.
1898 * What's new in version 0.8, 2008-11-13
1900 - Cache limiting is now available. If the compiled module cache size is
1901 over a limit specified in the $SYSTEMTAP_DIR/cache/cache_mb_limit file,
1902 some old cache entries will be unlinked. See man stap(1) for more.
1904 - Error and warning messages are now followed by source context displaying
1905 the erroneous line/s and a handy '^' in the following line pointing to the
1908 - A bug reporting tool "stap-report" is now available which will quickly
1909 retrieve much of the information requested here:
1910 http://sourceware.org/systemtap/wiki/HowToReportBugs
1912 - The translator can resolve members of anonymous structs / unions:
1913 given struct { int foo; struct { int bar; }; } *p;
1914 this now works: $p->bar
1916 - The stap "-F" flag activates "flight recorder" mode, which consists of
1917 translating the given script as usual, but implicitly launching it into
1918 the background with staprun's existing "-L" (launch) option. A user
1919 can later reattach to the module with "staprun -A MODULENAME".
1921 - Additional context variables are available on user-space syscall probes.
1922 - $argN ($arg1, $arg2, ... $arg6) in process(PATH_OR_PID).syscall
1923 gives you the argument of the system call.
1924 - $return in process(PATH_OR_PID).syscall.return gives you the return
1925 value of the system call.
1927 - Target process mode (stap -c CMD or -x PID) now implicitly restricts all
1928 "process.*" probes to the given child process. (It does not affect
1929 kernel.* or other probe types.) The CMD string is normally run directly,
1930 rather than via a /bin/sh -c subshell, since then utrace/uprobe probes
1931 receive a fairly "clean" event stream. If metacharacters like
1932 redirection operators were present in CMD, then "sh -c CMD" is still
1933 used, and utrace/uprobe probes will receive events from the shell.
1935 % stap -e 'probe process.syscall, process.end {
1936 printf("%s %d %s\n", execname(), pid(), pp())}'\
1938 ls 2323 process.syscall
1939 ls 2323 process.syscall
1942 - Probe listing mode is improved: "-L" lists available script-level variables
1944 % stap -L 'syscall.*open*'
1945 syscall.mq_open name:string name_uaddr:long filename:string mode:long u_attr_uaddr:long oflag:long argstr:string
1946 syscall.open name:string filename:string flags:long mode:long argstr:string
1947 syscall.openat name:string filename:string flags:long mode:long argstr:string
1949 - All user-space-related probes support $PATH-resolved executable
1952 probe process("ls").syscall {}
1953 probe process("./a.out").syscall {}
1955 work now, instead of just
1957 probe process("/bin/ls").syscall {}
1958 probe process("/my/directory/a.out").syscall {}
1960 - Prototype symbolic user-space probing support:
1962 # stap -e 'probe process("ls").function("*").call {
1963 log (probefunc()." ".$$parms)
1968 - debugging information for the named program
1969 - a version of utrace in the kernel that is compatible with the "uprobes"
1970 kernel module prototype. This includes RHEL5 and older Fedora, but not
1971 yet current lkml-track utrace; a "pass 4a"-time build failure means
1972 your system cannot use this yet.
1974 - Global variables which are written to but never read are now
1975 automatically displayed when the session does a shutdown. For example:
1977 global running_tasks
1978 probe timer.profile {running_tasks[pid(),tid()] = execname()}
1979 probe timer.ms(8000) {exit()}
1981 - A formatted string representation of the variables, parameters, or local
1982 variables at a probe point is now supported via the special $$vars,
1983 $$parms, and $$locals context variables, which expand to a string
1984 containing a list "var1=0xdead var2=0xbeef var3=?". (Here, var3 exists
1985 but is for some reason unavailable.) In return probes only, $$return
1986 expands to an empty string for a void function, or "return=0xf00".
1989 * What's new in version 0.7, 2008-07-15
1991 - .statement("func@file:*") and .statement("func@file:M-N") probes are now
1992 supported to allow matching a range of lines in a function. This allows
1993 tracing the execution of a function.
1995 - Scripts relying on probe point wildcards like "syscall.*" that expand
1996 to distinct kprobes are processed significantly faster than before.
1998 - The vector of script command line arguments is available in a
1999 tapset-provided global array argv[]. It is indexed 1 ... argc,
2000 another global. This can substitute for of preprocessor
2001 directives @NNN that fail at parse time if there are not
2004 printf("argv: %s %s %s", argv[1], argv[2], argv[3])
2006 - .statement("func@file+line") probes are now supported to allow a
2007 match relative to the entry of the function incremented by line
2008 number. This allows using the same systemtap script if the rest
2009 of the file.c source only changes slightly.
2011 - A probe listing mode is available.
2020 - More user-space probe types are added:
2022 probe process(PID).begin { }
2023 probe process("PATH").begin { }
2024 probe process(PID).thread.begin { }
2025 probe process("PATH").thread.begin { }
2026 probe process(PID).end { }
2027 probe process("PATH").end { }
2028 probe process(PID).thread.end { }
2029 probe process("PATH").thread.end { }
2030 probe process(PID).syscall { }
2031 probe process("PATH").syscall { }
2032 probe process(PID).syscall.return { }
2033 probe process("PATH").syscall.return { }
2035 - Globals now accept ; terminators
2038 global little[10], big[5];
2040 * What's new in version 0.6, 2007-12-15
2042 - A copy of the systemtap tutorial and language reference guide
2045 - There is a new format specifier, %m, for the printf family of
2046 functions. It functions like %s, except that it does not stop when
2047 a nul ('\0') byte is encountered. The number of bytes output is
2048 determined by the precision specifier. The default precision is 1.
2051 printf ("%m", "My String") // prints one character: M
2052 printf ("%.5", myString) // prints 5 bytes beginning at the start
2055 - The %b format specifier for the printf family of functions has been enhanced
2058 1) When the width and precision are both unspecified, the default is %8.8b.
2059 2) When only one of the width or precision is specified, the other defaults
2060 to the same value. For example, %4b == %.4b == %4.4b
2061 3) Nul ('\0') bytes are used for field width padding. For example,
2063 printf ("%b", 0x1111deadbeef2222) // prints all eight bytes
2064 printf ("%4.2b", 0xdeadbeef) // prints \0\0\xbe\xef
2066 - Dynamic width and precision are now supported for all printf family format
2067 specifiers. For example:
2071 printf ("%*.*b", four, two, 0xdeadbbeef) // prints \0\0\xbe\xef
2072 printf ("%*d", four, two) // prints <space><space><space>2
2074 - Preprocessor conditional expressions can now include wildcard style
2075 matches on kernel versions.
2076 %( kernel_vr != "*xen" %? foo %: bar %)
2078 - Prototype support for user-space probing is showing some progress.
2079 No symbolic notations are supported yet (so no probing by function names,
2080 file names, process names, and no access to $context variables), but at
2081 least it's something:
2083 probe process(PID).statement(ADDRESS).absolute { }
2085 This will set a uprobe on the given process-id and given virtual address.
2086 The proble handler runs in kernel-space as usual, and can generally use
2087 existing tapset functions.
2089 - Crash utility can retrieve systemtap's relay buffer from a kernel dump
2090 image by using staplog which is a crash extension module. To use this
2091 feature, type commands as below from crash(8)'s command line:
2093 crash> extend staplog.so
2094 crash> help systemtaplog
2096 Then, you can see more precise help message.
2098 - You can share a relay buffer amoung several scripts and merge outputs from
2099 several scripts by using "-DRELAY_HOST" and "-DRELAY_GUEST" options.
2103 % stap -ve 'probe begin{}' -o merged.out -DRELAY_HOST &
2104 # wait until starting the host.
2105 % stap -ve 'probe begin{print("hello ");exit()}' -DRELAY_GUEST
2106 % stap -ve 'probe begin{print("world\n");exit()}' -DRELAY_GUEST
2108 Then, you'll see "hello world" in merged.out.
2110 - You can add a conditional statement for each probe point or aliase, which
2111 is evaluated when the probe point is hit. If the condition is false, the
2112 whole probe body(including aliases) is skipped. For example:
2115 probe syscall.* if (switch) { ... }
2116 probe procfs.write {switch = strtol($value,10)} /* enable/disable ctrl */
2118 - Systemtap will warn you if your script contains unused variables or
2119 functions. This is helpful in case of misspelled variables. If it
2120 doth protest too much, turn it off with "stap -w ...".
2122 - You can add error-handling probes to a script, which are run if a
2123 script was stopped due to errors. In such a case, "end" probes are
2124 not run, but "error" ones are.
2126 probe error { println ("oops, errors encountered; here's a report anyway")
2127 foreach (coin in mint) { println (coin) } }
2129 - In a related twist, one may list probe points in order of preference,
2130 and mark any of them as "sufficient" beyond just "optional". Probe
2131 point sequence expansion stops if a sufficient-marked probe point has a hit.
2132 This is useful for probes on functions that may be in a module (CONFIG_FOO=m)
2133 or may have been compiled into the kernel (CONFIG_FOO=y), but we don't know
2136 probe module("sd").function("sd_init_command") ? ,
2137 kernel.function("sd_init_command") ? { ... }
2139 which might match neither, now one can write this:
2141 probe module("sd").function("sd_init_command") ! , /* <-- note excl. mark */
2142 kernel.function("sd_init_command") { ... }
2144 - New security model. To install a systemtap kernel module, a user
2145 must be one of the following: the root user; a member of the
2146 'stapdev' group; or a member of the 'stapusr' group. Members of the
2147 stapusr group can only use modules located in the
2148 /lib/modules/VERSION/systemtap directory (where VERSION is the
2149 output of "uname -r").
2151 - .statement("...@file:line") probes now apply heuristics to allow an
2152 approximate match for the line number. This works similarly to gdb,
2153 where a breakpoint placed on an empty source line is automatically
2154 moved to the next statement. A silly bug that made many $target
2155 variables inaccessible to .statement() probes was also fixed.
2157 - LKET has been retired. Please let us know on <systemtap@sourceware.org>
2158 if you have been a user of the tapset/tools, so we can help you find
2161 - New families of printing functions println() and printd() have been added.
2162 println() is like print() but adds a newline at the end;
2163 printd() is like a sequence of print()s, with a specified field delimiter.
2165 * What's new since version 0.5.14?, 2007-07-03
2167 - The way in which command line arguments for scripts are substituted has
2168 changed. Previously, $1 etc. would interpret the corresponding command
2169 line argument as an numeric literal, and @1 as a string literal. Now,
2170 the command line arguments are pasted uninterpreted wherever $1 etc.
2171 appears at the beginning of a token. @1 is similar, but is quoted as
2172 a string. This change does not modify old scripts, but has the effect
2173 of permitting substitution of arbitrary token sequences.
2175 # This worked before, and still does:
2176 % stap -e 'probe timer.s($1) {}' 5
2177 # Now this also works:
2178 % stap -e 'probe syscall.$1 {log(@1)}' open
2179 # This won't crash, just signal a recursion error:
2181 # As before, $1... is recognized only at the beginning of a token
2182 % stap -e 'probe begin {foo$1=5}'
2184 * What's new since version 0.5.13?, 2007-03-26
2186 - The way in which systemtap resolves function/inline probes has changed:
2187 .function(...) - now refers to all functions, inlined or not
2188 .inline(...) - is deprecated, use instead:
2189 .function(...).inline - filters function() to only inlined instances
2190 .function(...).call - filters function() to only non-inlined instances
2191 .function(...).return - as before, but now pairs best with .function().call
2192 .statement() is unchanged.
2194 * What's new since version 0.5.12?, 2007-01-01
2196 - When running in -p4 (compile-only) mode, the compiled .ko file name
2197 is printed on standard output.
2199 - An array element with a null value such as zero or an empty string
2200 is now preserved, and will show up in a "foreach" loop or "in" test.
2201 To delete such an element, the scripts needs to use an explicit
2202 "delete array[idx]" statement rather than something like "array[idx]=0".
2204 - The new "-P" option controls whether prologue searching heuristics
2205 will be activated for function probes. This was needed to get correct
2206 debugging information (dwarf location list) data for $target variables.
2207 Modern compilers (gcc 4.1+) tend not to need this heuristic, so it is
2208 no longer default. A new configure flag (--enable-prologues) restores
2209 it as a default setting, and is appropriate for older compilers (gcc 3.*).
2211 - Each systemtap module prints a one-line message to the kernel informational
2212 log when it starts. This line identifies the translator version, base
2213 address of the probe module, a broken-down memory consumption estimate, and
2214 the total number of probes. This is meant as a debugging / auditing aid.
2216 - Begin/end probes are run with interrupts enabled (but with
2217 preemption disabled). This will allow begin/end probes to be
2218 longer, to support generating longer reports.
2220 - The numeric forms of kernel.statement() and kernel.function() probe points
2221 are now interpreted as relocatable values - treated as relative to the
2222 _stext symbol in that kernel binary. Since some modern kernel images
2223 are relocated to a different virtual address at startup, such addresses
2224 may shift up or down when actually inserted into a running kernel.
2226 kernel.statement(0xdeadbeef): validated, interpreted relative to _stext,
2227 may map to 0xceadbeef at run time.
2229 In order to specify unrelocated addresses, use the new ".absolute"
2230 probe point suffix for such numeric addresses. These are only
2231 allowed in guru mode, and provide access to no $target variables.
2232 They don't use debugging information at all, actually.
2234 kernel.statement(0xfeedface).absolute: raw, unvalidated, guru mode only
2236 * What's new since version 0.5.10?, 2006-10-19
2238 - Offline processing of debugging information, enabling general
2239 cross-compilation of probe scripts to remote hosts, without
2240 requiring identical module/memory layout. This slows down
2241 compilation/translation somewhat.
2243 - Kernel symbol table data is loaded by staprun at startup time
2244 rather than compiled into the module.
2246 - Support the "limit" keyword for foreach iterations:
2247 foreach ([x,y] in ary limit 5) { ... }
2248 This implicitly exits after the fifth iteration. It also enables
2249 more efficient key/value sorting.
2251 - Support the "maxactive" keyword for return probes:
2252 probe kernel.function("sdfsdf").maxactive(848) { ... }
2253 This allows up to 848 concurrently outstanding entries to
2254 the sdfsdf function before one returns. The default maxactive
2255 number is smaller, and can result in missed return probes.
2257 - Support accessing of saved function arguments from within
2258 return probes. These values are saved by a synthesized
2259 function-entry probe.
2261 - Add substantial version/architecture checking in compiled probes to
2262 assert correct installation of debugging information and correct
2263 execution on a compatible kernel.
2265 - Add probe-time checking for sufficient free stack space when probe
2266 handlers are invoked, as a safety improvement.
2268 - Add an optional numeric parameter for begin/end probe specifications,
2269 to order their execution.
2270 probe begin(10) { } /* comes after */ probe begin(-10) {}
2272 - Add an optional array size declaration, which is handy for very small
2274 global little[5], big[20000]
2276 - Include some example scripts along with the documentation.
2278 - Change the start-time allocation of probe memory to avoid causing OOM
2279 situations, and to abort cleanly if free kernel memory is short.
2281 - Automatically use the kernel DWARF unwinder, if present, for stack
2284 - Many minor bug fixes, performance, tapset, and error message