]> sourceware.org Git - systemtap.git/blob - NEWS
PR13513: undo PR11759 PREEMPT_RT hack
[systemtap.git] / NEWS
1 * What's new in version 1.7
2
3 - The stap-server service (initscript) now supports four new options:
4 -D MACRO[=VALUE]
5 --log LOGFILE
6 --port PORT-NUMBER
7 --SSL CERT-DATABASE
8 These allow the specification of macro definitions to be passed to stap
9 by the server, the location of the log file, network port number and
10 NSS certificate database location respectively. These options are also
11 supported within individual server configuration files. See stap-server
12 and initscript/README.stap-server for details.
13
14 - process("PATH").[library("PATH")].function("NAME").exported probes are now
15 supported to filter function() to only exported instances.
16
17 - The translator supports a new --suppress-handler-errors option, which
18 causes most runtime errors to be turned into quiet skipped probes. This
19 also disables the MAXERRORS and MAXSKIPPED limits.
20
21 - The translator supports a new --modinfo NAME=VALUE option to emit additional
22 MODULE_INFO(n,v) macros into the generated code.
23
24 - There is no more fixed maximum number of VMA pages that will be tracked
25 at runtime. This reduces memory use for those scripts that don't need any,
26 or only limited target process VMA tracking and allows easier system
27 wide probes inspecting shared library variables and/or user backtraces.
28 stap will now silently ignore -DTASK_FINDER_VMA_ENTRY_ITEMS.
29
30 - The tapset functions remote_id() and remote_uri() identify the member of a
31 swarm of "stap --remote FOO --remote BAR baz.stp" concurrent executions.
32
33 - Systemtap now supports a new privilege level and group, "stapsys", which
34 is equivalent to the privilege afforded by membership in the group "stapdev",
35 except that guru mode (-g) functionality may not be used. To support this, a
36 new option, --privilege=[stapusr|stapsys|stapdev] has been added.
37 --privilege=stapusr is equivalent to specifying the existing --unprivileged
38 option. --privilege=stapdev is the default. See man stap(1) for details.
39
40 - Scripts that use kernel.trace("...") probes compile much faster.
41
42 - SDT can now define up to 12 arguments in a probe point.
43
44 - Parse errors no longer generate a cascade of false errors. Instead, a
45 parse error skips the rest of the current probe or function, and resumes
46 at the next one. This should generate fewer and better messages.
47
48 - Global array wrapping is now supported for both associative and statistics typed
49 arrays using the '%' character to signify a wrapped array. For example,
50 'global foo%[100]' would allow the array 'foo' to be wrapped if more than 100
51 elements are inserted.
52
53 - process("PATH").library("PATH").plt("NAME") probes are now supported.
54 Wildcards are supported in the plt-name part, to refer to any function in the
55 program linkage table which matches the glob pattern and the rest of the
56 probe point.
57
58 - A new option, --dump-probe-types, will dump a list of supported probe types.
59 If --unprivileged is also specified, the list will be limited to probe types
60 which are available to unprivileged users.
61
62 - Systemtap can now automatically download the required debuginfo
63 using abrt. The --download-debuginfo[=OPTION] can be used to
64 control this feature. Possible values are: 'yes', 'no', 'ask',
65 and a positive number representing the timeout desired. The
66 default behavior is to not automatically download the debuginfo.
67
68 - On 2.6.29+ kernels, systemtap can now probe kernel modules that
69 arrive and/or depart during the run-time of a session. This allows
70 probing of device driver initialization functions, which had been
71 blacklisted.
72
73 - The following probe types are deprecated in release 1.7 and will be
74 removed in release 1.8:
75 kernel.function(number).inline
76 module(string).function(number).inline
77 process.function(number).inline
78 process.library(string).function(number).inline
79 process(string).function(number).inline
80 process(string).library(string).function(number).inline
81
82 - The systemtap-grapher is deprecated in release 1.7 and will be removed in
83 release 1.8.
84
85 - The task_backtrace() tapset function was deprecated in 1.6 and has been
86 removed in 1.7.
87
88 - MAXBACKTRACE did work in earlier releases, but has now been documented
89 in the stap 1 manual page.
90
91 - New tapset function probe_type(). Returns a short string describing
92 the low level probe handler type for the current probe point.
93
94 - Both unwind and symbol data is now only collected and emitted for
95 scripts actually using backtracing or function/data symbols.
96 Tapset functions are marked with /* pragma:symbols */ or
97 /* pragma:unwind */ to indicate they need the specific data.
98
99 - Kernel backtraces can now be generated for non-pt_regs probe context
100 if the kernel support dump_trace(). This enables backtraces from
101 certain timer probes and tracepoints.
102
103 - ubacktrace() should now also work for some kernel probes on x86 which can
104 use the dwarf unwinder to recover the user registers to provide
105 more accurate user backtraces.
106
107 - For s390x the systemtap runtime now properly splits kernel and user
108 addresses (which are in separate address spaces on that architecture)
109 which enable user space introspection.
110
111 - ppc and s390x now supports user backtraces through the DWARF unwinder.
112
113 - ppc now handles function descriptors as symbol names correctly.
114
115 - arm support kernel backtraces through the DWARF unwinder.
116
117 - arm now have a uprobes port which enables user probes. This still
118 requires some kernel patches (user_regsets and tracehook support for
119 arm).
120
121 - Starting in release 1.7, these old variables will be deprecated:
122 - The 'pid' variable in the 'kprocess.release' probe has been
123 deprecated in favor of the new 'released_pid' variable.
124 - The 'args' variable in the
125 '_sunrpc.clnt.create_client.rpc_new_client_inline' probe has been
126 deprecated in favor of the new internal-only '__args' variable.
127
128 * What's new in version 1.6, 2011-07-25
129
130 - Security fixes for CVE-2011-2503: read instead of mmap to load modules,
131 CVE-2011-2502: Don't allow path-based auth for uprobes
132
133 - The systemtap compile-server no longer uses the -k option when calling the
134 translator (stap). As a result, the server will now take advantage of the
135 module cache when compiling the same script more than once. You may observe
136 an improvement in the performance of the server in this situation.
137
138 - The systemtap compile-server and client now each check the version of the
139 other, allowing both to adapt when communicating with a down-level
140 counterpart. As a result, all version of the client can communicate
141 with all versions of the server and vice-versa. Client will prefer newer
142 servers when selecting a server automatically.
143
144 - SystemTap has improved support for the ARM architecture. The
145 kread() and kwrite() operations for ARM were corrected allowing many
146 of the tapsets probes and function to work properly on the ARM
147 architecture.
148
149 - Staprun can now rename the module to a unique name with the '-R' option before
150 inserting it. Systemtap itself will also call staprun with '-R' by default.
151 This allows the same module to be inserted more than once, without conflicting
152 duplicate names.
153
154 - Systemtap error messages now provide feedback when staprun or any other
155 process fails to launch. This also specifically covers when the user
156 doesn't have the proper permissions to launch staprun.
157
158 - Systemtap will now map - to _ in module names. Previously,
159 stap -L 'module("i2c-core").function("*")' would be empty. It now returns
160 a list had stap -L 'module("i2c_core").function("*") been specified.
161
162 - Systemtap now fills in missing process names to probe points, to
163 avoid having to name them twice twice:
164 % stap -e 'probe process("a.out").function("*") {}' -c 'a.out ...'
165 Now the probed process name is inferred from the -c CMD argument.
166 % stap -e 'probe process.function("*") {}' -c 'a.out ...'
167
168 - stap -L 'process("PATH").syscall' will now list context variables
169
170 - Depends on elfutils 0.142+.
171
172 - Deprecated task_backtrace:string (task:long). This function will go
173 away after 1.6. Please run your scripts with stap --check-version.
174
175 * What's new in version 1.5, 2011-05-23
176
177 - Security fixes for CVE-2011-1781, CVE-2011-1769: correct DW_OP_{mod,div}
178 division-by-zero bug
179
180 - The compile server and its related tools (stap-gen-ert, stap-authorize-cert,
181 stap-sign-module) have been re-implemented in C++. Previously, these
182 components were a mix of bash scripts and C code. These changes should be
183 transparent to the end user with the exception of NSS certificate database
184 password prompting (see below). The old implementation would prompt more
185 than once for the same password in some situations.
186
187 - eventcount.stp now allows for event counting in the format of
188 'stap eventcount.stp process.end syscall.* ...', and also reports
189 corresponding event tid's.
190
191 - Systemtap checks that the build-id of the module being probed matches the
192 build-id saved in the systemtap module. Invoking systemtap with
193 -DSTP_NO_BUILDID_CHECK will bypass this build-id runtime verification. See
194 man ld(1) for info on --build-id.
195
196 - stapio will now report if a child process has an abnormal exit along with
197 the associated status or signal.
198
199 - Compiler optimization may sometimes result in systemtap not being able to
200 access a user-space probe argument. Compiling the application with
201 -DSTAP_SDT_ARG_CONSTRAINT=nr will force the argument to be an immediate or
202 register value which should enable systemtap to access the argument.
203
204 - GNU Gettext has now been intergrated with systemtap. Our translation
205 page can be found at http://www.transifex.net/projects/p/systemtap/ .
206 "make update-po" will generate the necessary files to use translated
207 messages. Please refer to the po/README file for more info and
208 please consider contributing to this I18N effort!
209
210 - The new addr() function returns the probe's instruction pointer.
211
212 - process("...").library("...") probes are now supported. Wildcards
213 are supported in the library-name part, to refer to any shared
214 library that is required by process-name, which matches the glob
215 pattern and the rest of the probe point.
216
217 - The "--remote USER@HOST" functionality can now be specified multiple times
218 to fan out on multiple targets. If the targets have distinct kernel and
219 architecture configurations, stap will automatically build the script
220 appropriately for each one. This option is also no longer considered
221 experimental.
222
223 - The NSS certificate database generated for use by the compile server is now
224 generated with no password. Previously, a random password was generated and
225 used to access the database. This change should be transparent to most users.
226 However, if you are prompted for a password when using systemtap, then
227 running $libexecdir/stap-gen-cert should correct the problem.
228
229 - The timestamp tapset includes jiffies() and HZ() for lightweight approximate
230 timekeeping.
231
232 - A powerful new command line option --version has been added.
233
234 - process.mark now supports $$parms for reading probe parameters.
235
236 - A new command line option, --use-server-on-error[=yes|no] is available
237 for stap. It instructs stap to retry compilation of a script using a
238 compile server if it fails on the local host. The default setting
239 is 'no'.
240
241 - The following deprecated tools have been removed:
242 stap-client
243 stap-authorize-server-cert
244 stap-authorize-signing-cert
245 stap-find-or-start-server
246 stap-find-servers
247 Use the --use-server, --trust-server and --list-servers options of stap
248 instead.
249
250 * What's new in version 1.4, 2011-01-17
251
252 - Security fixes for CVE-2010-4170, CVE-2010-4171: staprun module
253 loading/unloading
254
255 - A new /* myproc-unprivileged */ marker is now available for embedded C
256 code and and expressions. Like the /* unprivileged */ marker, it makes
257 the code or expression available for use in unprivileged mode (see
258 --unprivileged). However, it also automatically adds a call to
259 assert_is_myproc() to the code or expression, thus, making it available
260 to the unprivileged user only if the target of the current probe is within
261 the user's own process.
262
263 - The experimental "--remote USER@HOST" option will run pass 5 on a given
264 ssh host, after building locally (or with --use-server) for that target.
265
266 - Warning messages from the script may now be suppressed with the stap
267 and/or staprun -w option. By default, duplicate warning messages are
268 suppressed (up to a certain limit). With stap --vp 00002 and above,
269 the duplicate elimination is defeated.
270
271 - The print_ubacktrace and usym* functions attempt to print the full
272 path of the user-space binaries' paths, instead of just the basename.
273 The maximum saved path length is set by -DTASK_FINDER_VMA_ENTRY_PATHLEN,
274 default 64. Warning messages are produced if unwinding fails due to
275 a missing 'stap -d MODULE' option, providing preloaded unwind data.
276
277 - The new tz_ctime() tapset function prints times in the local time zone.
278
279 - More kernel tracepoints are accessible to the kernel.trace("...") mechanism,
280 if kernel source trees or debuginfo are available. These formerly "hidden"
281 tracepoints are those that are declared somewhere other than the usual
282 include/linux/trace/ headers, such as xfs and kvm.
283
284 - debuginfo-based process("...").function/.statement/.mark probes support
285 wildcards in the process-name part, to refer to any executable files that
286 match the glob pattern and the rest of the probe point.
287
288 - The -t option now displays information per probe-point rather than a summary
289 for each probe. It also now shows the derivation chain for each probe-point.
290
291 - A rewrite of the sys/sdt.h header file provides zero-cost startup (few or
292 no ELF relocations) for the debuginfo-less near-zero-cost runtime probes.
293 Binaries compiled with earlier sdt.h versions remain supported. The
294 stap -L (listing) option now lists parameters for sys/sdt.h markers.
295
296 - The implementation of the integrated compile-server client has been
297 extended.
298 o --use-server now accepts an argument representing a particular server and
299 may be specified more than once.
300 o --list-servers now accepts an expanded range of arguments.
301 o a new --trust-servers option has been added to stap to replace several
302 old certificate-management scripts.
303 o The following tools are now deprecated and will be removed in release 1.5:
304 stap-client
305 stap-authorize-server-cert
306 stap-authorize-signing-cert
307 stap-find-or-start-server
308 stap-find-servers
309 See man stap(1) for complete details.
310
311 - The compile-server now returns the uprobes.ko to the client when it is
312 required by the script being compiled. The integrated compile-server client
313 now makes it available to be loaded by staprun. The old (deprecated)
314 stap-client does not do this.
315
316 - process probes with scripts as the target are recognized by stap and the
317 interpreter would be selected for probing.
318
319 - Starting in release 1.5, these old variables/functions will be deprecated
320 and will only be available when the '--compatible=1.4' flag is used:
321
322 - In the 'syscall.add_key' probe, the 'description_auddr' variable
323 has been deprecated in favor of the new 'description_uaddr'
324 variable.
325 - In the 'syscall.fgetxattr', 'syscall.fsetxattr',
326 'syscall.getxattr', 'syscall.lgetxattr', and
327 'syscall.lremovexattr' probes, the 'name2' variable has been
328 deprecated in favor of the new 'name_str' variable.
329 - In the 'nd_syscall.accept' probe the 'flag_str' variable
330 has been deprecated in favor of the new 'flags_str' variable.
331 - In the 'nd_syscall.dup' probe the 'old_fd' variable has been
332 deprecated in favor of the new 'oldfd' variable.
333 - In the 'nd_syscall.fgetxattr', 'nd_syscall.fremovexattr',
334 'nd_syscall.fsetxattr', 'nd_syscall.getxattr', and
335 'nd_syscall.lremovexattr' probes, the 'name2' variable has been
336 deprecated in favor of the new 'name_str' variable.
337 - The tapset alias 'nd_syscall.compat_pselect7a' was misnamed. It should
338 have been 'nd_syscall.compat_pselect7' (without the trailing 'a').
339 - The tapset function 'cpuid' is deprecated in favor of the better known
340 'cpu'.
341 - In the i386 'syscall.sigaltstack' probe, the 'ussp' variable has
342 been deprecated in favor of the new 'uss_uaddr' variable.
343 - In the ia64 'syscall.sigaltstack' probe, the 'ss_uaddr' and
344 'oss_uaddr' variables have been deprecated in favor of the new
345 'uss_uaddr' and 'uoss_uaddr' variables.
346 - The powerpc tapset alias 'syscall.compat_sysctl' was deprecated
347 and renamed 'syscall.sysctl32'.
348 - In the x86_64 'syscall.sigaltstack' probe, the 'regs_uaddr'
349 variable has been deprecated in favor of the new 'regs' variable.
350
351 * What's new in version 1.3, 2010-07-21
352
353 - The uprobes kernel module now has about half the overhead when probing
354 NOPs, which is particularly relevant for sdt.h markers.
355
356 - New stap option -G VAR=VALUE allows overriding global variables
357 by passing the settings to staprun as module options.
358
359 - The tapset alias 'syscall.compat_pselect7a' was misnamed. It should
360 have been 'syscall.compat_pselect7' (without the trailing 'a').
361 Starting in release 1.4, the old name will be deprecated and
362 will only be available when the '--compatible=1.3' flag is used.
363
364 - A new procfs parameter .umask(UMASK) which provides modification of
365 file permissions using the proper umask value. Default file
366 permissions for a read probe are 0400, 0200 for a write probe, and
367 0600 for a file with a read and write probe.
368
369 - It is now possible in some situations to use print_ubacktrace() to
370 get a user space stack trace from a kernel probe point. e.g. for
371 user backtraces when there is a pagefault:
372 $ stap -d /bin/sort --ldd -e 'probe vm.pagefault {
373 if (pid() == target()) {
374 printf("pagefault @0x%x\n", address); print_ubacktrace();
375 } }' -c /bin/sort
376 [...]
377 pagefault @0x7fea0595fa70
378 0x000000384f07f958 : __GI_strcmp+0x12b8/0x1440 [libc-2.12.so]
379 0x000000384f02824e : __gconv_lookup_cache+0xee/0x5a0 [libc-2.12.so]
380 0x000000384f021092 : __gconv_find_transform+0x92/0x2cf [libc-2.12.so]
381 0x000000384f094896 : __wcsmbs_load_conv+0x106/0x2b0 [libc-2.12.so]
382 0x000000384f08bd90 : mbrtowc+0x1b0/0x1c0 [libc-2.12.so]
383 0x0000000000404199 : ismbblank+0x39/0x90 [sort]
384 0x0000000000404a4f : inittables_mb+0xef/0x290 [sort]
385 0x0000000000406934 : main+0x174/0x2510 [sort]
386 0x000000384f01ec5d : __libc_start_main+0xfd/0x1d0 [libc-2.12.so]
387 0x0000000000402509 : _start+0x29/0x2c [sort]
388 [...]
389
390 - New tapset functions to get a string representation of a stack trace:
391 sprint_[u]backtrace() and sprint_[u]stack().
392
393 - New tapset function to get the module (shared library) name for a
394 user space address umodname:string(long). The module name will now
395 also be in the output of usymdata() and in backtrace addresses even
396 when they were not given with -d at the command line.
397
398 - Kernel backtraces are now much faster (replaced a linear search
399 with a binary search).
400
401 - A new integrated compile-server client is now available as part of stap.
402
403 o 'stap --use-server ...' is equivalent to 'stap-client ...'
404 o 'stap --list-servers' is equivalent to 'stap-find-servers'
405 o 'stap --list-servers=online' is equivalent to 'stap-find-servers --all'
406 o stap-client and its related tools will soon be deprecated.
407 o the nss-devel and avahi-devel packages are required for building stap with
408 the integrated client (checked during configuration).
409 o nss and avahi are required to run the integrated client.
410
411 - A new operator @entry is available for automatically saving an expression
412 at entry time for use in a .return probe.
413 probe foo.return { println(get_cycles() - @entry(get_cycles())) }
414
415 - Probe $target variables and @cast() can now use a suffix to print complex
416 data types as strings. Use a single '$' for a shallow view, or '$$' for a
417 deeper view that includes nested types. For example, with fs_struct:
418 $fs$ : "{.users=%i, .lock={...}, .umask=%i,
419 .in_exec=%i, .root={...}, .pwd={...}}"
420 $fs$$ : "{.users=%i, .lock={.raw_lock={.lock=%u}}, .umask=%i, .in_exec=%i,
421 .root={.mnt=%p, .dentry=%p}, .pwd={.mnt=%p, .dentry=%p}}"
422
423 - The <sys/sdt.h> user-space markers no longer default to an implicit
424 MARKER_NAME_ENABLED() semaphore check for each marker. To check for
425 enabled markers use a .d declaration file, then:
426 if (MARKER_NAME_ENABLED()) MARKER_NAME()
427
428 - Hyphenated <sys/sdt.h> marker names such as process(...).mark("foo-bar")
429 are now accepted in scripts. They are mapped to the double-underscore
430 form ("foo__bar").
431
432 - More robust <sys/sdt.h> user-space markers support is included. For
433 some platforms (x86*, ppc*), this can let systemtap probe the markers
434 without debuginfo. This implementation also supports preserving
435 the "provider" name associated with a marker:
436 probe process("foo").provider("bar").mark("baz") to match
437 STAP_PROBE<n>(bar, baz <...>)
438 (Compile with -DSTAP_SDT_V1 to revert to the previous implementation.
439 Systemtap supports pre-existing or new binaries using them.)
440
441 - Embedded-C may be used within expressions as values, when in guru mode:
442 num = %{ LINUX_VERSION_CODE %} // int64_t
443 name = %{ /* string */ THIS_MODULE->name %} // const char*
444 printf ("%s %x\n", name, num)
445 The usual /* pure */, /* unprivileged */, and /* guru */ markers may be used
446 as with embedded-C functions.
447
448 - By default the systemtap-runtime RPM builds now include a shared
449 library, staplog.so, that allows crash to extract systemtap data from
450 a vmcore image.
451
452 - Iterating with "foreach" can now explicitly save the value for the loop.
453 foreach(v = [i,j] in array)
454 printf("array[%d,%s] = %d\n", i, j, v /* array[i,j] */)
455
456 - The new "--ldd" option automatically adds any additional shared
457 libraries needed by probed or -d-listed userspace binaries to the -d
458 list, to enable symbolic backtracing through them. Similarly, the
459 new "--all-modules" option automatically adds any currently loaded
460 kernel modules (listed in /proc/modules) to the -d list.
461
462 - A new family of set_kernel_* functions make it easier for gurus to write
463 new values at arbitrary memory addresses.
464
465 - Probe wildcards can now use '**' to cross the '.' separator.
466 $ stap -l 'sys**open'
467 syscall.mq_open
468 syscall.open
469
470 - Backward compatibility flags (--compatible=VERSION, and matching
471 script preprocessing predicate %( systemtap_v CMP "version" %)
472 and a deprecation policy are being introduced, in case future
473 tapset/language changes break valid scripts.
474
475 * What's new in version 1.2, 2010-03-22
476
477 - Prototype support for "perf events", where the kernel supports the
478 2.6.33 in-kernel API. Probe points may refer to low-level
479 perf_event_attr type/config numbers, or to a number of aliases
480 defined in the new perf.stp tapset:
481 probe perf.sw.cpu_clock, perf.type(0).config(4) { }
482
483 - Type-casting can now use multiple headers to resolve codependencies.
484 @cast(task, "task_struct",
485 "kernel<linux/sched.h><linux/fs_struct.h>")->fs->umask
486
487 - Tapset-related man pages have been renamed. 'man -k 3stap' should show
488 the installed list, which due to prefixing should no longer collide over
489 ordinary system functions.
490
491 - User space marker arguments no longer use volatile if the version of gcc,
492 which must be at least 4.5.0, supports richer DWARF debuginfo. Use cflags
493 -DSTAP_SDT_VOLATILE=volatile or -DSTAP_SDT_VOLATILE= when building
494 the sys/sdt.h application to override this one way or another.
495
496 - A new construct for error handling is available. It is similar to c++
497 exception catching, using try and catch as new keywords. Within a handler
498 or function, the following is valid and may be nested:
499 try { /* arbitrary statements */ }
500 catch (er) { /* e.g. println("caught error ", er) */ }
501
502 - A new command line flag '-W' forces systemtap to abort translation of
503 a script if any warnings are produced. It is similar to gcc's -Werror.
504 (If '-w' is also supplied to suppress warnings, it wins.)
505
506 - A new predicate @defined is available for testing whether a
507 particular $variable/expression is resolvable at translate time:
508 probe foo { if (@defined($bar)) log ("$bar is available here") }
509
510 - Adjacent string literals are glued together, making this
511 construct valid:
512 probe process("/usr" @1 "/bin").function("*") { ... }
513
514 - In order to limit potential impact from future security problems,
515 the stap-server process does not permit its being launched as root.
516
517 - On recent kernels, for some architectures/configurations, hardware
518 breakpoint probes are supported. The probe point syntax is:
519
520 probe kernel.data(ADDRESS).write
521 probe kernel.data(ADDRESS).length(LEN).write
522 probe kernel.data("SYMBOL_NAME").write
523
524 * What's new in version 1.1, 2010-01-15
525
526 - New tracepoint based tapset for memory subsystem.
527
528 - The loading of signed modules by staprun is no longer allowed for
529 ordinary, unprivileged users. This means that only root, members of
530 the group 'stapdev' and members of the group 'stapusr' can load
531 systemtap modules using staprun, stap or stap-client. The minimum
532 privilege required to run arbitrary --unprivileged scripts is now
533 'stapusr' membership.
534
535 - The stap-server initscript is available. This initscript allows you
536 to start systemtap compile servers as a system service and to manage
537 these servers as a group or individually. The stap-server initscript
538 is installed by the systemtap-server rpm. The build directory for
539 the uprobes module (/usr/share/systemtap/runtime/uprobes) is made
540 writable by the 'stap-server' group. All of the files generated when
541 building the uprobes module, including the digital signature, are
542 also writable by members of stap-server.
543
544 See initscript/README.stap-server for details.
545
546 - Some of the compile server client, server and certificate management
547 tools have been moved from $bindir to $libexecdir/systemtap.
548 You should use the new stap-server script or the stap-server initscript
549 for server management where possible. The stap-server script provides the same
550 functionality as the stap-server initscript except that the servers are
551 run by the invoking user by default as opposed to servers started by the
552 stap-server initscript which are run by the user stap-server
553 by default. See stap-server(8) for more information.
554
555 You may continue to use these tools by adding $libexecdir/systemtap to
556 your path. You would need to do this, for example, if you are not root,
557 you want to start a compile server and you are not running systemtap from a
558 private installation. In this case you still need to use stap-start-server.
559
560 - Any diagnostic output line that starts with "ERROR", as in
561 error("foo"), will promote a "Pass 5: run failed", and the return
562 code is 1.
563
564 - Systemtap now warns about global variables being referenced from other
565 script files. This aims to protect against unintended local-vs-global
566 namespace collisions such as:
567
568 % cat some_tapset.stp
569 probe baz.one = bar { foo = $foo; bar = $bar }
570 % cat end_user_script.stp
571 global foo # intended to be private variable
572 probe timer.s(1) { foo ++ }
573 probe baz.* { println(foo, pp()) }
574 % stap end_user_script.stp
575 WARNING: cross-file global variable reference to foo from some_tapset.stp
576
577 - Preprocessor conditional for kernel configuration testing:
578 %( CONFIG_foo == "y" %? ... %)
579
580 - ftrace(msg:string) tapset function to send strings to the system-wide
581 ftrace ring-buffer (if any).
582
583 - Better support for richer DWARF debuginfo output from GCC 4.5
584 (variable tracking assignments). Kernel modules are now always resolved
585 against all their dependencies to find any info referring to missing
586 symbols. DW_AT_const_value is now supported when no DW_AT_location
587 is available.
588
589 * What's new in verson 1.0, 2009-09-22
590
591 - process().mark() probes now use an enabling semaphore to reduce the
592 computation overhead of dormant probes.
593
594 - The function spec for dwarf probes now supports C++ scopes, so you can
595 limit the probes to specific namespaces or classes. Multiple scopes
596 can be specified, and they will be matched progressively outward.
597 probe process("foo").function("std::vector<*>::*") { }
598 probe process("foo").function("::global_function") { }
599
600 - It is now possible to cross-compile systemtap scripts for foreign
601 architectures, using the new '-a ARCH' and '-B OPT=VALUE' flags.
602 For example, put arm-linux-gcc etc. into your $PATH, and point
603 systemtap at the target kernel build tree with:
604 stap -a arm -B CROSS_COMPILE=arm-linux- -r /build/tree [...]
605 The -B option is passed to kbuild make. -r identifies the already
606 configured/built kernel tree and -a its architecture (kbuild ARCH=...).
607 Systemtap will infer -p4.
608
609 - Cross compilation using the systemtap client and server
610 - stap-start-server now accepts the -r, -R, -I, -B and -a options in
611 order to start a cross compiling server. The server will correctly
612 advertise itself with respect to the kernel release and architecture
613 that it compiles for.
614 - When specified on stap-client, the -r and -a options will be
615 considered when searching for a suitable server.
616
617 - When using the systemtap client and server udp port 5353 must be open
618 in your firewall in order for the client to find servers using
619 avahi-browse. Also the systemtap server will choose a random port in
620 the range 1024-63999 for accepting ssl connections.
621
622 - Support for unprivileged users:
623 ***********************************************************************
624 * WARNING!!!!!!!!!! *
625 * This feature is EXPERIMENTAL at this time and should be used with *
626 * care. This feature allows systemtap kernel modules to be loaded by *
627 * unprivileged users. The user interface and restrictions will change *
628 * as this feature evolves. *
629 ***********************************************************************
630 - Systemtap modules generated from scripts which use a restricted
631 subset of the features available may be loaded by staprun for
632 unprivileged users. Previously, staprun would load modules only for
633 root or for members of the groups stapdev and stapusr.
634 - Using the --unprivileged option on stap enables translation-time
635 checking for use by unprivileged users (see restrictions below).
636 - All modules deemed suitable for use by unprivileged users will be
637 signed by the systemtap server when --unprivileged is specified on
638 stap-client. See module signing in release 0.9.8 and stap-server in
639 release 0.9 below.
640 - Modules signed by trusted signers (servers) and verified by staprun
641 will be loaded by staprun regardless of the user's privilege level.
642 - The system administrator asserts the trustworthiness of a signer
643 (server) by running stap-authorize-signing-cert <cert-file> as root,
644 where the <cert-file> can be found in
645 ~<user>/.systemtap/ssl/server/stap.cert for servers started by
646 ordinary users and in $sysconfdir/systemtap/ssl/server/stap.cert for
647 servers started by root.
648 - Restrictions are intentionally strict at this time and may be
649 relaxed in the future:
650 - probe points are restricted to:
651 begin, begin(n), end, end(n), error, error(n), never,
652 timer.{jiffies,s,sec,ms,msec,us,usec,ns,nsec}(n)*, timer.hz(n),
653 process.* (for processes owned by the user).
654 - use of embedded C code is not allowed.
655 - use of tapset functions is restricted.
656 - some tapset functions may not be used at all. A message will be
657 generated at module compilation time.
658 - some actions by allowed tapset functions may only be performed
659 in the context of the user's own process. A runtime fault will
660 occur in these situations, for example, direct memory access.
661 - The is_myproc() tapset function has been provided so that
662 tapset writers for unprivileged users can check that the
663 context is of the users own process before attempting these
664 actions.
665 - accessing the kernel memory space is not allowed.
666 - The following command line options may not be used by stap-client
667 -g, -I, -D, -R, -B
668 - The following environment variables are ignored by stap-client:
669 SYSTEMTAP_RUNTIME, SYSTEMTAP_TAPSET, SYSTEMTAP_DEBUGINFO_PATH
670 - nss and nss-tools are required to use this feature.
671
672 - Support output file switching by SIGUSR2. Users can command running
673 stapio to switch output file by sending SIGUSR2.
674
675 - Memory consumption for scripts involving many uprobes has been
676 dramatically reduced.
677
678 - The preprocessor now supports || and && in the conditions.
679 e.g. %( arch == "x86_64" || arch == "ia64" %: ... %)
680
681 - The systemtap notion of "architecture" now matches the kernel's, rather
682 than that of "uname -m". This means that 32-bit i386 family are all
683 known as "i386" rather than "i386" or "i686"; "ppc64" as "powerpc";
684 "s390x" as "s390", and so on. This is consistent between the new
685 "-a ARCH" flag and the script-level %( arch ... %) conditional.
686
687 - It is now possible to define multiple probe aliases with the same name.
688 A probe will expand to all matching aliases.
689 probe foo = bar { }
690 probe foo = baz { }
691 probe foo { } # expands twice, once to bar and once to baz
692
693 - A new experimental transport mechanism, using ftrace's ring_buffer,
694 has been added. This may become the default transport mechanism in
695 future versions of systemtap. To test this new transport mechanism,
696 define 'STP_USE_RING_BUFFER'.
697
698 - Support for recognizing DW_OP_{stack,implicit}_value DWARF expressions
699 as emitted by GCC 4.5.
700
701 * What's new in version 0.9.9, 2009-08-04
702
703 - Systemwide kernel .function.return (kretprobe) maxactive defaults may
704 be overridden with the -DKRETACTIVE=nnn parameter.
705
706 - Translation pass 2 is significantly faster by avoiding unnecessary
707 searching through a kernel build/module directory tree.
708
709 - When compiled against elfutils 0.142 systemtap now handles the new
710 DW_OP_call_frame_CFA generated by by GCC.
711
712 - uprobes and ustack() are more robust when used on applications that
713 depend on prelinked/separate debuginfo shared libraries.
714
715 - User space PROBE marks are not always found with or without separate
716 debuginfo. The .probes section itself is now always put in the main
717 elf file and marked as allocated. When building pic code the section
718 is marked writable. The selinux memory check problems seen with
719 programs using STAP_PROBES is fixed.
720
721 - statement() probes can now override "address not at start of statement"
722 errors in guru mode. They also provide alternative addresses to use
723 in non-guru mode.
724
725 - The stapgraph application can generate graphs of data and events
726 emitted by systemtap scripts in real time. Run "stapgraph
727 testsuite/systemtap.examples/general/grapher.stp" for an example of
728 graphing the system load average and keyboard events.
729
730 - Dwarf probes now show parameters and local variables in the verbose
731 listing mode (-L).
732
733 - Symbol aliases are now resolved to their canonical dwarf names. For
734 example, probing "malloc" in libc resolves to "__libc_malloc".
735
736 - The syntax for dereferencing $target variables and @cast() gained new
737 capabilities:
738 - Array indexes can now be arbitrary numeric expressions.
739 - Array subscripts are now supported on pointer types.
740 - An '&' operator before a @cast or $target returns the address of the
741 final component, especially useful for nested structures.
742
743 - For reading all probe variables, kernel.mark now supports $$vars and
744 $$parms, and process.syscall now supports $$vars.
745
746 - The SNMP tapset provides probes and functions for many network
747 statistics. See stapprobes.snmp(3stap) for more details.
748
749 - The dentry tapset provides functions to map kernel VFS directory entries
750 to file or full path names: d_path(), d_name() and reverse_path_walk().
751
752 - SystemTap now has userspace markers in its own binaries, and the stap
753 tapset provides the available probepoints and local variables.
754
755 - Miscellaneous new tapset functions:
756 - pgrp() returns the process group ID of the current process
757 - str_replace() performs string replacement
758
759 * What's new in version 0.9.8, 2009-06-11
760
761 - Miscellaneous new tapset functions:
762 - sid() returns the session ID of the current process
763 - stringat() indexes a single character from a string.
764
765 - Using %M in print formats for hex dumps can now print entire buffers,
766 instead of just small numbers.
767
768 - Dwarfless syscalls: The nd_syscalls tapset is now available to probe
769 system calls without requiring kernel debugging information. All of
770 the same probepoints in the normal syscalls tapset are available with
771 an "nd_" prefix, e.g. syscall.open becomes nd_syscall.open. Most
772 syscall arguments are also available by name in nd_syscalls.
773
774 - Module signing: If the appropriate nss libraries are available on your
775 system, stap-server will sign each compiled module using a self-generated
776 certificate. This is the first step toward extending authority to
777 load certain modules to unprivileged users. For now, if the system
778 administrator adds a certificate to a database of trusted signers
779 (stap-authorize-signing-cert), modules signed using that certificate
780 will be verified by staprun against tampering. Otherwise, you should
781 notice no difference in the operation of stap or staprun.
782
783 * What's new in version 0.9.7, 2009-04-23
784
785 - @cast can now determine its type information using an explicit header
786 specification. For example:
787 @cast(tv, "timeval", "<sys/time.h>")->tv_sec
788 @cast(task, "task_struct", "kernel<linux/sched.h>")->tgid
789
790 - The overlapping process.* tapsets are now separated. Those probe points
791 documented in stapprobes(3stap) remain the same. Those that were formerly
792 in stapprobes.process(3stap) have been renamed to kprocess, to reflect
793 their kernel perspective on processes.
794
795 - The --skip-badvars option now also suppresses run-time error
796 messages that would otherwise result from erroneous memory accesses.
797 Such accesses can originate from $context expressions fueled by
798 erroneous debug data, or by kernel_{long,string,...}() tapset calls.
799
800 - New probes kprobe.function(FUNCTION) and kprobe.function(FUNCTION).return
801 for dwarfless probing. These postpone function address resolution to
802 run-time and use the kprobe symbol-resolution mechanism.
803 Probing of absolute statements can be done using the
804 kprobe.statement(ADDRESS).absolute construct.
805
806 - EXPERIMENTAL support for user process unwinding. A new collection of
807 tapset functions have been added to handle user space backtraces from
808 probe points that support them (currently process and timer probes -
809 for timer probes test whether or not in user space first with the
810 already existing user_mode() function). The new tapset functions are:
811 uaddr - User space address of current running task.
812 usymname - Return the symbol of an address in the current task.
813 usymdata - Return the symbol and module offset of an address.
814 print_ustack - Print out stack for the current task from string.
815 print_ubacktrace - Print stack back trace for current task.
816 ubacktrace - Hex backtrace of current task stack.
817 Please read http://sourceware.org/ml/systemtap/2009-q2/msg00364.html
818 on the current restrictions and possible changes in the future and
819 give feedback if you want to influence future developments.
820
821 * What's new in version 0.9.5, 2009-03-27
822
823 - New probes process().insn and process().insn.block that allows
824 inspection of the process after each instruction or block of
825 instructions executed. So to count the total number of instructions
826 a process executes during a run do something like:
827 $ stap -e 'global steps; probe process("/bin/ls").insn {steps++}
828 probe end {printf("Total instructions: %d\n", steps);}' \
829 -c /bin/ls
830 This feature can slow down execution of a process somewhat.
831
832 - Systemtap probes and function man pages extracted from the tapsets
833 are now available under 3stap. To show the page for probe vm.pagefault
834 or the stap function pexecname do:
835 $ man 3stap vm.pagefault
836 $ man 3stap pexecname
837
838 - Kernel tracepoints are now supported for probing predefined kernel
839 events without any debuginfo. Tracepoints incur less overhead than
840 kprobes, and context parameters are available with full type
841 information. Any kernel 2.6.28 and later should have defined
842 tracepoints. Try the following to see what's available:
843 $ stap -L 'kernel.trace("*")'
844
845 - Typecasting with @cast now supports modules search paths, which is
846 useful in case there are multiple places where the type definition
847 may be found. For example:
848 @cast(sdev, "scsi_device", "kernel:scsi_mod")->sdev_state
849
850 - On-file flight recorder is supported. It allows stap to record huge
851 trace log on the disk and to run in background.
852 Passing -F option with -o option runs stap in background mode. In this
853 mode, staprun is detached from console, and stap itself shows staprun's
854 pid and exits.
855 Specifying the max size and the max number of log files are also available
856 by passing -S option. This option has one or two arguments seperated by
857 a comma. The first argument is the max size of a log file in MB. If the
858 size of a log file exceeds it, stap switches to the next log file
859 automatically. The second is how many files are kept on the disk. If the
860 number of log files exceeds it, the oldest log file is removed
861 automatically. The second argument can be omitted.
862
863 For example, this will record output on log files each of them is smaller
864 than 1024MB and keep last 3 logs, in background.
865 % stap -F -o /tmp/staplog -S 1024,3 script.stp
866
867 - In guru mode (-g), the kernel probing blacklist is disabled, leaving
868 only a subset - the kernel's own internal kprobe blacklist - to attempt
869 to filter out areas unsafe to probe. The differences may be enough to
870 probe more interrupt handlers.
871
872 - Variables unavailable in current context may be skipped by setting a
873 session level flag with command line option --skip-badvars now available.
874 This replaces any dwarf $variable expressions that could not be resolved
875 with literal numeric zeros, along with a warning message.
876
877 - Both kernel markers and kernel tracepoint support argument listing
878 through stap -L 'kernel.mark("*")' or stap -L 'kernel.trace("*")'
879
880 - Users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in
881 their script, at the cost of a bit more overhead to toggle the
882 interrupt mask.
883
884 - Added reentrancy debugging. If stap is run with the arguments
885 "-t -DDEBUG_REENTRANCY", additional warnings will be printed for
886 every reentrancy event, including the probe points of the
887 resident and interloper probes.
888
889 - Default to --disable-pie for configure.
890 Use --enable-pie to turn it back on.
891
892 - Improved sdt.h compatibility and test suite for static dtrace
893 compatible user space markers.
894
895 - Some architectures now use syscall wrappers (HAVE_SYSCALL_WRAPPERS).
896 The syscall tapset has been enhanced to take care of the syscall
897 wrappers in this release.
898
899 - Security fix for CVE-2009-0784: stapusr module-path checking race.
900
901 * What's new in version 0.9, 2009-02-19
902
903 - Typecasting is now supported using the @cast operator. A script can
904 define a pointer type for a "long" value, and then access type members
905 using the same syntax as with $target variables. For example, this will
906 retrieve the parent pid from a kernel task_struct:
907 @cast(pointer, "task_struct", "kernel")->parent->pid
908
909 - process().mark() probes are now possible to trace static user space
910 markers put in programs with the STAP_PROBE macro using the new
911 sys/sdt.h include file. This also provides dtrace compatible markers
912 through DTRACE_PROBE and an associated python 'dtrace' script that
913 can be used in builds based on dtrace that need dtrace -h or -G
914 functionality.
915
916 - For those that really want to run stap from the build tree there is
917 now the 'run-stap' script in the top-level build directory that sets
918 up the SYSTEMTAP_TAPSET, SYSTEMTAP_RUNTIME, SYSTEMTAP_STAPRUN, and
919 SYSTEMTAP_STAPIO environment variables (installing systemtap, in a
920 local prefix, is still recommended for common use).
921
922 - Systemtap now comes with a new Beginners Guide that walks the user
923 through their first steps setting up stap, understanding how it all
924 works, introduces some useful scripts and describes some common
925 pitfalls. It isn't created by default since it needs a Publican
926 setup, but full build instructions can be found in the wiki:
927 http://sourceware.org/systemtap/wiki/PublicanQuikHowto
928 An online version can be found at:
929 http://sourceware.org/systemtap/SystemTap_Beginners_Guide.pdf
930
931 - Standard tapsets included with Systemtap were modified to include
932 extractable documentation information based on the kernel-doc
933 infrastructure. When configured --enabled-docs a HTML and PDF
934 version of the Tapset Reference Manual is produced explaining probes
935 defined in each tapset.
936
937 - The systemtap client and compile server are now available.
938 These allow you to compile a systemtap module on a host other than
939 the one which it will be run, providing the client and server
940 are compatible. Other than using a server for passes 1 through
941 4, the client behaves like the 'stap' front end itself. This
942 means, among other things, that the client will automatically
943 load the resulting module on the local host unless -p[1234]
944 was specified. See stap-server(8) for more details.
945 The client/server now use SSL for network connection security and
946 for signing.
947
948 The systemtap client and server are prototypes only. Interfaces, options
949 and usage may change at any time.
950
951 - function("func").label("label") probes are now supported to allow matching
952 the label of a function.
953
954 - Systemtap initscript is available. This initscript allows you to run
955 systemtap scripts as system services (in flight recorder mode) and
956 control those scripts individually.
957 See README.systemtap for details.
958
959 - The stap "-r DIR" option may be used to identify a hand-made kernel
960 build directory. The tool determines the appropriate release string
961 automatically from the directory.
962
963 - Serious problems associated with user-space probing in shared libraries
964 were corrected, making it now possible to experiment with probe shared
965 libraries. Assuming dwarf debugging information is installed, use this
966 twist on the normal syntax:
967
968 probe process("/lib64/libc-2.8.so").function("....") { ... }
969
970 This would probe all threads that call into that library. Running
971 "stap -c CMD" or "stap -x PID" naturally restricts this to the target
972 command+descendants only. $$vars etc. may be used.
973
974 - For scripts that sometimes terminate with excessive "skipped" probes,
975 rerunning the script with "-t" (timing) will print more details about
976 the skippage reasons.
977
978 - Symbol tables and unwind (backtracing) data support were formerly
979 compiled in for all probed modules as identified by the script
980 (kernel; module("name"); process("file")) plus those listed by the
981 stap "-d BINARY" option. Now, this data is included only if the systemtap
982 script uses tapset functions like probefunc() or backtrace() that require
983 such information. This shrinks the probe modules considerably for the rest.
984
985 - Per-pass verbosity control is available with the new "--vp {N}+" option.
986 "stap --vp 040" adds 4 units of -v verbosity only to pass 2. This is useful
987 for diagnosing errors from one pass without excessive verbosity from others.
988
989 - Most probe handlers now run with interrupts enabled, for improved
990 system responsiveness and less probing overhead. This may result
991 in more skipped probes, for example if a reentrant probe handler
992 is attempted from within an interrupt handler. It may also make the
993 systemtap overload detection facility more likely to be triggered, as
994 interrupt handlers' run time would be included in the self-assessed
995 overhead of running probe handlers.
996
997 * What's new in version 0.8, 2008-11-13
998
999 - Cache limiting is now available. If the compiled module cache size is
1000 over a limit specified in the $SYSTEMTAP_DIR/cache/cache_mb_limit file,
1001 some old cache entries will be unlinked. See man stap(1) for more.
1002
1003 - Error and warning messages are now followed by source context displaying
1004 the erroneous line/s and a handy '^' in the following line pointing to the
1005 appropriate column.
1006
1007 - A bug reporting tool "stap-report" is now available which will quickly
1008 retrieve much of the information requested here:
1009 http://sourceware.org/systemtap/wiki/HowToReportBugs
1010
1011 - The translator can resolve members of anonymous structs / unions:
1012 given struct { int foo; struct { int bar; }; } *p;
1013 this now works: $p->bar
1014
1015 - The stap "-F" flag activates "flight recorder" mode, which consists of
1016 translating the given script as usual, but implicitly launching it into
1017 the background with staprun's existing "-L" (launch) option. A user
1018 can later reattach to the module with "staprun -A MODULENAME".
1019
1020 - Additional context variables are available on user-space syscall probes.
1021 - $argN ($arg1, $arg2, ... $arg6) in process(PATH_OR_PID).syscall
1022 gives you the argument of the system call.
1023 - $return in process(PATH_OR_PID).syscall.return gives you the return
1024 value of the system call.
1025
1026 - Target process mode (stap -c CMD or -x PID) now implicitly restricts all
1027 "process.*" probes to the given child process. (It does not affect
1028 kernel.* or other probe types.) The CMD string is normally run directly,
1029 rather than via a /bin/sh -c subshell, since then utrace/uprobe probes
1030 receive a fairly "clean" event stream. If metacharacters like
1031 redirection operators were present in CMD, then "sh -c CMD" is still
1032 used, and utrace/uprobe probes will receive events from the shell.
1033
1034 % stap -e 'probe process.syscall, process.end {
1035 printf("%s %d %s\n", execname(), pid(), pp())}'\
1036 -c ls
1037 ls 2323 process.syscall
1038 ls 2323 process.syscall
1039 ls 2323 process.end
1040
1041 - Probe listing mode is improved: "-L" lists available script-level variables
1042
1043 % stap -L 'syscall.*open*'
1044 syscall.mq_open name:string name_uaddr:long filename:string mode:long u_attr_uaddr:long oflag:long argstr:string
1045 syscall.open name:string filename:string flags:long mode:long argstr:string
1046 syscall.openat name:string filename:string flags:long mode:long argstr:string
1047
1048 - All user-space-related probes support $PATH-resolved executable
1049 names, so
1050
1051 probe process("ls").syscall {}
1052 probe process("./a.out").syscall {}
1053
1054 work now, instead of just
1055
1056 probe process("/bin/ls").syscall {}
1057 probe process("/my/directory/a.out").syscall {}
1058
1059 - Prototype symbolic user-space probing support:
1060
1061 # stap -e 'probe process("ls").function("*").call {
1062 log (probefunc()." ".$$parms)
1063 }' \
1064 -c 'ls -l'
1065
1066 This requires:
1067 - debugging information for the named program
1068 - a version of utrace in the kernel that is compatible with the "uprobes"
1069 kernel module prototype. This includes RHEL5 and older Fedora, but not
1070 yet current lkml-track utrace; a "pass 4a"-time build failure means
1071 your system cannot use this yet.
1072
1073 - Global variables which are written to but never read are now
1074 automatically displayed when the session does a shutdown. For example:
1075
1076 global running_tasks
1077 probe timer.profile {running_tasks[pid(),tid()] = execname()}
1078 probe timer.ms(8000) {exit()}
1079
1080 - A formatted string representation of the variables, parameters, or local
1081 variables at a probe point is now supported via the special $$vars,
1082 $$parms, and $$locals context variables, which expand to a string
1083 containing a list "var1=0xdead var2=0xbeef var3=?". (Here, var3 exists
1084 but is for some reason unavailable.) In return probes only, $$return
1085 expands to an empty string for a void function, or "return=0xf00".
1086
1087
1088 * What's new in version 0.7, 2008-07-15
1089
1090 - .statement("func@file:*") and .statement("func@file:M-N") probes are now
1091 supported to allow matching a range of lines in a function. This allows
1092 tracing the execution of a function.
1093
1094 - Scripts relying on probe point wildcards like "syscall.*" that expand
1095 to distinct kprobes are processed significantly faster than before.
1096
1097 - The vector of script command line arguments is available in a
1098 tapset-provided global array argv[]. It is indexed 1 ... argc,
1099 another global. This can substitute for of preprocessor
1100 directives @NNN that fail at parse time if there are not
1101 enough arguments.
1102
1103 printf("argv: %s %s %s", argv[1], argv[2], argv[3])
1104
1105 - .statement("func@file+line") probes are now supported to allow a
1106 match relative to the entry of the function incremented by line
1107 number. This allows using the same systemtap script if the rest
1108 of the file.c source only changes slightly.
1109
1110 - A probe listing mode is available.
1111 % stap -l vm.*
1112 vm.brk
1113 vm.mmap
1114 vm.munmap
1115 vm.oom_kill
1116 vm.pagefault
1117 vm.write_shared
1118
1119 - More user-space probe types are added:
1120
1121 probe process(PID).begin { }
1122 probe process("PATH").begin { }
1123 probe process(PID).thread.begin { }
1124 probe process("PATH").thread.begin { }
1125 probe process(PID).end { }
1126 probe process("PATH").end { }
1127 probe process(PID).thread.end { }
1128 probe process("PATH").thread.end { }
1129 probe process(PID).syscall { }
1130 probe process("PATH").syscall { }
1131 probe process(PID).syscall.return { }
1132 probe process("PATH").syscall.return { }
1133
1134 - Globals now accept ; terminators
1135
1136 global odds, evens;
1137 global little[10], big[5];
1138
1139 * What's new in version 0.6, 2007-12-15
1140
1141 - A copy of the systemtap tutorial and language reference guide
1142 are now included.
1143
1144 - There is a new format specifier, %m, for the printf family of
1145 functions. It functions like %s, except that it does not stop when
1146 a nul ('\0') byte is encountered. The number of bytes output is
1147 determined by the precision specifier. The default precision is 1.
1148 For example:
1149
1150 printf ("%m", "My String") // prints one character: M
1151 printf ("%.5", myString) // prints 5 bytes beginning at the start
1152 // of myString
1153
1154 - The %b format specifier for the printf family of functions has been enhanced
1155 as follows:
1156
1157 1) When the width and precision are both unspecified, the default is %8.8b.
1158 2) When only one of the width or precision is specified, the other defaults
1159 to the same value. For example, %4b == %.4b == %4.4b
1160 3) Nul ('\0') bytes are used for field width padding. For example,
1161
1162 printf ("%b", 0x1111deadbeef2222) // prints all eight bytes
1163 printf ("%4.2b", 0xdeadbeef) // prints \0\0\xbe\xef
1164
1165 - Dynamic width and precision are now supported for all printf family format
1166 specifiers. For example:
1167
1168 four = 4
1169 two = 2
1170 printf ("%*.*b", four, two, 0xdeadbbeef) // prints \0\0\xbe\xef
1171 printf ("%*d", four, two) // prints <space><space><space>2
1172
1173 - Preprocessor conditional expressions can now include wildcard style
1174 matches on kernel versions.
1175 %( kernel_vr != "*xen" %? foo %: bar %)
1176
1177 - Prototype support for user-space probing is showing some progress.
1178 No symbolic notations are supported yet (so no probing by function names,
1179 file names, process names, and no access to $context variables), but at
1180 least it's something:
1181
1182 probe process(PID).statement(ADDRESS).absolute { }
1183
1184 This will set a uprobe on the given process-id and given virtual address.
1185 The proble handler runs in kernel-space as usual, and can generally use
1186 existing tapset functions.
1187
1188 - Crash utility can retrieve systemtap's relay buffer from a kernel dump
1189 image by using staplog which is a crash extension module. To use this
1190 feature, type commands as below from crash(8)'s command line:
1191
1192 crash> extend staplog.so
1193 crash> help systemtaplog
1194
1195 Then, you can see more precise help message.
1196
1197 - You can share a relay buffer amoung several scripts and merge outputs from
1198 several scripts by using "-DRELAY_HOST" and "-DRELAY_GUEST" options.
1199 For example:
1200
1201 # run a host script
1202 % stap -ve 'probe begin{}' -o merged.out -DRELAY_HOST &
1203 # wait until starting the host.
1204 % stap -ve 'probe begin{print("hello ");exit()}' -DRELAY_GUEST
1205 % stap -ve 'probe begin{print("world\n");exit()}' -DRELAY_GUEST
1206
1207 Then, you'll see "hello world" in merged.out.
1208
1209 - You can add a conditional statement for each probe point or aliase, which
1210 is evaluated when the probe point is hit. If the condition is false, the
1211 whole probe body(including aliases) is skipped. For example:
1212
1213 global switch = 0;
1214 probe syscall.* if (switch) { ... }
1215 probe procfs.write {switch = strtol($value,10)} /* enable/disable ctrl */
1216
1217 - Systemtap will warn you if your script contains unused variables or
1218 functions. This is helpful in case of misspelled variables. If it
1219 doth protest too much, turn it off with "stap -w ...".
1220
1221 - You can add error-handling probes to a script, which are run if a
1222 script was stopped due to errors. In such a case, "end" probes are
1223 not run, but "error" ones are.
1224
1225 probe error { println ("oops, errors encountered; here's a report anyway")
1226 foreach (coin in mint) { println (coin) } }
1227
1228 - In a related twist, one may list probe points in order of preference,
1229 and mark any of them as "sufficient" beyond just "optional". Probe
1230 point sequence expansion stops if a sufficient-marked probe point has a hit.
1231 This is useful for probes on functions that may be in a module (CONFIG_FOO=m)
1232 or may have been compiled into the kernel (CONFIG_FOO=y), but we don't know
1233 which. Instead of
1234
1235 probe module("sd").function("sd_init_command") ? ,
1236 kernel.function("sd_init_command") ? { ... }
1237
1238 which might match neither, now one can write this:
1239
1240 probe module("sd").function("sd_init_command") ! , /* <-- note excl. mark */
1241 kernel.function("sd_init_command") { ... }
1242
1243 - New security model. To install a systemtap kernel module, a user
1244 must be one of the following: the root user; a member of the
1245 'stapdev' group; or a member of the 'stapusr' group. Members of the
1246 stapusr group can only use modules located in the
1247 /lib/modules/VERSION/systemtap directory (where VERSION is the
1248 output of "uname -r").
1249
1250 - .statement("...@file:line") probes now apply heuristics to allow an
1251 approximate match for the line number. This works similarly to gdb,
1252 where a breakpoint placed on an empty source line is automatically
1253 moved to the next statement. A silly bug that made many $target
1254 variables inaccessible to .statement() probes was also fixed.
1255
1256 - LKET has been retired. Please let us know on <systemtap@sourceware.org>
1257 if you have been a user of the tapset/tools, so we can help you find
1258 another way.
1259
1260 - New families of printing functions println() and printd() have been added.
1261 println() is like print() but adds a newline at the end;
1262 printd() is like a sequence of print()s, with a specified field delimiter.
1263
1264 * What's new since version 0.5.14?, 2007-07-03
1265
1266 - The way in which command line arguments for scripts are substituted has
1267 changed. Previously, $1 etc. would interpret the corresponding command
1268 line argument as an numeric literal, and @1 as a string literal. Now,
1269 the command line arguments are pasted uninterpreted wherever $1 etc.
1270 appears at the beginning of a token. @1 is similar, but is quoted as
1271 a string. This change does not modify old scripts, but has the effect
1272 of permitting substitution of arbitrary token sequences.
1273
1274 # This worked before, and still does:
1275 % stap -e 'probe timer.s($1) {}' 5
1276 # Now this also works:
1277 % stap -e 'probe syscall.$1 {log(@1)}' open
1278 # This won't crash, just signal a recursion error:
1279 % stap -e '$1' '$1'
1280 # As before, $1... is recognized only at the beginning of a token
1281 % stap -e 'probe begin {foo$1=5}'
1282
1283 * What's new since version 0.5.13?, 2007-03-26
1284
1285 - The way in which systemtap resolves function/inline probes has changed:
1286 .function(...) - now refers to all functions, inlined or not
1287 .inline(...) - is deprecated, use instead:
1288 .function(...).inline - filters function() to only inlined instances
1289 .function(...).call - filters function() to only non-inlined instances
1290 .function(...).return - as before, but now pairs best with .function().call
1291 .statement() is unchanged.
1292
1293 * What's new since version 0.5.12?, 2007-01-01
1294
1295 - When running in -p4 (compile-only) mode, the compiled .ko file name
1296 is printed on standard output.
1297
1298 - An array element with a null value such as zero or an empty string
1299 is now preserved, and will show up in a "foreach" loop or "in" test.
1300 To delete such an element, the scripts needs to use an explicit
1301 "delete array[idx]" statement rather than something like "array[idx]=0".
1302
1303 - The new "-P" option controls whether prologue searching heuristics
1304 will be activated for function probes. This was needed to get correct
1305 debugging information (dwarf location list) data for $target variables.
1306 Modern compilers (gcc 4.1+) tend not to need this heuristic, so it is
1307 no longer default. A new configure flag (--enable-prologues) restores
1308 it as a default setting, and is appropriate for older compilers (gcc 3.*).
1309
1310 - Each systemtap module prints a one-line message to the kernel informational
1311 log when it starts. This line identifies the translator version, base
1312 address of the probe module, a broken-down memory consumption estimate, and
1313 the total number of probes. This is meant as a debugging / auditing aid.
1314
1315 - Begin/end probes are run with interrupts enabled (but with
1316 preemption disabled). This will allow begin/end probes to be
1317 longer, to support generating longer reports.
1318
1319 - The numeric forms of kernel.statement() and kernel.function() probe points
1320 are now interpreted as relocatable values - treated as relative to the
1321 _stext symbol in that kernel binary. Since some modern kernel images
1322 are relocated to a different virtual address at startup, such addresses
1323 may shift up or down when actually inserted into a running kernel.
1324
1325 kernel.statement(0xdeadbeef): validated, interpreted relative to _stext,
1326 may map to 0xceadbeef at run time.
1327
1328 In order to specify unrelocated addresses, use the new ".absolute"
1329 probe point suffix for such numeric addresses. These are only
1330 allowed in guru mode, and provide access to no $target variables.
1331 They don't use debugging information at all, actually.
1332
1333 kernel.statement(0xfeedface).absolute: raw, unvalidated, guru mode only
1334
1335 * What's new since version 0.5.10?, 2006-10-19
1336
1337 - Offline processing of debugging information, enabling general
1338 cross-compilation of probe scripts to remote hosts, without
1339 requiring identical module/memory layout. This slows down
1340 compilation/translation somewhat.
1341
1342 - Kernel symbol table data is loaded by staprun at startup time
1343 rather than compiled into the module.
1344
1345 - Support the "limit" keyword for foreach iterations:
1346 foreach ([x,y] in ary limit 5) { ... }
1347 This implicitly exits after the fifth iteration. It also enables
1348 more efficient key/value sorting.
1349
1350 - Support the "maxactive" keyword for return probes:
1351 probe kernel.function("sdfsdf").maxactive(848) { ... }
1352 This allows up to 848 concurrently outstanding entries to
1353 the sdfsdf function before one returns. The default maxactive
1354 number is smaller, and can result in missed return probes.
1355
1356 - Support accessing of saved function arguments from within
1357 return probes. These values are saved by a synthesized
1358 function-entry probe.
1359
1360 - Add substantial version/architecture checking in compiled probes to
1361 assert correct installation of debugging information and correct
1362 execution on a compatible kernel.
1363
1364 - Add probe-time checking for sufficient free stack space when probe
1365 handlers are invoked, as a safety improvement.
1366
1367 - Add an optional numeric parameter for begin/end probe specifications,
1368 to order their execution.
1369 probe begin(10) { } /* comes after */ probe begin(-10) {}
1370
1371 - Add an optional array size declaration, which is handy for very small
1372 or very large ones.
1373 global little[5], big[20000]
1374
1375 - Include some example scripts along with the documentation.
1376
1377 - Change the start-time allocation of probe memory to avoid causing OOM
1378 situations, and to abort cleanly if free kernel memory is short.
1379
1380 - Automatically use the kernel DWARF unwinder, if present, for stack
1381 tracebacks.
1382
1383 - Many minor bug fixes, performance, tapset, and error message
1384 improvements.
This page took 0.100271 seconds and 5 git commands to generate.