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