-
Notifications
You must be signed in to change notification settings - Fork 3
/
NEWS
1886 lines (1487 loc) · 85 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
* What's new in version 2.5
- SystemTap now reports more accurate and succinct errors on type
mismatches.
* What's new in version 2.4, 2013-11-06
- Better suggestions are given in many of the semantic errors in which
alternatives are provided. Additionally, suggestions are now provided
when plt and trace probes could not be resolved. For example,
kernel.trace("sched_siwtch") will suggest 'sched_switch'.
- SystemTap is now smarter about error reporting. Errors from the same
source are considered duplicates and suppressed. A message is
displayed on exit if any errors/warnings were suppressed.
- Statistics aggregate typed objects are now implemented locklessly,
if the translator finds that they are only ever read (using the
foreach / @count / etc. constructs) in a probe-begin/end/error.
- SystemTap now supports probing inside virtual machines using the
libvirt and unix schemes, e.g.
stap -ve 'probe timer.s(1) { printf("hello!\n") }' \
--remote=libvirt://MyVirtualMachine
Virtual machines managed by libvirt can be prepared using stapvirt.
See stapvirt(1) and the --remote option in stap(1) for more details.
- Systemtap now checks for and uses (when available) the .gnu_debugdata
section which contains a subset of debuginfo, useful for backtraces
and function probing
- SystemTap map variables are now allocated with vmalloc() instead of
with kmalloc(), which should cause memory to be less fragmented.
- Although SystemTap itself requires elfutils 0.148+, staprun only
requires elfutils 0.142+, which could be useful with the
'--disable-translator' configure switch.
- Under FIPS mode (/proc/sys/crypto/fips_enabled=1), staprun will
refuse to load systemtap modules (since these are not normally
signed with the kernel's build-time keys). This protection may
be suppressed with the $STAP_FIPS_OVERRIDE environment variable.
- The stap-server client & server code now enable all SSL/TLS
ciphers rather than just the "export" subset.
- For systems with in-kernel utrace, 'process.end' and 'thread.end'
probes will hit before the target's parent process is notified of
the target's death. This matches the behavior of newer kernels
without in-kernel utrace.
* What's new in version 2.3, 2013-07-25
- More context-accessing functions throw systemtap exceptions upon a
failure, whereas in previous versions they might return non-error
sentinel values like "" or "<unknown>". Use try { } / catch { }
around these, or new wrapper functions such as user_string_{n_}quoted()
that internally absorb exceptions.
- java("org.my.MyApp") probes are now restricted to pre-existing jvm pid's with
a listing in jps -l output to avoid recursive calls
- The tapset [nd_]syscall.semop parameter tsops_uaddr is renamed sops_uaddr for
consistency with [nd_]syscall.semtimedop.
- The udp.stp tapset adds some ip-address/port variables.
- A new guru-mode-only tapset function raise() is available to send signals
to the current task.
- Support for the standard Posix ERE named character classes has been
added to the regexp engine, e.g. [:digit:], [:alpha:], ...
- A substantial internal overhaul of the regexp engine has resulted in
correct behaviour on further obscure edge cases. The regexp engine
now implements the ERE standard and correctly passes the testsuite
for the glibc regexp engine (minus portions corresponding to
unimplemented features -- i.e. subexpression capture and reuse).
- Alternative functions are now suggested when function probes could not be
resolved. For example, kernel.function("vfs_reads") will suggest vfs_read.
Other probes for which suggestions are made are module.function,
process.function, and process.library.function.
- Has life been a bit bland lately? Want to spice things up? Why not write a
few faulty probes and feast your eyes upon the myriad of colours adorning
your terminal as SystemTap softly whispers in your ear... 'parse error'.
Search for '--color' in 'man stap' for more info.
- The following tapset functions are deprecated in release 2.3:
'stap_NFS_CLIENT', '__getfh_inode', '_success_check',
'_sock_prot_num', '_sock_fam_num', '_sock_state_num',
'_sock_type_num', and '_sock_flags_num'.
* What's new in version 2.2.1, 2013-05-16
* What's new in version 2.2, 2013-05-14
- Experimental support has been added for probing Java methods using
Byteman 2.0 as a backend. Java method probes can target method entries,
returns, or specific statements in the method as specified by line number.
probe java("org.my.MyApp").class("^java.lang.Object").method("foo(int)")
{ println($$parms) }
See java/README for information on how to set up Java/Byteman
functionality. Set env STAPBM_VERBOSE=yes for more tracing.
- The stap -l output and pn() tapset function's return value may be slightly
different for complicated web of wildcarded/aliased probes.
- The dyninst backend has improved in several aspects:
- Setting custom values for global variables is now supported, both
with -G when compiling a script, and from the stapdyn command line
when loading a precompiled module.
- A high-performance shared-memory-based transport is used for
trace data.
- A systemd service file and tmpfile have been added to allow
systemtap-server to be managed natively by systemd.
- Due to the removal of register_timer_hook in recent kernels, the
behaviour of timer.profile has been changed slightly. This probe is
now an alias which uses the old mechanism where possible, but falls
back to perf.sw.cpu_clock or another mechanism when the kernel timer
hook is not available.
To require the kernel timer hook mechanism in your script, use
timer.profile.tick instead of timer.profile.
- The following tapset variables are deprecated in release 2.2:
- The 'origin' variables in the 'generic.fop.llseek',
'generic.fop.llseek.return', and 'nfs.fop.llseek' probes. The
'origin' variable has been replaced by the 'whence' variable.
- The 'page_index' variable in the 'vfs.block_sync_page' and
'vfs.buffer_migrate_page' probe aliases.
- The 'write_from' and 'write_upto' variables in the
'_vfs.block_prepare_write' and '_vfs.block_prepare_write.return'
probe aliases.
- The 'regs' variable in the 'syscall.sigaltstack',
'nd_syscall.sigaltstack', 'syscall.fork', and 'nd_syscall.fork'
probe aliases.
- The 'first', 'second', 'third', and 'uptr_uaddr' variables in the
'syscall.compat_sys_shmat' and 'nd_syscall.compat_sys_shmat' probe
aliases.
- The following tapset functions are deprecated in release 2.2:
'ppos_pos', '_dev_minor', and '_dev_major'
- The folowing tapset functions used to return error strings instead
of raising an error. The original behavior is deprecated in release
2.2.
'ctime', 'probemod', 'modname'
* What's new in version 2.1, 2013-02-13
- EMACS and VIM editor modes for systemtap source files are included / updated.
- The translator now eliminates duplicate tapset files between its
preferred directory (as configured during the build with --prefix=/
or specified with the -I /path option), and files it may find under
$XDG_DATA_DIRS. This should eliminate a class of conflicts between
parallel system- and hand-built systemtap installations.
- The translator accepts a --suppress-time-limits option, which defeats
time-related constraints, to allows probe handlers to run for indefinite
periods. It requires the guru mode (-g) flag to work. Add the earlier
--suppress-handler-errors flag for a gung-ho "just-keep-going" attitude.
- Perf event probes may now be read on demand. The counter probe is
defined using the counter-name part:
probe perf.type(0).config(0).counter("NAME"). The counter is
read in a user space probe using @perf("NAME"), e.g.
process("PROCESS").statement("func@file") {stat <<< @perf("NAME")}
- Perf event probes may now be bound to a specific task using the
process-name part: probe perf.type(0).config(0).process("NAME") { }
If the probed process name is not specified, then it is inferred
from the -c CMD argument.
- Some error messages and warnings now refer to additional information
that is found in man pages. These are generally named
error::FOO or warning::BAR (in the 7stap man page section)
and may be read via
% man error::FOO
% man warning::BAR
- The dyninst backend has improved in several aspects:
- The runtime now allows much more concurrency when probing multithreaded
processes, and will also follow probes across forks.
- Several new probe types are now supported, including timers, function
return, and process.begin/end and process.thread.begin/end.
- Semaphores for SDT probes are now set properly.
- Attaching to existing processes with -x PID now works.
- The foreach looping construct can now sort aggregate arrays by the user's
choice of aggregating function. Previously, @count was implied. e.g.:
foreach ([x,y] in array @sum +) { println(@sum(array[x,y])) }
- Proof of concept support for regular expression matching has been added:
if ("aqqqqqb" =~ "q*b") { ... }
if ("abc" !~ "q*b") { ... }
The eventual aim is to support roughly the same functionality as
the POSIX Extended Regular Expressions implemented by glibc.
Currently missing features include extraction of the matched string
and subexpressions, and named character classes ([:alpha:], [:digit:], &c).
Special thanks go to the re2c project, whose public domain code this
functionality has been based on. For more info on re2c, see:
http://sourceforge.net/projects/re2c/
- The folowing tapset variables are deprecated in release 2.1 and will
be removed in release 2.2:
- The 'send2queue' variable in the 'signal.send' probe.
- The 'oldset_addr' and 'regs' variables in the 'signal.handle' probe.
- The following tapset probes are deprecated in release 2.1 and will
be removed in release 2.2:
- signal.send.return
- signal.handle.return
* What's new in version 2.0, 2012-10-09
- Systemtap includes a new prototype backend, which uses Dyninst to instrument
a user's own processes at runtime. This backend does not use kernel modules,
and does not require root privileges, but is restricted with respect to the
kinds of probes and other constructs that a script may use.
Users from source should configure --with-dyninst and install a
fresh dyninst snapshot such as that in Fedora rawhide. It may be
necessary to disable conflicting selinux checks; systemtap will advise.
Select this new backend with the new stap option --runtime=dyninst
and a -c target process, along with normal options. (-x target
processes are not supported in this prototype version.) For example:
stap --runtime=dyninst -c 'stap -l begin' \
-e 'probe process.function("main") { println("hi from dyninst!") }'
- To aid diagnosis, when a kernel panic occurs systemtap now uses
the panic_notifier_list facility to dump a summary of its trace
buffers to the serial console.
- The systemtap preprocessor now has a simple macro facility as follows:
@define add(a,b) %( ((@a)+(@b)) %)
@define probegin(x) %(
probe begin {
@x
}
%)
@probegin( foo = @add(40, 2); print(foo) )
Macros defined in the user script and regular tapset .stp files are
local to the file. To get around this, the tapset library can define
globally visible 'library macros' inside .stpm files. (A .stpm file
must contain a series of @define directives and nothing else.)
The status of the feature is experimental; semantics of macroexpansion
may change (unlikely) or expand in the future.
- Systemtap probe aliases may be used with additional suffixes
attached. The suffixes are passed on to the underlying probe
point(s) as shown below:
probe foo = bar, baz { }
probe foo.subfoo.option("gronk") { }
// expands to: bar.subfoo.option("gronk"), baz.subfoo.option("gronk")
In practical terms, this allows us to specify additional options to
certain tapset probe aliases, by writing e.g.
probe syscall.open.return.maxactive(5) { ... }
- To support the possibility of separate kernel and dyninst backends,
the tapsets have been reorganized into separate folders according to
backend. Thus kernel-specific tapsets are located under linux/, the
dyninst-specific ones under dyninst/
- The backtrace/unwind tapsets have been expanded to allow random
access to individual elements of the backtrace. (A caching mechanism
ensures that the backtrace computation run at most once for each
time a probe fires, regardless of how many times or what order the
query functions are called in.) New tapset functions are:
stack/ustack - return n'th element of backtrace
callers/ucallers - return first n elements of backtrace
print_syms/print_usyms - print full information on a list of symbols
sprint_syms/sprint_usyms - as above, but return info as a string
The following existing functions have been superseded by print_syms()
et al.; new scripts are recommended to avoid using them:
print_stack()
print_ustack()
sprint_stack()
sprint_ustack()
- The probefunc() tapset function is now myproc-unprivileged, and can
now be used in unprivileged scripts for such things as profiling in
userspace programs. For instance, try running
systemtap.examples/general/para-callgraph.stp in unprivileged mode
with a stapusr-permitted probe. The previous implementation of
probefunc() is available with "stap --compatible=1.8".
- Preprocessor conditional to vary code based on script privilege level:
unprivileged -- %( systemtap_privilege == "stapusr" %? ... %)
privileged -- %( systemtap_privilege != "stapusr" %? ... %)
or, alternately %( systemtap_privilege == "stapsys"
|| systemtap_privilege == "stapdev" %? ... %)
- To ease migration to the embedded-C locals syntax introduced in 1.8
(namely, STAP_ARG_* and STAP_RETVALUE), the old syntax can now be
re-enabled on a per-function basis using the /* unmangled */ pragma:
function add_foo:long(a:long, b:long) %{ /* unmangled */
THIS->__retvalue = THIS->a + STAP_ARG_b;
%}
Note that both the old and the new syntax may be used in an
/* unmangled */ function. Functions not marked /* unmangled */
can only use the new syntax.
- Adjacent string literals are now glued together irrespective of
intervening whitespace or comments:
"foo " "bar" --> "foo bar"
"foo " /* comment */ "bar" --> "foo bar"
Previously, the first pair of literals would be glued correctly,
while the second would cause a syntax error.
* What's new in version 1.8, 2012-06-17
- staprun accepts a -T timeout option to allow less frequent wake-ups
to poll for low-throughput output from scripts.
- When invoked by systemtap, the kbuild $PATH environment is sanitized
(prefixed with /usr/bin:/bin:) in an attempt to exclude compilers
other than the one the kernel was presumed built with.
- Printf formats can now use "%#c" to escape non-printing characters.
- Pretty-printed bitfields use integers and chars use escaped formatting
for printing.
- The systemtap compile-server and client now support IPv6 networks.
- IPv6 addresses may now be specified on the --use-server option and will
be displayed by --list-servers, if the avahi-daemon service is running and
has IPv6 enabled.
- Automatic server selection will automatically choose IPv4 or IPv6 servers
according to the normal server selection criteria when avahi-daemon is
running. One is not preferred over the other.
- The compile-server will automatically listen on IPv6 addresses, if
available.
- To enable IPv6 in avahi-daemon, ensure that /etc/avahi/avahi-daemon.conf
contains an active "use-ipv6=yes" line. After adding this line run
"service avahi-daemon restart" to activate IPv6 support.
- See man stap(1) for details on how to use IPv6 addresses with the
--use-server option.
- Support for DWARF4 .debug_types sections (for executables and shared
libraries compiled with recent GCC's -gdwarf-4 / -fdebug-types-section).
PR12997. SystemTap now requires elfutils 0.148+, full .debug_types support
depends on elfutils 0.154+.
- Systemtap modules are somewhat smaller & faster to compile. Their
debuginfo is now suppressed by default; use -B CONFIG_DEBUG_INFO=y to
re-enable.
- @var now an alternative language syntax for accessing DWARF variables
in uprobe and kprobe handlers (process, kernel, module). @var("somevar")
can be used where $somevar can be used. The @var syntax also makes it
possible to access non-local, global compile unit (CU) variables by
specifying the CU source file as follows @var("somevar@some/src/file.c").
This will provide the target variable value of global "somevar" as defined
in the source file "some/src/file.c". The @var syntax combines with all
normal features of DWARF target variables like @defined(), @entry(),
[N] array indexing, field access through ->, taking the address with
the & prefix and shallow or deep pretty printing with a $ or $$ suffix.
- Stap now has resource limit options:
--rlimit-as=NUM
--rlimit-cpu=NUM
--rlimit-nproc=NUM
--rlimit-stack=NUM
--rlimit-fsize=NUM
All resource limiting has been moved from the compile server to stap
itself. When running the server as "stap-server", default resource
limit values are specified in ~stap-server/.systemtap/rc.
- Bug CVE-2012-0875 (kernel panic when processing malformed DWARF unwind data)
is fixed.
- The systemtap compile-server now supports multiple concurrent connections.
Specify the desired maximum number of concurrent connections with
the new stap-server/stap-serverd --max-threads option. Specify a
value of '0' to tell the server not to spawn any new threads (handle
all connections serially in the main thread). The default value is
the number of processor cores on the host.
- The following tapset functions are deprecated in release 1.8 and will be
removed in release 1.9:
daddr_to_string()
- SystemTap now mangles local variables to avoid collisions with C
headers included by tapsets. This required a change in how
embedded-C functions access local parameters and the return value slot.
Instead of THIS->foo in an embedded-C function, please use the newly
defined macro STAP_ARG_foo (substitute the actual name of the
argument for 'foo'); instead of THIS->__retvalue, use the newly
defined STAP_RETVALUE. All of the tapsets and test cases have been
adapted to use this new notation.
If you need to run code which uses the old THIS-> notation, run stap
with the --compatible=1.7 option.
- There is updated support for user-space probing against kernels >=
3.5, which have no utrace but do have the newer inode-uprobes work
by Srikar Dronamraju and colleagues. For kernels < 3.5, the
following 3 sets of kernel patches would need to be backported to
your kernel to use this preliminary user-space probing support:
- inode-uprobes patches:
- 2b144498350860b6ee9dc57ff27a93ad488de5dc
- 7b2d81d48a2d8e37efb6ce7b4d5ef58822b30d89
- a5f4374a9610fd7286c2164d4e680436727eff71
- 04a3d984d32e47983770d314cdb4e4d8f38fccb7
- 96379f60075c75b261328aa7830ef8aa158247ac
- 3ff54efdfaace9e9b2b7c1959a865be6b91de96c
- 35aa621b5ab9d08767f7bc8d209b696df281d715
- 900771a483ef28915a48066d7895d8252315607a
- e3343e6a2819ff5d0dfc4bb5c9fb7f9a4d04da73
- exec tracepoint kernel patch:
- 4ff16c25e2cc48cbe6956e356c38a25ac063a64d
- task_work_add kernel patches:
- e73f8959af0439d114847eab5a8a5ce48f1217c4
- 4d1d61a6b203d957777d73fcebf19d90b038b5b2
- 413cd3d9abeaef590e5ce00564f7a443165db238
- dea649b8ac1861107c5d91e1a71121434fc64193
- f23ca335462e3c84f13270b9e65f83936068ec2c
* What's new in version 1.7, 2012-02-01
- Map inserting and deleting is now significantly faster due to
improved hashing and larger hash tables. The hashes are also
now randomized to provide better protection against deliberate
collision attacks.
- Formatted printing is faster by compiling the formatting directives
to C code rather than interpreting at run time.
- Systemtap loads extra command line options from $SYSTEMTAP_DIR/rc
($HOME/.systemtap/rc by default) before the normal argc/argv. This
may be useful to activate site options such as --use-server or
--download-debuginfo or --modinfo.
- The stap-server has seen many improvements, and is no longer considered
experimental.
- The stap-server service (initscript) now supports four new options:
-D MACRO[=VALUE]
--log LOGFILE
--port PORT-NUMBER
--SSL CERT-DATABASE
These allow the specification of macro definitions to be passed to stap
by the server, the location of the log file, network port number and
NSS certificate database location respectively. These options are also
supported within individual server configuration files. See stap-server
and initscript/README.stap-server for details. The stap-server is no
longer activated by default.
- process("PATH").[library("PATH")].function("NAME").exported probes are now
supported to filter function() to only exported instances.
- The translator supports a new --suppress-handler-errors option, which
causes most runtime errors to be turned into quiet skipped probes. This
also disables the MAXERRORS and MAXSKIPPED limits.
- Translator warnings have been standardized and controlled by the -w / -W
flags.
- The translator supports a new --modinfo NAME=VALUE option to emit additional
MODULE_INFO(n,v) macros into the generated code.
- There is no more fixed maximum number of VMA pages that will be tracked
at runtime. This reduces memory use for those scripts that don't need any,
or only limited target process VMA tracking and allows easier system
wide probes inspecting shared library variables and/or user backtraces.
stap will now silently ignore -DTASK_FINDER_VMA_ENTRY_ITEMS.
- The tapset functions remote_id() and remote_uri() identify the member of a
swarm of "stap --remote FOO --remote BAR baz.stp" concurrent executions.
- Systemtap now supports a new privilege level and group, "stapsys", which
is equivalent to the privilege afforded by membership in the group "stapdev",
except that guru mode (-g) functionality may not be used. To support this, a
new option, --privilege=[stapusr|stapsys|stapdev] has been added.
--privilege=stapusr is equivalent to specifying the existing --unprivileged
option. --privilege=stapdev is the default. See man stap(1) for details.
- Scripts that use kernel.trace("...") probes compile much faster.
- The systemtap module cache is cleaned less frequently, governed by the
number of seconds in the $SYSTEMTAP_DIR/cache/cache_clean_interval_s file.
- SDT can now define up to 12 arguments in a probe point.
- Parse errors no longer generate a cascade of false errors. Instead, a
parse error skips the rest of the current probe or function, and resumes
at the next one. This should generate fewer and better messages.
- Global array wrapping is now supported for both associative and statistics typed
arrays using the '%' character to signify a wrapped array. For example,
'global foo%[100]' would allow the array 'foo' to be wrapped if more than 100
elements are inserted.
- process("PATH").library("PATH").plt("NAME") probes are now supported.
Wildcards are supported in the plt-name part, to refer to any function in the
program linkage table which matches the glob pattern and the rest of the
probe point.
- A new option, --dump-probe-types, will dump a list of supported probe types.
If --unprivileged is also specified, the list will be limited to probe types
which are available to unprivileged users.
- Systemtap can now automatically download the required debuginfo
using abrt. The --download-debuginfo[=OPTION] can be used to
control this feature. Possible values are: 'yes', 'no', 'ask',
and a positive number representing the timeout desired. The
default behavior is to not automatically download the debuginfo.
- The translator has better support for probing C++ applications by
better undertanding of compilation units, nested types, templates,
as used in probe point and @cast constructs.
- On 2.6.29+ kernels, systemtap can now probe kernel modules that
arrive and/or depart during the run-time of a session. This allows
probing of device driver initialization functions, which had formerly been
blacklisted.
- New tapset functions for cpu_clock and local_clock access were added.
- There is some limited preliminary support for user-space probing
against kernels such as linux-next, which have no utrace but do have
the newer inode-uprobes work by Srikar Dronamraju and colleagues.
- The following probe types are deprecated in release 1.7 and will be
removed in release 1.8:
kernel.function(number).inline
module(string).function(number).inline
process.function(number).inline
process.library(string).function(number).inline
process(string).function(number).inline
process(string).library(string).function(number).inline
- The systemtap-grapher is deprecated in release 1.7 and will be removed in
release 1.8.
- The task_backtrace() tapset function was deprecated in 1.6 and has been
removed in 1.7.
- MAXBACKTRACE did work in earlier releases, but has now been documented
in the stap 1 manual page.
- New tapset function probe_type(). Returns a short string describing
the low level probe handler type for the current probe point.
- Both unwind and symbol data is now only collected and emitted for
scripts actually using backtracing or function/data symbols.
Tapset functions are marked with /* pragma:symbols */ or
/* pragma:unwind */ to indicate they need the specific data.
- Kernel backtraces can now be generated for non-pt_regs probe context
if the kernel support dump_trace(). This enables backtraces from
certain timer probes and tracepoints.
- ubacktrace() should now also work for some kernel probes on x86 which can
use the dwarf unwinder to recover the user registers to provide
more accurate user backtraces.
- For s390x the systemtap runtime now properly splits kernel and user
addresses (which are in separate address spaces on that architecture)
which enable user space introspection.
- ppc and s390x now supports user backtraces through the DWARF unwinder.
- ppc now handles function descriptors as symbol names correctly.
- arm support kernel backtraces through the DWARF unwinder.
- arm now have a uprobes port which enables user probes. This still
requires some kernel patches (user_regsets and tracehook support for
arm).
- Starting in release 1.7, these old variables will be deprecated:
- The 'pid' variable in the 'kprocess.release' probe has been
deprecated in favor of the new 'released_pid' variable.
- The 'args' variable in the
'_sunrpc.clnt.create_client.rpc_new_client_inline' probe has been
deprecated in favor of the new internal-only '__args' variable.
- Experimental support for recent kernels without utrace has been
added for the following probe types:
process(PID).begin
process("PATH").begin
process.begin
process(PID).thread.begin
process("PATH").thread.begin
process.thread.begin
process(PID).end
process("PATH").end
process.end
process(PID).thread.end
process("PATH").thread.end
process.thread.end
process(PID).syscall
process("PATH").syscall
process.syscall
process(PID).syscall.return
process("PATH").syscall.return
process.syscall.return
- staprun disables kprobe-optimizations in recent kernels, as problems
were found. (PR13193)
* What's new in version 1.6, 2011-07-25
- Security fixes for CVE-2011-2503: read instead of mmap to load modules,
CVE-2011-2502: Don't allow path-based auth for uprobes
- The systemtap compile-server no longer uses the -k option when calling the
translator (stap). As a result, the server will now take advantage of the
module cache when compiling the same script more than once. You may observe
an improvement in the performance of the server in this situation.
- The systemtap compile-server and client now each check the version of the
other, allowing both to adapt when communicating with a down-level
counterpart. As a result, all version of the client can communicate
with all versions of the server and vice-versa. Client will prefer newer
servers when selecting a server automatically.
- SystemTap has improved support for the ARM architecture. The
kread() and kwrite() operations for ARM were corrected allowing many
of the tapsets probes and function to work properly on the ARM
architecture.
- Staprun can now rename the module to a unique name with the '-R' option before
inserting it. Systemtap itself will also call staprun with '-R' by default.
This allows the same module to be inserted more than once, without conflicting
duplicate names.
- Systemtap error messages now provide feedback when staprun or any other
process fails to launch. This also specifically covers when the user
doesn't have the proper permissions to launch staprun.
- Systemtap will now map - to _ in module names. Previously,
stap -L 'module("i2c-core").function("*")' would be empty. It now returns
a list had stap -L 'module("i2c_core").function("*") been specified.
- Systemtap now fills in missing process names to probe points, to
avoid having to name them twice twice:
% stap -e 'probe process("a.out").function("*") {}' -c 'a.out ...'
Now the probed process name is inferred from the -c CMD argument.
% stap -e 'probe process.function("*") {}' -c 'a.out ...'
- stap -L 'process("PATH").syscall' will now list context variables
- Depends on elfutils 0.142+.
- Deprecated task_backtrace:string (task:long). This function will go
away after 1.6. Please run your scripts with stap --check-version.
* What's new in version 1.5, 2011-05-23
- Security fixes for CVE-2011-1781, CVE-2011-1769: correct DW_OP_{mod,div}
division-by-zero bug
- The compile server and its related tools (stap-gen-ert, stap-authorize-cert,
stap-sign-module) have been re-implemented in C++. Previously, these
components were a mix of bash scripts and C code. These changes should be
transparent to the end user with the exception of NSS certificate database
password prompting (see below). The old implementation would prompt more
than once for the same password in some situations.
- eventcount.stp now allows for event counting in the format of
'stap eventcount.stp process.end syscall.* ...', and also reports
corresponding event tid's.
- Systemtap checks that the build-id of the module being probed matches the
build-id saved in the systemtap module. Invoking systemtap with
-DSTP_NO_BUILDID_CHECK will bypass this build-id runtime verification. See
man ld(1) for info on --build-id.
- stapio will now report if a child process has an abnormal exit along with
the associated status or signal.
- Compiler optimization may sometimes result in systemtap not being able to
access a user-space probe argument. Compiling the application with
-DSTAP_SDT_ARG_CONSTRAINT=nr will force the argument to be an immediate or
register value which should enable systemtap to access the argument.
- GNU Gettext has now been intergrated with systemtap. Our translation
page can be found at http://www.transifex.net/projects/p/systemtap/ .
"make update-po" will generate the necessary files to use translated
messages. Please refer to the po/README file for more info and
please consider contributing to this I18N effort!
- The new addr() function returns the probe's instruction pointer.
- process("...").library("...") probes are now supported. Wildcards
are supported in the library-name part, to refer to any shared
library that is required by process-name, which matches the glob
pattern and the rest of the probe point.
- The "--remote USER@HOST" functionality can now be specified multiple times
to fan out on multiple targets. If the targets have distinct kernel and
architecture configurations, stap will automatically build the script
appropriately for each one. This option is also no longer considered
experimental.
- The NSS certificate database generated for use by the compile server is now
generated with no password. Previously, a random password was generated and
used to access the database. This change should be transparent to most users.
However, if you are prompted for a password when using systemtap, then
running $libexecdir/stap-gen-cert should correct the problem.
- The timestamp tapset includes jiffies() and HZ() for lightweight approximate
timekeeping.
- A powerful new command line option --version has been added.
- process.mark now supports $$parms for reading probe parameters.
- A new command line option, --use-server-on-error[=yes|no] is available
for stap. It instructs stap to retry compilation of a script using a
compile server if it fails on the local host. The default setting
is 'no'.
- The following deprecated tools have been removed:
stap-client
stap-authorize-server-cert
stap-authorize-signing-cert
stap-find-or-start-server
stap-find-servers
Use the --use-server, --trust-server and --list-servers options of stap
instead.
* What's new in version 1.4, 2011-01-17
- Security fixes for CVE-2010-4170, CVE-2010-4171: staprun module
loading/unloading
- A new /* myproc-unprivileged */ marker is now available for embedded C
code and and expressions. Like the /* unprivileged */ marker, it makes
the code or expression available for use in unprivileged mode (see
--unprivileged). However, it also automatically adds a call to
assert_is_myproc() to the code or expression, thus, making it available
to the unprivileged user only if the target of the current probe is within
the user's own process.
- The experimental "--remote USER@HOST" option will run pass 5 on a given
ssh host, after building locally (or with --use-server) for that target.
- Warning messages from the script may now be suppressed with the stap
and/or staprun -w option. By default, duplicate warning messages are
suppressed (up to a certain limit). With stap --vp 00002 and above,
the duplicate elimination is defeated.
- The print_ubacktrace and usym* functions attempt to print the full
path of the user-space binaries' paths, instead of just the basename.
The maximum saved path length is set by -DTASK_FINDER_VMA_ENTRY_PATHLEN,
default 64. Warning messages are produced if unwinding fails due to
a missing 'stap -d MODULE' option, providing preloaded unwind data.
- The new tz_ctime() tapset function prints times in the local time zone.
- More kernel tracepoints are accessible to the kernel.trace("...") mechanism,
if kernel source trees or debuginfo are available. These formerly "hidden"
tracepoints are those that are declared somewhere other than the usual
include/linux/trace/ headers, such as xfs and kvm.
- debuginfo-based process("...").function/.statement/.mark probes support
wildcards in the process-name part, to refer to any executable files that
match the glob pattern and the rest of the probe point.
- The -t option now displays information per probe-point rather than a summary
for each probe. It also now shows the derivation chain for each probe-point.
- A rewrite of the sys/sdt.h header file provides zero-cost startup (few or
no ELF relocations) for the debuginfo-less near-zero-cost runtime probes.
Binaries compiled with earlier sdt.h versions remain supported. The
stap -L (listing) option now lists parameters for sys/sdt.h markers.
- The implementation of the integrated compile-server client has been
extended.
o --use-server now accepts an argument representing a particular server and
may be specified more than once.
o --list-servers now accepts an expanded range of arguments.
o a new --trust-servers option has been added to stap to replace several
old certificate-management scripts.
o The following tools are now deprecated and will be removed in release 1.5:
stap-client
stap-authorize-server-cert
stap-authorize-signing-cert
stap-find-or-start-server
stap-find-servers
See man stap(1) for complete details.
- The compile-server now returns the uprobes.ko to the client when it is
required by the script being compiled. The integrated compile-server client
now makes it available to be loaded by staprun. The old (deprecated)
stap-client does not do this.
- process probes with scripts as the target are recognized by stap and the
interpreter would be selected for probing.
- Starting in release 1.5, these old variables/functions will be deprecated
and will only be available when the '--compatible=1.4' flag is used:
- In the 'syscall.add_key' probe, the 'description_auddr' variable
has been deprecated in favor of the new 'description_uaddr'
variable.
- In the 'syscall.fgetxattr', 'syscall.fsetxattr',
'syscall.getxattr', 'syscall.lgetxattr', and
'syscall.lremovexattr' probes, the 'name2' variable has been
deprecated in favor of the new 'name_str' variable.
- In the 'nd_syscall.accept' probe the 'flag_str' variable
has been deprecated in favor of the new 'flags_str' variable.
- In the 'nd_syscall.dup' probe the 'old_fd' variable has been
deprecated in favor of the new 'oldfd' variable.
- In the 'nd_syscall.fgetxattr', 'nd_syscall.fremovexattr',
'nd_syscall.fsetxattr', 'nd_syscall.getxattr', and
'nd_syscall.lremovexattr' probes, the 'name2' variable has been
deprecated in favor of the new 'name_str' variable.
- The tapset alias 'nd_syscall.compat_pselect7a' was misnamed. It should
have been 'nd_syscall.compat_pselect7' (without the trailing 'a').
- The tapset function 'cpuid' is deprecated in favor of the better known
'cpu'.
- In the i386 'syscall.sigaltstack' probe, the 'ussp' variable has
been deprecated in favor of the new 'uss_uaddr' variable.
- In the ia64 'syscall.sigaltstack' probe, the 'ss_uaddr' and
'oss_uaddr' variables have been deprecated in favor of the new
'uss_uaddr' and 'uoss_uaddr' variables.
- The powerpc tapset alias 'syscall.compat_sysctl' was deprecated
and renamed 'syscall.sysctl32'.
- In the x86_64 'syscall.sigaltstack' probe, the 'regs_uaddr'
variable has been deprecated in favor of the new 'regs' variable.
* What's new in version 1.3, 2010-07-21
- The uprobes kernel module now has about half the overhead when probing
NOPs, which is particularly relevant for sdt.h markers.
- New stap option -G VAR=VALUE allows overriding global variables
by passing the settings to staprun as module options.
- The tapset alias 'syscall.compat_pselect7a' was misnamed. It should
have been 'syscall.compat_pselect7' (without the trailing 'a').
Starting in release 1.4, the old name will be deprecated and
will only be available when the '--compatible=1.3' flag is used.
- A new procfs parameter .umask(UMASK) which provides modification of
file permissions using the proper umask value. Default file
permissions for a read probe are 0400, 0200 for a write probe, and
0600 for a file with a read and write probe.
- It is now possible in some situations to use print_ubacktrace() to
get a user space stack trace from a kernel probe point. e.g. for
user backtraces when there is a pagefault:
$ stap -d /bin/sort --ldd -e 'probe vm.pagefault {
if (pid() == target()) {
printf("pagefault @0x%x\n", address); print_ubacktrace();
} }' -c /bin/sort
[...]
pagefault @0x7fea0595fa70
0x000000384f07f958 : __GI_strcmp+0x12b8/0x1440 [libc-2.12.so]
0x000000384f02824e : __gconv_lookup_cache+0xee/0x5a0 [libc-2.12.so]
0x000000384f021092 : __gconv_find_transform+0x92/0x2cf [libc-2.12.so]
0x000000384f094896 : __wcsmbs_load_conv+0x106/0x2b0 [libc-2.12.so]
0x000000384f08bd90 : mbrtowc+0x1b0/0x1c0 [libc-2.12.so]
0x0000000000404199 : ismbblank+0x39/0x90 [sort]
0x0000000000404a4f : inittables_mb+0xef/0x290 [sort]
0x0000000000406934 : main+0x174/0x2510 [sort]
0x000000384f01ec5d : __libc_start_main+0xfd/0x1d0 [libc-2.12.so]
0x0000000000402509 : _start+0x29/0x2c [sort]
[...]
- New tapset functions to get a string representation of a stack trace:
sprint_[u]backtrace() and sprint_[u]stack().
- New tapset function to get the module (shared library) name for a
user space address umodname:string(long). The module name will now
also be in the output of usymdata() and in backtrace addresses even
when they were not given with -d at the command line.
- Kernel backtraces are now much faster (replaced a linear search
with a binary search).
- A new integrated compile-server client is now available as part of stap.
o 'stap --use-server ...' is equivalent to 'stap-client ...'
o 'stap --list-servers' is equivalent to 'stap-find-servers'
o 'stap --list-servers=online' is equivalent to 'stap-find-servers --all'
o stap-client and its related tools will soon be deprecated.
o the nss-devel and avahi-devel packages are required for building stap with
the integrated client (checked during configuration).
o nss and avahi are required to run the integrated client.
- A new operator @entry is available for automatically saving an expression
at entry time for use in a .return probe.
probe foo.return { println(get_cycles() - @entry(get_cycles())) }
- Probe $target variables and @cast() can now use a suffix to print complex
data types as strings. Use a single '$' for a shallow view, or '$$' for a
deeper view that includes nested types. For example, with fs_struct:
$fs$ : "{.users=%i, .lock={...}, .umask=%i,
.in_exec=%i, .root={...}, .pwd={...}}"
$fs$$ : "{.users=%i, .lock={.raw_lock={.lock=%u}}, .umask=%i, .in_exec=%i,
.root={.mnt=%p, .dentry=%p}, .pwd={.mnt=%p, .dentry=%p}}"
- The <sys/sdt.h> user-space markers no longer default to an implicit
MARKER_NAME_ENABLED() semaphore check for each marker. To check for
enabled markers use a .d declaration file, then:
if (MARKER_NAME_ENABLED()) MARKER_NAME()
- Hyphenated <sys/sdt.h> marker names such as process(...).mark("foo-bar")
are now accepted in scripts. They are mapped to the double-underscore
form ("foo__bar").
- More robust <sys/sdt.h> user-space markers support is included. For
some platforms (x86*, ppc*), this can let systemtap probe the markers
without debuginfo. This implementation also supports preserving
the "provider" name associated with a marker:
probe process("foo").provider("bar").mark("baz") to match
STAP_PROBE<n>(bar, baz <...>)
(Compile with -DSTAP_SDT_V1 to revert to the previous implementation.
Systemtap supports pre-existing or new binaries using them.)
- Embedded-C may be used within expressions as values, when in guru mode:
num = %{ LINUX_VERSION_CODE %} // int64_t
name = %{ /* string */ THIS_MODULE->name %} // const char*
printf ("%s %x\n", name, num)
The usual /* pure */, /* unprivileged */, and /* guru */ markers may be used
as with embedded-C functions.
- By default the systemtap-runtime RPM builds now include a shared
library, staplog.so, that allows crash to extract systemtap data from
a vmcore image.
- Iterating with "foreach" can now explicitly save the value for the loop.
foreach(v = [i,j] in array)
printf("array[%d,%s] = %d\n", i, j, v /* array[i,j] */)
- The new "--ldd" option automatically adds any additional shared
libraries needed by probed or -d-listed userspace binaries to the -d
list, to enable symbolic backtracing through them. Similarly, the
new "--all-modules" option automatically adds any currently loaded
kernel modules (listed in /proc/modules) to the -d list.
- A new family of set_kernel_* functions make it easier for gurus to write
new values at arbitrary memory addresses.
- Probe wildcards can now use '**' to cross the '.' separator.
$ stap -l 'sys**open'
syscall.mq_open
syscall.open
- Backward compatibility flags (--compatible=VERSION, and matching
script preprocessing predicate %( systemtap_v CMP "version" %)
and a deprecation policy are being introduced, in case future
tapset/language changes break valid scripts.
* What's new in version 1.2, 2010-03-22
- Prototype support for "perf events", where the kernel supports the
2.6.33 in-kernel API. Probe points may refer to low-level
perf_event_attr type/config numbers, or to a number of aliases
defined in the new perf.stp tapset:
probe perf.sw.cpu_clock, perf.type(0).config(4) { }
- Type-casting can now use multiple headers to resolve codependencies.
@cast(task, "task_struct",
"kernel<linux/sched.h><linux/fs_struct.h>")->fs->umask
- Tapset-related man pages have been renamed. 'man -k 3stap' should show
the installed list, which due to prefixing should no longer collide over
ordinary system functions.
- User space marker arguments no longer use volatile if the version of gcc,
which must be at least 4.5.0, supports richer DWARF debuginfo. Use cflags
-DSTAP_SDT_VOLATILE=volatile or -DSTAP_SDT_VOLATILE= when building
the sys/sdt.h application to override this one way or another.
- A new construct for error handling is available. It is similar to c++
exception catching, using try and catch as new keywords. Within a handler
or function, the following is valid and may be nested: