- Renamed CMake variable
BUILD_TESTStoBUILD_TESTINGto match CTest conventions.
- libtracepoint-control: New
perf-collecttool that records tracepoint events into a perf.data file. - libeventheader-decode: renamed
decode-perftool toperf-decode. - libtracepoint-control: TracepointSession SavePerfDataFile adds a
PERF_RECORD_FINISHED_INITrecord to the generated perf.data file. - libeventheader: tool
eventheader-registerdeleted. Instead, usetracepoint-registerfrom libtracepoint. - New field encoding
event_field_encoding_binary_length16_char8. Same asevent_field_encoding_string_length16_char8except that its default format ishex_bytes. - New semantics for
event_field_encoding_binary_length16_char8andevent_field_encoding_string_length16_char8encodings 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_char8and formatsigned_intwith 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
ipv4andipv6formats. New code should use theip_addressformat. When applied to a 4-byte field,ip_addressshould format as IPv4, and when applied to a 16-byte field,ip_addressshould 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_charsinstead ofsnprintfto 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
binaryencoding.
- 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-registerfor pre-registering tracepoints. - libeventheader: existing tool
eventheader-registeris deprecated in favor oftracepoint-register. - libeventheader-decode-dotnet: Moved to separate repository LinuxTracepoints-Net.
- Bug fix: Open
user_events_dataforO_WRONLYinstead ofO_RDWR.
TracepointSessionsupports per-CPU buffer sizes (including 0) to allow memory usage optimization when trace producers are known to be bound to specific CPUs.TracepointSessionusesPERF_ATTR_SIZE_VER3for the size ofperf_event_attrto minimize the chance of incompatibilities.
- Breaking changes to
PerfDataFile:dataFile.AttrCount()method replaced byEventDescCount()method.dataFile.Attr(index)method replaced byEventDesc(index)method. The returnedPerfEventDescobject contains anattrpointer.dataFile.EventDescById(id)method replaced byFindEventDescById(id).
- Breaking changes to
PerfSampleEventInfo:eventInfo.sessionfield renamed tosession_info.eventInfo.attrfield replaced byAttr()method.eventInfo.namefield replaced byName()method.eventInfo.sample_typefield replaced bySampleType()method.eventInfo.raw_metafield replaced byMetadata()method.
- Breaking changes to
TracepointSession:session.EnableTracePoint(...)method renamed toEnableTracepoint(...).session.DisableTracePoint(...)method renamed toDisableTracepoint(...).
EventFormatterformats 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.TracepointSessionprovidesSavePerfDataFile(filename)method to save the current contents of the session buffers into aperf.datafile.TracepointSessionnow includes ID in default sample type.TracepointSessionrecords clock information from the session.TracepointSessionprovides access to information about the tracepoints that have been added to the session (metadata, status, statistics).PerfDataFiledecodes clock information from perf.data files if present.PerfDataFileprovides access to more metadata viaPerfEventDescstruct.PerfDataFileprovidesEventDataSizefor determining the size of an event.- New
PerfDataFileWriterclass for generatingperf.datafiles. - Changed procedure for locating the
user_events_datafile.- Old: parse
/proc/mountsto determine thetracefsordebugfsmount point, then use that as the root for theuser_events_datapath. - New: try
/sys/kernel/tracing/user_events_data; if that doesn't exist, parse/proc/mountsto find thetracefsordebugfsmount point. - Rationale: Probe an absolute path so that containers don't have to
create a fake
/proc/mountsand for efficiency in the common case.
- Old: parse
- Prefer
user_events_datafromtracefsoveruser_events_datafromdebugfs.
- Added "Preregister" methods to the
TracepointCacheclass 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.