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