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