Skip to content

Releases: bpftrace/bpftrace

v0.22.0

08 Jan 06:45
Compare
Choose a tag to compare

[0.22.0] 2025-01-07

Breaking Changes

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 to path
  • 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 in printf()
  • 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
  • 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

16 Dec 23:29
Compare
Choose a tag to compare

[0.21.3] 2024-12-16

Fixed

  • Fix alignment issue for multi-key maps

Full Changelog: v0.21.2...v0.21.3

v0.21.2

19 Jul 11:07
Compare
Choose a tag to compare

[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

24 Jun 13:43
Compare
Choose a tag to compare

[0.21.1] 2024-06-24

  • Fix include path on loongarch, mips, riscv, and s390

v0.21.0

21 Jun 09:54
Compare
Choose a tag to compare

[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() and path()

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

21 May 07:15
Compare
Choose a tag to compare

[0.20.4] 2024-05-20

Don't unpack kernel headers or look in tmp

v0.20.3

26 Mar 01:15
Compare
Choose a tag to compare

[0.20.3] 2024-03-25

Fix build on pre-5.16 kernels.

v0.20.2

07 Mar 22:31
Compare
Choose a tag to compare

[0.20.2] 2024-03-07

Fix potential security issue with kheader unpacking.

v0.20.1

29 Jan 22:43
Compare
Choose a tag to compare

[0.20.1] 2024-1-29

Fix build on 32-bit systems.

v0.20.0

23 Jan 11:20
Compare
Choose a tag to compare

[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

  • Fix one-liner tutorial for systems with BTF

Tools

  • Add PPID field to execsnoop.bt
  • Use strftime instead of elapsed in execsnoop.bt
  • Use strftime instead of elapsed in threadsnoop.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