Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
A barectf platform is responsible for:
- Providing some initialization and finalization functions for the tracing infrastructure of the target. The initialization function is responsible for initializing a barectf context, providing the platform callback functions, and for opening the very first stream packet(s). The finalization function is responsible for closing, usually when not empty, the very last stream packet(s).
- Implementing the platform callback functions to accomodate the target
system. The main purposes of those callback functions are:
- Getting the current value of the clock(s).
- Consuming a packet once it's full. This is how a ring buffer of packets may be implemented. The platform may also be naive and serialize the full packets to the file system directly.
Thus, the traced application itself should never have to call the barectf initialization, packet opening, and packet closing funcions. The application only deals with initializing/finalizing the platform, and calling the tracing functions.
The following diagram shows how each part connects with each other:
See Writing your own barectf platform for more information about writing a custom barectf platform.
Provided barectf platforms
barectf currently ships with two platforms: