Releases: bpftrace/bpftrace
Releases · bpftrace/bpftrace
v0.22.0
[0.22.0] 2025-01-07
Breaking Changes
- Return
uint32
instead ofuint64
forpid
andtid
builtins - Remove multi-map
delete
functionality - Add lexical/block scoping for variables
- Replace default map printing on
SIGUSR1
with custom signal handling probes
Added
- Bump max supported LLVM version to 19
- Add
--dry-run
CLI option - Enable avg map reads in kernel space (implicit casting)
- Enable for-loops in multiple probes
- For-loops: Allow sharing variables between the main probe and the loop's body
- Parse C++ Class and Inheritance from Debug Info
- Add an optional
size
parameter topath
- Allow tuples to be used as map keys
- Add
has_key
function for maps - Add ability to attach kprobes to inlined functions
- Variable declarations with
let
- Support symbolizing enum values using
%s
specifier inprintf()
- Configuration option to suppress printing maps by default at program exit
- Add
symbol_source
config to source uprobe locations from either DWARF or the Symbol Table - Introduce builtin to access percpu kernel data
Changed
- Merge output into
stdout
when-lv
- Stream output when printing maps
- Only print kernel headers not found message if parsing fails
- Add mandatory "stage" argument to the
-d
CLI option - Allow simultaneous use of
-v
and-d
- Remove length limitations for the
buf
builtin function - Change
delete
API to accept a map and key as separate args - Symbolize enums when used in maps
Removed
- Remove the
-dd
CLI option - Drop support for LLVM 12 and below
- Remove
ALLOW_UNSAFE_PROBE
compiler flag
Fixed
- Fix verifier error when array indexing through pointer
- Fix segfault for multi-tracepoint probes
- Fix verifier error from misaligned stack access when using strings as map keys
- Fix min/max map functions
- Fix stack mode for stack builtin
- Fix lldb support in appimage builds
- #3339
- Fix parsing large unsigned int strings as positional params
- Fix json formatting for
strftime
function - Fix BTF/DWARF parsing for structs contained in arrays
- Fix integer comparisons and auto casting for scratch variables
- Fix tuple resizing
- Handle invalid BTF without crashing
- Fix json formatting for hex values
- Fix binary operations on integers always returning 64 bit values
- Fix verifier error when comparing result of len()
- Fix type back propagation for map keys
- Fix crash by adding checks for bad var/map assignments
- Fix field access and offsetof for strings that are builtin types
- Fix crash when using castable per-cpu map types as map keys
- Fix loop values with per-cpu aggregations
Docs
- Remove mention of unsupported character literals
Tools
- Fix bashreadline tool probe for dynamically linked readline
v0.21.3
v0.21.2
[0.21.2] 2024-07-17
Fixed
- fix min/max map functions
- fix segfault for multi-tracepoint probes
Full Changelog: v0.21.1...v0.21.2
v0.21.1
v0.21.0
[0.21.0] 2024-06-21
Added
- Add
lazy_symbolication
config option - Add ability to list all probes in a program
- Add ability to call print() with indexed maps to print single map values
- Add LLVM 18 support
- Add ability to call delete() with multiple arguments
- Add for-each loops for iterating over map elements
- Add optional systemd support
- Add ability to attach uprobes to inlined functions
- Enable count, sum, min, and max map reads in kernel space (implicit casting)
- Add config option for handling missing probes
Changed
- Better error message for args in mixed probes
- Reproducible Builds: Do not store timestamps in gzip header
- Improve DWARF support, using liblldb instead of libdw
- Use new hash function to reduce collisions when aggregating on stack traces
- Disable func builtin for kretprobes and uretprobes when
get_func_ip
feature is not available - Move error printing from debug to verbose mode
- Better error message when libbpf is too old
- Allow trailing semicolons and empty blocks in config syntax
- Allow attaching to
spin_lock
functions with mitigations to prevent deadlocks - Remove length limitations for strings coming out of
str()
andpath()
Deprecated
- Deprecate
sarg
builtin
Removed
Fixed
- Fix ability to interrupt bpftrace during probe attach
- Fix field resolution on structs with anon union as first field
- Fix alignment of atomic map counter update
- Fix func builtin for kretprobes and uretprobes for kernels with working
get_func_ip
feature - Fix ustack missing the second-from-top stack frame in uprobes
- Fix storing strings of differing lengths in a variable
- Fix field resolution for structs in arrays
- Fix error in dereferencing kernel double pointers
- Fix variable corruption when used as map key
- Fix crash when assigning a record type to a map
- Fix type resolution for pointers with
BTF_KIND_TYPE_TAG
- Fix attachment of probes attaching to wildcarded and non-wildcarded kprobes
Security
- Don't unpack kernel headers or look in tmp
Docs
Tools
- Ignore warnings for missing probes
v0.20.4
[0.20.4] 2024-05-20
Don't unpack kernel headers or look in tmp
v0.20.3
v0.20.2
v0.20.1
v0.20.0
[0.20.0] 2024-01-22
Added
- Add log2 histograms with finer granularity
- Add a
jiffies
builtin for advanced usages - Emit better errors messages for invalid attachpoints
- Add support for uprobe_multi link
- Attach BTF to generated BPF programs
- Add fentry/fexit aliases for kfunc/kretfunc
- Add support for uprobe pid targeting
- New builtin for getting the number of map elements
- Add more helpful error messages for map operations
- New config block syntax
Changed
- Standardize config and env var names
Deprecated
Removed
- Remove snapcraft support
Fixed
- Fix JSON output for cgroup_path
- Fix silent truncation of 64-bit values in hist()
- utils: use /data/local/tmp as temprary dir on Android
- Fix uprobe multi probe for targets with wildcards
- Fix symbolication on for 32-bit userspcae and 64-bit kernel
- Fix retval for kretfunc/fexit
- Fix attachment/listing of wildcarded module kfuncs
- Fix uprobe attachment across container boundary
- Fix generated BTF for older kernels
Docs
Tools
- Add PPID field to
execsnoop.bt
- Use
strftime
instead ofelapsed
inexecsnoop.bt
- Use
strftime
instead ofelapsed
inthreadsnoop.bt
- Increase PID field width and align to the right in
threadsnoop.bt
- Update runqlen.bt to remove
runnable_weight
field from cfs_rq struct. - Update mdflush.bt to use blkdev.h instead of genhd.h for non-BTF builds.
- Add milliseconds to timestamp and align numbers to the right in
killsnoop.bt