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