Skip to content

Latest commit

 

History

History
 
 

libtracepoint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

libtracepoint

tracepoint.h defines a low-level C/C++ tracing interface. The default implementation writes data to the Linux user_events facility. The implementation of this interface can be replaced at link time to support alternative scenarios, e.g. testing with a mock tracing implementation.

tracepoint.h is a low-level interface. Application developers are more likely to use a higher-level library implemented on top of this interface, such as tracepoint-provider.h.

This library includes a tracepoint-register tool that can be used to pre-register a user_event tracepoint. This allows you to start collecting a trace before the corresponding scenario starts running.

Alternative implementations of this interface are expected, e.g. a mock tracing implementation could be used for testing. A developer would select the alternative implementation by linking against a different library.

An alternative implementation that writes directly to a file (bypassing the kernel's event routing and filtering) could be implemented as follows: