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