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