barectf platform

Philippe Proulx edited this page Mar 18, 2016 · 1 revision

A barectf platform is responsible for:

  1. 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).
  2. 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:

  • linux-fs: basic Linux application tracing writing stream files to the file system for demonstration purposes
  • parallella: Adapteva Epiphany/Parallella with host-side consumer
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.