The traceparser library

QNX SDP8.0System Analysis Toolkit (SAT) User's GuideUser

The traceparser library provides a front end to facilitate the handling and parsing of events received from the instrumented kernel and the data-capture utility.

The library serves as a thin middle layer to:

  • assemble multiple buffer slots into a single event
  • parse data and then execute user-defined callbacks triggered by certain events

You typically use the traceparser functions as follows:

  1. Initialize the traceparser library by calling traceparser_init(). You can also use this function to get the state of your parser.
  2. Set the traceparser debug mode and specify a FILE stream for the debugging output by calling traceparser_debug().
  3. Set up callbacks for processing the trace events that you're interested in:
    traceparser_cs()
    Attach a callback to an event
    traceparser_cs_range()
    Attach a callback to a range of events

    When you set up a callback with either of these functions, you can provide a pointer to arbitrary user data to be passed to the callback.

  4. Start parsing your trace data by calling traceparser().
  5. Destroy your parser by calling traceparser_destroy().

You can get information about your parser at any time by calling traceparser_get_info().

For more information about these functions, see their entries in the QNX OS C Library Reference.

Page updated: