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