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