- libtracepoint: new tool
tracepoint-register
for pre-registering tracepoints. - libeventheader: existing tool
eventheader-register
is deprecated in favor oftracepoint-register
.
- 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.