Skip to content

Using barectf

Philippe Proulx edited this page Sep 10, 2020 · 2 revisions

Using barectf involves the following steps:

  1. Writing the YAML configuration file defining the various header, context, and event field types.
  2. Running the barectf command-line tool with this configuration file to generate the CTF metadata and C files.
  3. Using the generated C code (tracing functions), along with the C code provided by the appropriate barectf platform, in the source code of your own application.
  4. Running your application, along with anything the barectf platform you chose requires, to generate the binary streams of a CTF trace.

Your application, when running, generates CTF packets. Depending on the chosen barectf platform, those packets are consumed and sequentially written at some place for later viewing/analysis.

Here's a diagram summarizing the steps described above:

Have a look at the doc/examples directory, which contains complete examples.

You also might be interested in writing your own barectf platform.