Project

General

Profile

Bug #265

Specify where exactly the event ID must be in the header

Added by Philippe Proulx over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
06/15/2012
Due date:
% Done:

0%

Estimated time:

Description

Here's how to read an event, having already parsed the metadata:

  1. read the event header (this is defined per-stream)
  2. find the ID
  3. find the event declaration for that ID
  4. read the binary event according to its declaration

Problem lies in step 2. There's no definition in the specs. regarding how to find the ID field within the event header. It cannot be as simple as finding the id field in the event header declaration since it can be elsewhere.

A good example is the LTTng event header declaration, which are often:

struct event_header_large {
    enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
    variant <id> {
        struct {
            uint32_clock_monotonic_t timestamp;
        } compact;
        struct {
            uint32_t id;
            uint64_clock_monotonic_t timestamp;
        } extended;
    } v;
} align(8);

Here, id is most of the time the actual ID, but sometimes it's 65535 in order to extend the header using the variant and v.extended.id is the real ID. This is not specified in the specs.

We need a way to know (in the metadata) where is the real ID and how to know it once we read the header (between steps 1 and 2).

No data to display

Also available in: Atom PDF