-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathNEWS
2600 lines (1729 loc) · 95.5 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
2.0.1-1 (May 6th, 2024)
-----------------------
New features:
- Function Boundary Tracing (FBT) probes can now access function arguments
using argv[n] where n is bound by the number of arguments of the function.
The datatype of each argument is a generic uint64_t for now.
Internal changes:
- Function BOundary Tracing (FBT) probes are now implemented using the more
lightweight fentry/fexit kernel tracing facility. Fallback to kprobes is
provided for kernels that do not provide fentry/fexit probing using BPF.
Build-time:
- D translators are now included with the DTrace source code, and will be
installed for all supported kernel versions. This mens that building
DTrace no longer requires access to kernel development headers.
2.0.0-1.14 (Mar 5th, 2024)
--------------------------
Fourteenth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The io provider has been implemented.
- The print() action has been implemented.
- The link_ntop() subroutine has been implemented.
- The cleanpath() subroutine has been implemented.
- The d_path() subroutine has been implemented to always return "<unknown>".
This is needed to ensure that the io and procfs translators compile.
- The -xcpu option has been implemented.
- The -xaggpercpu option has been implemented.
- The -xlockmem option has been improved. The limit is set before retrieving
probe info, and the default behavior is now "unlimited" (meaning most users
will not have to worry about this option).
- The pid provider now supports offset-based probe names.
- Aggregations of stacks are now supported.
- The retrieval of rawtp argument information has been improved.
- It is now possible to delete an element in an associative array by assigning
a literal 0 to it, regardless of the element datatype.
- The lexer has been improved to support module names that start with a
numeral so that they can be used (e.g. 9p`v9fs_remove).
- A basic configure script has been added to facilitate building and packaging
in a variety of distributions.
- USDT probe information maintained by dtprobed is now stored under /run to
ensure it can survive daemon restarts.
Bugfixes:
- Drop counter handling is fixed for local-only updates.
- Dedicated space has been introduced for call stacks, so that stackdepth and
temporary strings will not overwrite one another.
- dt_tp_event_info() has been corrected so as not to overrun its buffer.
- Compilation of BPF code that uses BPF helpers now uses the bpf_helpers.h
header file from libbpf-dev[el] instead of the (deprecated) bpf-helpers.h
header file that the gcc BPF cross provided.
- Due to the need to support DTrace on older kernels, BPF source code files
are now compiled using -mcpu=v3 to ensure that the object code is acceptable
to the BPF verifier in older kernels.
- When a dtrace instance would trigger the END probe to be processed, any and
all other dtrace instances on the system would have their END probe fire as
well because the dtrace provider trampolines were not validating the tgid
of the task triggering the probe.
- The initialization of the cpuinfo BPF map could cause a buffer overrun on
systems with non-sequential online CPU ids.
- On kernels that support preemptive BPF program execution, probe data could
get corrupted. As a temporary fix, concurrent BPF program execution for
DTrace probes is blocked.
Internal changes:
- Code has been restructured to better support SDT-based providers.
While such providers (lockstat, io, etc.) used to be based on
static probes in the kernel source, they are now implemented with
fbt, rawtp, and even syscall probes. Probe trampolines can become
involved. Changes, notably in cg, better support these providers.
Also, the underlying probes are using rawtp more rather than relying
just on fbt.
- Support for compilation in older environments (esp. older compilers) has
been improved.
- There have been a number of build improvements, especially for cross
compilation and to build with upstream kernels.
- A bunch of code to parse strings has been removed, relying instead
on flex for this support.
- The creation and deletion of USDT probes has moved from dtprobed to dtrace.
- The dtprobed now uses presets for daemon restarting.
Testsuite changes:
- Test dependence on tick-* probes has further been reduced. The tick-*
probes can behave poorly on some kernels, depending on how their timers
subsystem is configured (CONFIG*_HZ*). Reducing this dependence has
gone on over multiple releases to improve the robustness of these tests.
- Fix err.* tests that force XFAIL to report so correctly.
- Skip lockstat testing prior to 5.10.
- Fix the use of syscall::execve:entry args[1][?], since there are two
levels of dereferencing userspace addresses, requiring two copyin*().
2.0.0-1.13.2 (Nov 10th, 2023)
-----------------------------
Thirteenth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- DTrace can now be used for tracing with upstream kernels without requiring
any additional patches, albeit with some limitations.
- The ip provider has been implemented.
- The trunc() action has been implemented.
- The pcap() action has been implemented.
- The inet_ntoa6() subroutine has been implemented.
- The inet_ntop() subroutine has been implemented.
- Support for modules.builtin.ranges data from the kernel has been added.
This is the new way to determine module name association for kernel symbols
that are built into the kernel. Support for kallmodsyms is retained for
kernel that do not support modules.builtin.ranges yet.
- A BTF-to-CTF convertor has been added to support using DTrace with kernels
that do not provide CTF data. Note that BTF is currently more limited than
CTF. E.g. BTF does not provide datatype information for kernel variables.
Bugfixes:
- Struct and union member access in alloca()-allocated memory no longer cause
a BPF verifier violation.
- Bitfield offset calculations have been corrected.
- Disassembler output for endianness conversion instructions has been
corrected.
- Bounds checking of array datatypes of size 0 or 1 in the kernel is now
skipped because they are commonly used in the kernel as anchors for
dynamically sized arrays.
- Zero constants will now be checked at compile time wherever NULL pointer
argument checking is done.
- Uprobes are now created using the offset in the inode rather than based on
an absolute address.
- Building in various forms of kernel builds is now more streamlined.
Internal changes:
- The dependency on waitfd() has been replaced with a mechanism that does not
depend on this system call.
2.0.0-1.13.1 (Jun 7th, 2023)
----------------------------
Thirteenth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
Bugfixes:
- Upgrading DTrace using RPMs will now correctly restart dtprobed.
Testsuite changes:
- Some tests can leave orphaned tracing events registered with the kernel
if the tests timeout and the dtrace process is killed. Such probes will
now be reported and cleaned up after each test is executed.
2.0.0-1.13 (May 26th, 2023)
---------------------------
Thirteenth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- Full support for is-enabled USDT probes.
- An error will be reported when a tracing script requires more space to
store aggregation data than is available per the aggsize option value.
- An error will be reported when a tracing script requires more space to
store dynamic variables than is available per the dynvarsize option value.
- Support for data drop counters for principal buffers, speculation buffers,
aggregations, and dynamic variables.
- The proc:::signal-clear probe has been implemented.
- The sched provider has been implemented for a limited set of probes (and
with some limitations). Available probes are: dequeue, enqueue, off-cpu,
on-cpu (limited trigger locations), surrender, tick, and wakeup. Note that
the cpuinfo argument for dequeue and enqueue (arg1) is NULL due to system
limitations. Future releases will incrementally expand this provider.
- The lockstat provider has been implemented. All lockstat probes are
implemented, but depending on the runtime kernel configuration, some probe
may not trigger in all cases (particularly for lock operations that are
forced to be inlined). Also, kernels prior to 5.10.0 contain a bug that
can cause kernel deadlock when a kretprobe is used on spinlock functions.
The lockstat provider is not enabled for such kernels for safety.
- True NULL strings are now supported.
- The uregs[] built-in variable is now supported on older kernels as well.
- New option 'linknommap' has been added as a workaround for elfutils bugs
related to mmap() usage.
Bugfixes:
- The error message issued by dtprobed to report incorrect helper data size
was reporting the expected and received values backwards.
- USDT probes in programs that live in different fs namespaces are now fully
supported.
- When multiple USDT probes were specified, only the first one would get
provided properly.
- Properly recognize all forms of the 'char' datatype as equivalent.
- Do not allow iregs to be increased beyond its default value (the number of
BPF registers).
- The uaddr handling has been fixed to not trigger a segmentation fault for
pid 0.
- Tracepoint argument datatypes that are expressed by the kernel using
symbolic array size specifiers are now handled correctly.
- The established behaviour of DTrace when storing data in a speculation has
been to abort clause execution at any statement that would cause a
speculation buffer overflow. Code to perform overflow checks when storing
data in a speculation are now generated correctly.
- Some faults were not reporting the PC of the fault location.
- FBT probes are no longer provided for compiler-generated internal symbols.
Such symbols cannot be probed anyway.
- Multiple memory leaks were resolved.
- Integers loaded from an associative array are now promoted to 64 bits.
- Failure to allocate a dynamic variable now reports a dynamic variable drop
warning, and aborts the clause execution.
- DOF parser crash causes were fixed in dtprobed.
- USDT probes in non-PIE executables are now fully supported.
- Multiple programs providing their DOF to dtprobed simultaneously could cause
some of their probes to not get created.
- Support for shared libraries and executables with very large numbers of
USDT probes (500+) has been improved.
Internal changes:
- DOF_VERSION_3 has been added for the new-style USDT is-enabled probe
mechanism that is not compatible with the previous versions.
- Userspace probe scanning was reworked to resolve performance issues.
- The 'cpuinfo' BPF map can now support configurations where CPU ids are not
strictly sequential.
- The GCC BPF support in some gcc/binutils releases did not offer a way to
express an atomic add operation. As a workaround, the DTrace source code
provides its own atomic_add() construct.
- The handling of associative arrays and TLS variables has been consolidated
because they are both implemented using dynamic variables.
Testsuite changes:
- The testsuite can now specify kernel modules that are needed for tests.
- A test has been added to verify whether libctf bug #30264 is present on the
system. The libctf bug breaks offsetof() for members of unnamed structs and
unions at non-zero offsets.
- A test has been added to test multiple simultaneous dtrace instances tracing
multiple processes,
- Various tests using tick-* probes without actually requiring them have been
reworked using non-timer based probes for efficiency and stability.
- Test have been added for many dtrace options.
- The testsuite can now support interpreter-style executable .d files using
#!dtrace (the actual pathname for dtrace will be substituted during test
execution).
Known problems:
- Programs and shared libraries that make use of is-enabled USDT probes and
were built using a previous version of dtrace will need to be rebuilt for
is-enabled probes to work.
2.0.0-1.12 (Feb 27th, 2023)
---------------------------
Twelfth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The bcopy() subroutine no longer enforces that its first argument (source
address) cannot be an alloca()'d memory region. While this restriction is
documented, it was never enforced in DTrace. There is no practical reason
for having this restriction.
- The clear() and tracemem() actions have been implemented.
- The 'switchrate' and 'aggrate' options have been implemented.
- The cpc and proc providers have been implemented.
- The copyout() and copyoutstr() subroutines have been implemented.
- The uregs[] built-in variable has been implemented.
Bugfixes:
- The maximum strtab size has been increased to SSIZE_MAX.
- Probe argument information will only be retrieved once per probe.
- Handling string values in alloca()'d memory has been fixed.
- The basename(), dirname(), strchr(), strrchr(), inet_ntoa() subroutines
have been updated to fully support using arbitrary address pointers.
- The return value of copyin() will now be a valid offset into scratchmem
(native representation of a pointer to alloca()'d memory).
- The arg0 and arg1 probe arguments for profile-* and tick-* probes have been
corrected. (The arg2 argument is still unimplemented.)
- The evaluation order of arguments to bcopy() has been corrected.
- Runtime bounds checking has been implemented for scalar array access.
Internal changes:
- Selection of the correct arch-dependent asm include hierarchy for building
the precompiled BPF function library has been corrected.
- A few potentially unsafe calls to printf-style functions have been fixed.
- The manpage for dtrace has been moved to section 8 (System Management
Commands).
- The error handling mechanism between libdtrace and consumer front-ends has
been amended to allow error reporting for non-probing related issues.
- The copyinstr() subroutine has been updated to make use of the temporary
string mechanism.
- The tracking of pointers to alloca()'d memory and pointer to DTrace managed
memory has been improved, and explicit tests for it have been added to the
testsuite.
- The code generator will use indirect load instructions for pointers to
alloca()'d and DTrace managed memory for efficiency and to enable the BPF
verifier to perform access checks.
Testsuite changes:
- The copyin*() tests are now more robust with the use of a distinct trigger.
- Various tests have been moved from XFAIL to PASS status to reflect the
implementation of new features and in view of some bug fixes.
- Various tests were improved.
- Various new tests were added.
Known problems:
- The uregs[] built-in variable is not supported on kernels prior to 5.15.
2.0.0-1.11.1 (Nov 9th, 2022)
----------------------------
Eleventh errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The args[] built-in variable has been implemented.
- Support loading scalars from kernel space addresses.
- The copyin(), copyinto(), and copyinstr() subroutines have been implemented.
- A -xlockmem option has been added to adjust the kernel locked-memory limit.
When loading BPF maps or programs fails in a way that might indicate that
the locked-memory limit is too low, an error message is printed to suggests
using this new option.
- Support for aggregations indexed by a key (tuple) has been added.
- Disassembler annotations have been added for aggregation variables.
- The setopt() action has been implemented. A limited number of options is
currently supported.
- The pid provider has been changed to ignore compiler-generated internal
function names.
- The USDT provider has been implemented for basic use cases. Regular,
non-is-enabled probes are supported for executables that are referenced
explicitly (by pid) in the probe script. Argument mapping and wildcard
probe specifications are not supported yet.
New dependencies:
- The USDT provider support depends on the availability of libfuse version
2 or 3. At build time, preference is given to libfuse 3 if available.
The build process supports forcing building against libfuse 2 by passing
'libfuse2=yes' to the make command.
Upgrading:
- The USDT implementation depends on an always-running daemon (dtprobed):
the corresponding systemd dtprobed.service is automatically started in
relatively early boot in non-rescue scenarios, but when DTrace is first
installed, or if it is upgraded from a version before the daemon existed
(before 2.0.0-1.11), any probes in programs that were already running
before that point will not appear in DTrace's list of available probes
until such programs are restarted.
Bugfixes:
- Arguments of sdt-provider probes are now correctly populated using the
tracepoint data.
- Argument handling for dtrace:::, fbt:::return, pid:::, and syscall:::return
probes has been cleaned up.
- The dtrace utility is now able to handle multiple args after --.
- The -xcpp, -xctfpath, and -xverbose options have been fixed.
- Some bugs with typecasting and internal integer storage have been fixed.
- The libproc search of rtld_global has been improved for glibc changes.
- In procfs.d, projid_t was renamed to resolve a conflict with the kernel.
- In the parser, support has been added for slices of typedefs.
- String comparison involving non-DTrace pointers has been fixed.
- The value of the execname built-in variable is now correctly recognized as
a non-DTrace pointer.
Internal changes:
- The code generator is able to adapt to BPF-helper-function availability
differences between runtime kernels.
- Read-only blocks of zeros for initializing BPF maps have been consolidated.
- Tuples are now constructed with their component values at predictable
offsets based on their datatype rather than their value..
- Support for the BPF dt_bpf_map_next_key() helper to iterate over the keys
in a BPF map has been added.
- Support for multiple copies of aggregation data (DT_AGG_NUM_COPIES) is no
longer needed and has been removed.
- Support for creating a map (array or hash) of maps has been added, including
functions to perform lookups and updates of inner maps.
- The storage of aggregation data has been modified to make use of an array of
BPF hash maps, indexed by CPU id. As a result, aggregation data for each
CPU is stored in its own BPF hash map and can be modified without affecting
the data for other CPUs.
- Error reporting for BPF program load, map creation, CTF, and dlib load has
been cleaned up.
- Some code has been refactored and some obsolete code removed.
Testsuite changes:
- Add support for '-e' in test options.
- Tests that are expected to fail have improved xfail messages.
- Support has been added for more stringent, @@nosort checking.
- Problems with "unstable" tests are report as XFAIL.
- Tests that fire many times (historically using tick-n) are more robust.
- Various tests have been moved from XFAIL to PASS status to reflect the
implementation of new features and in view of some bug fixes.
- Various tests were improved.
Known problems:
- On some aarch64 systems the copyin(), copyinstr(), and copyinto()
subroutines may report a fault due to limitations in the BPF implementation
at the kernel level. This problem seems to be related to specific CPU
features.
2.0.0-1.10 (Apr 26th, 2022)
---------------------------
Tenth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The trace() action supports array, struct, and union values.
- The execname built-in variables is now implemented.
- The inet_ntoa() subroutine has been implemented.
- The progenyof() subroutine has been implemented.
- The getmajor() and getminor() subroutines have been implemented.
- The mutex_owned(), mutex_owner(), mutex_type_adaptive(), mutex_type_spin(),
rw_read_held(), rw_write_held(), and rw_iswriter() have been implemented.
- The alloca() and bcopy() subroutines have been implemented.
- Associative arrays have been implemented. They are supported for both
global and TLS variables.
- Disassembler annotations have been added for associative arrays, register
spills, and string constants.
- The translators have been updated to support up to kernel series 5.16.
- Faults will now report the PC (program counter) where the fault is reported.
Bugfixes:
- Register allocation leaks were fixed.
- NULL pointer verification has been optimized to avoid checking the same
pointer more than once.
- NULL pointers handling in ternary conditionals are now supported.
- Casting of pointers to integers has been fixed.
- Negative (immediate) values in signed conditionals are now printed
correctly.
- Disassembler annotations for TLS variables have been corrected.
- The DIFO strtab handling has been reworked to fix multiple bugs.
Internal changes:
- The strlen() subroutine is now implemented using the bpf_probe_read_str()
BPF helper.
- Strings are no longer stored using a length prefix.
- BPF functions that are implemented in C or assembly code are no longer
statically listed in the DTrace source code. Their existence is determined
at runtime when the dlibs are loaded.
- All load-time constants are now handled by the relocation mechanism.
- New function dt_dis_insn() can be used by developers to disassemble a
single instruction..
- The implementation of pre and post arithmetic has been optimized.
- Relocation support for the 'add immediate' instructions has been added.
- The substr() subroutine has been optimized to reduce register pressure.
Testsuite changes:
- Various tests have been moved from XFAIL to PASS status in response to the
implementation of new features and in view of some bug fixes.
- Various tests were improved.
2.0.0-1.9 (Dec 8th, 2021)
-------------------------
Ninth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The rand() subroutine has been implemented.
- The ftruncate() subroutine has been implemented.
- The basename() and dirname() subroutines have been implemented.
- Thread-local storage (TLS) variables have been implemented. For now, only
non-indexed variables are supported.
- The strtok() subroutine has been implemented.
Obsolete features:
- The ctf_module_dump tool has been removed. It is no longer needed.
Bugfixes:
- The substr() and strjoin() subroutines now correctly store the result string
length in the string length prefix.
Internal changes:
- The temporary string (tstring) support in the code generator has been
improved to provide better development level diagnostics.
- The lifecycle handling of temporary strings has been updated to handle
assignments and ternary expressions correctly.
- The substr() and strjoin() subroutines have been reworked to provide a much
more optimized implementation.
- More efficient code is new generated for storing a string value in the trace
output buffer.
- Improvements were made to the generic hashtable (htab) in libdtrace,
Testsuite changes:
- A results post-processor was added to various tests to work around CTF error
message differences between libdtrace-ctf and libctf.
Known problems:
- Complex nested expressions may cause the code generator to run our of usable
registers. This is a known problem with the register lifecycle tracking.
2.0.0-1.8 (Oct 15th, 2021)
--------------------------
Eighth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The htonl(), htonll(), htons(), ntohl(), ntohll(), and ntohs() subroutines
have been implemented.
- String comparison has been implemented.
- The strchr(), strrchr(), index(), rindex(), strstr(), and lltostr()
subroutines have been implemented.
- Support has been added to be able to resolve symbols in compressed kernel
modules.
- Speculative tracing has been implemented. Full support for the speculate(),
commit(), and discard() actions is available, as is support for the
speculaton() subroutine.
- It is now possible to run dtrace under valgrind.
Bugfixes:
- Symbol resolution for loadable modules was broken. This has been corrected.
Internal changes:
- Support has been added for the endianness conversion BPF instruction.
- All uses of perf_event_open() now specify the PERF_FLAG_FD_CLOEXEC flag.
Known problems:
- String sizes greater than 128 characters may pose problems with some string
operations due to BPF verifier limitations.
2.0.0-1.7 (Sep 9th, 2021)
-------------------------
Seventh errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- Argumsnts passed for SDT probes can now be retrieved using the arg0 through
arg9 builtin variables.
- A -xbpflog option has been added to request the BPF verifier log to be
generated and displayed regardles sf the outcome of trying to load BPF
programs. The option can also be set with a D option pragma.
- The strjoin() subroutine has been implemented.
- The substr() subroutine has been implemented.
Bugfixes:
- Trampoline generation has been corrected to ensure that the correct probe
context is set during code generation.
- The type alignment handling code used to determine the alilgnment size for a
given datatype was treating enums as integers, which is incorrect. Proper
alignment determination is now done, avoiding libctf-related failures.
- The handling of ERROR probe invocations within the BEGIN probe execution has
been fixed.
- The size of string data in the trace output buffer has been corrected to
acocunt for the 2-byte length prefix and the terminating NUL byte.
- The data size for value copy operations has been corrected. It was
determined solely on the data size of the source data, even if the
destination was smaller. It now uses the lesser of the two sizes.
Internal changes:
- Provider implemenations now use standard functions to clear oe copy the CPU
register state at the time a probe fires.
- New macros set_upper_bound() and set_lower_bound() are available for use in
C-to-BPF source code. They are used to provide hints about value and range
boundaries for the BPF verifier.
- Precopiled BPF code can now use the STRSZ BPF symbol to represent the
maximum string size.
- The precompiled dt_memcpy() function has been replaced with a call to the
bpf_probe_read() BPF helper function.
- Support has been added for the compilation of BPF assembler source files
(.S) into object files (.o). This feature makes uses of the GCC BPF cross
compiler.
- The generic scratch memory area is now accessible through a pointer to its
base address. This pointer can be found in dctx->mem. The stack trace
implementation has been updated to make use of this area. This scratch
memory area is also used to provide temporary string space to be used in
string manipulation functions.
- The length prefix for strings has been changed from a variable-length
integer to a 2-byte fixed width integer. This was made necessay due to
BPF verifier limitations. This is an interim solution while a more
permanent reworking of the string handling code is dveloped.
2.0.0-1.6 (Jun 18th, 2021)
--------------------------
Sixth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- Instruction offsets are printed as 4 digit values to accommodate the larger
size of BPF programs used to implement probe programs.
- String constants can be used as values in D clauses, and variables can hold
string values. Built-in variables that hold string data can be assigned to
variables and they can be used as values in expressions and as action
arguments.
- The trace() action supports strings.
- The strlen() subroutine has been implemented.
- The following built-in variables are now supported: probeprov, probemod,
probefunc, probename, caller, stackdepth, ucaller, ustackdepth, errno, and
walltimestamp.
- The following actions have been implemented: stack(), ustack(), umod(),
usym(), and uaddr().
Bugfixes:
- The storage size was not always set correctly for global and local variables
causing data corruption. When variables are not declared explicitly, their
datatype may not be known until their first use. The storage size is now
always set based on the explicit or discovered datatype of the variable.
- Built-in variables are implemented as global variables within a specific
variable ID range. Their value is not stored in the global variable storage
area and they therefore do not have a storage offset. The variable listing
in the disassembly output was printing -1 as offset. The offset will no
longer be printed for built-in variables.
- A memory leak related to the ERROR probe has been fixed.
- Relocations of 64-bit data items were being truncated to the lower 32 bits.
This has been fixed.
- Storing data in an aggregation was considered a data recording action. This
resulted in probe firings being reported by the consumer for clauses that
do not actually store data in the probe output buffer. This behaviour was
not intended. Aggregation data generation is no longer a data recording
action.
Internal changes:
- Global and local variables are now stored more efficiently by taking into
account their size and alignment requirements.
- Probe descriptions (id, provider name, module name, function name, and probe
name) are now stored in the 'probes' BPF map. The values are offsets into
the string constant table.
- The string constant table is loaded into the 'strtab' BPF map as the value
of the singleton element with key 0.
- String hash value calculations have been unified into a single function that
is called from all code that needs it.
- Variable length integer support has been added. It will primarily be used
to store the length of strings inline with the character stream.
- The memory copy function (implemented as pre-compiled C code, compiled to
BPF) has been optimized and has been made more robust.
Testsuite changes:
- Various tests have been moved from XFAIL to to PASS status in response to
the implementation of new features and in view of some bug fixes.
- Various tests were improved.
Known problems:
- The assignment of values of a datatype that is larger than 256 bytes does
not currently work due to limitations in the memory copy implementation.
- While the DTrace option to set a specific maximum string size is accepted
by the command line tool, settings beyond 256 bytes do not work correctly.
- The -Z option (allowing clauses that do not match any available probe) does
not allow for registering a clause to be enabled at a later time when the
probe becomes available.
2.0.0-1.5.1 (Apr 12th, 2021)
----------------------------
Fifth errata of the standalone userspace implementation.
** This is a pre-release with limited functionality. **
New features:
- The pid provider has been implemented, enabling function boundary tracing
at the userspace level (in shared libraries and executables). Future
development will augment the functionality provided here with arbitrary
instruction tracing at the userspace level.
- The ERROR probe (dtrace provider) is implemented. Some error conditions
such as division by zero or NULL pointer dereferencing are explicitly
checked in the BPF program because they constitute fatal failures in BPF
program execution.
- Normalization aggregation actions have been implemented: normalize(), and
denormalize().
- Support has been added for global and local variables of size greater than
8 bytes and accessing variables by reference, including allowing struct
assignment statements, for sizes up to 256 bytes. Future work will allow
larger value sizes.
- A -xbpflogsize=N option has been added to specify the maximum size of the
BPF verifier output log. This log is generated when a BPF program cannot
to be loaded into the kernel. The option can also be set with a D option
pragma.
- The -xdisasm=N support for the -S option has been improved. The list of
available disassembly listings has been updated. The value of <N> is the
sum of any number of the following available listings:
- 1 = After compilation and assembly of a clause function.
- 2 = After constructing a probe program.
- 4 = After linking dependencies into a probe program.
- 8 = After all processing, prior to loading a probe program.
Packaging changes:
- Sample scripts have been added for building DTrace on Ubuntu.
Bugfixes:
- Various aggregations bug fixes: resetting aggregations, formatted printa(),
not printing aggregations with no data (using per-aggregation latches), etc.
- Bit-field operations have been fixed in a manner that preserves legacy
behavior (aligning each bit field to the size of the next largest integer
type).
Internal changes:
- The implementation of kernel tracepoint based providers has been reworked
for greater consistency and to accommodate the needs of the new pid provider
implementation. The pid provider also provides a sample for implementing
providers that expose probes that do not map one-to-one to kernel probes.
- There is now a mechanism to turn off dual-copy aggregation code. We
anticipate using that mechanism when we migrate to newer kernels,
but for the time being it is simply using up excessive BPF map space.
- The eventfd mechanism is used as a replacement for the condition variable
that used to signal that one or more processes terminated. This means that
process termination notifications are processed together with trace buffer
data notifications. The dtrace_sleep() function has been deprecated.
- The source code was refactored for greater stylistic consistency, and a
style guide (CODING-STYLE) was added.
- A standard implementation for *_add and _del htab functions was introduced.
- Jump-target relocation for generated BPF code was fixed to handle
unlabeled BPF_NOP instructions.
- Handle translators with definitions that vary in more than two kernel
releases.
- The get_gvar() and set_gvar() pre-compiled BPF functions have been
removed.
Testsuite changes:
- New tests have been added or XFAIL annotations revised for new features.
- A probe to test/unittest/pragma/*libdep* tests has been added to
eliminate their reliance on undefined behavior with regards to what
library dependencies mean in the absence of any probes.
- There are improvements in aggregation tests.
- Some disassembly tests have been added.
Known problems:
- Some architecture (like aarch64) set aside a hardcoded amount of memory for
JIT compiled BPF programs. Each program or sub-program takes up a whole
number of pages in memory. If the kernel has been configured with a large
pagesize (16k or even 64k), the reserved amount of memory may not be
sufficient to support a larger amount of probes to be used at the same time.
Note that the reserved memory is system-wide so concurrent DTrace tracing
sessions will consume memory from the same limited pool of pages.