- Renamed CMake variable
BUILD_TESTS
toBUILD_TESTING
to match CTest conventions.
- libtracepoint-control: New
perf-collect
tool that records tracepoint events into a perf.data file. - libeventheader-decode: renamed
decode-perf
tool toperf-decode
. - libtracepoint-control: TracepointSession SavePerfDataFile adds a
PERF_RECORD_FINISHED_INIT
record to the generated perf.data file. - libeventheader: tool
eventheader-register
deleted. Instead, usetracepoint-register
from libtracepoint. - New field encoding
event_field_encoding_binary_length16_char8
. Same asevent_field_encoding_string_length16_char8
except that its default format ishex_bytes
. - New semantics for
event_field_encoding_binary_length16_char8
andevent_field_encoding_string_length16_char8
encodings to support nullable and variable-length fields. These encodings can now be used with any format. When used with a fixed-size format, this indicates a nullable field. For example, a field with encodingbinary_length16_char8
and formatsigned_int
with length 1, 2, 4, or 8 would be formatted as a signed integer. The same field with length 0 would be formatted as anull
. Any other length would be formatted ashex_bytes
. - Deprecated
ipv4
andipv6
formats. New code should use theip_address
format. When applied to a 4-byte field,ip_address
should format as IPv4, and when applied to a 16-byte field,ip_address
should format as IPv6. - Decoding: When converting UTF-16 field values to UTF-8 output, treat the value as UTF-16 (previously treated as UCS-2). To aid in debugging, unmatched surrogate pairs still pass-through.
- Decoding: When processing UTF-8 fields, check for valid UTF-8 input. To aid in debugging, unmatched surrogate pairs still pass-through. Treat all other invalid UTF-8 sequences as Latin-1 sequences, i.e. if input is "valid UTF-8 A|non-UTF-8 B|valid UTF-8 C" the output will be "valid UTF-8 A|ConvertLatin1ToUtf8(B)|valid UTF-8 C".
- Decoding: Windows decoder now generates fully-normalized IPv6 strings for IPv6 fields, matching existing behavior of the Linux decoder.
- Decoding: If supported by the available C++ standard library, use
std::to_chars
instead ofsnprintf
to convert floating-point field values to strings. This typically results in shorter strings, e.g. a float32 value might now decode to "3.14" instead of "3.1400001" becausestd::from_chars<float>("3.14") == std::from_chars<float>("3.1400001")
. - EventHeaderDynamic.h: Add support for generating fields with
binary
encoding.
- BUG FIX: EADDRINUSE returned during TraceLoggingRegister on newer kernels.
The "name already in use" detection splits on whitespace, while all other
processing splits on semicolon. Fix by adding space after each semicolon
in
EVENTHEADER_COMMAND_TYPES
. - libtracepoint-decode: In pipe mode, load event names at FinishedInit instead of HeaderLastFeature since not all traces emit HeaderLastFeature.
- libtracepoint-decode: Recognize files from LP32 systems as 32-bit.
- libtracepoint: new tool
tracepoint-register
for pre-registering tracepoints. - libeventheader: existing tool
eventheader-register
is deprecated in favor oftracepoint-register
. - libeventheader-decode-dotnet: Moved to separate repository LinuxTracepoints-Net.
- Bug fix: Open
user_events_data
forO_WRONLY
instead ofO_RDWR
.
TracepointSession
supports per-CPU buffer sizes (including 0) to allow memory usage optimization when trace producers are known to be bound to specific CPUs.TracepointSession
usesPERF_ATTR_SIZE_VER3
for the size ofperf_event_attr
to minimize the chance of incompatibilities.
- Breaking changes to
PerfDataFile
:dataFile.AttrCount()
method replaced byEventDescCount()
method.dataFile.Attr(index)
method replaced byEventDesc(index)
method. The returnedPerfEventDesc
object contains anattr
pointer.dataFile.EventDescById(id)
method replaced byFindEventDescById(id)
.
- Breaking changes to
PerfSampleEventInfo
:eventInfo.session
field renamed tosession_info
.eventInfo.attr
field replaced byAttr()
method.eventInfo.name
field replaced byName()
method.eventInfo.sample_type
field replaced bySampleType()
method.eventInfo.raw_meta
field replaced byMetadata()
method.
- Breaking changes to
TracepointSession
:session.EnableTracePoint(...)
method renamed toEnableTracepoint(...)
.session.DisableTracePoint(...)
method renamed toDisableTracepoint(...)
.
EventFormatter
formats timestamps as date-time if clock information is available in the event metadata. If clock information is not present, it continues to format timestamps as seconds.TracepointSession
providesSavePerfDataFile(filename)
method to save the current contents of the session buffers into aperf.data
file.TracepointSession
now includes ID in default sample type.TracepointSession
records clock information from the session.TracepointSession
provides access to information about the tracepoints that have been added to the session (metadata, status, statistics).PerfDataFile
decodes clock information from perf.data files if present.PerfDataFile
provides access to more metadata viaPerfEventDesc
struct.PerfDataFile
providesEventDataSize
for determining the size of an event.- New
PerfDataFileWriter
class for generatingperf.data
files. - Changed procedure for locating the
user_events_data
file.- Old: parse
/proc/mounts
to determine thetracefs
ordebugfs
mount point, then use that as the root for theuser_events_data
path. - New: try
/sys/kernel/tracing/user_events_data
; if that doesn't exist, parse/proc/mounts
to find thetracefs
ordebugfs
mount point. - Rationale: Probe an absolute path so that containers don't have to
create a fake
/proc/mounts
and for efficiency in the common case.
- Old: parse
- Prefer
user_events_data
fromtracefs
overuser_events_data
fromdebugfs
.
- Added "Preregister" methods to the
TracepointCache
class so that a controller can pre-register events that it wants to collect. - If no consumers have enabled a tracepoint, the kernel now returns
EBADF
. The provider APIs have been updated to be consistent with the new behavior.
- Add namespaces to the C++ APIs.
- Move non-eventheader logic from eventheader-decode to new tracepoint-decode library.
- Add new libtracepoint-control library.