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