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