summaryrefslogtreecommitdiffstats
path: root/src/plugins/tracing/metadata_template.txt
blob: 5f27e79da503154ed8f8a9be07d5ba14b21af3e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* CTF 1.8 */

typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
typealias integer { size = 8; align = 8; signed = true; } := int8_t;
typealias integer { size = 16; align = 8; signed = true; } := int16_t;
typealias integer { size = 32; align = 8; signed = true; } := int32_t;
typealias integer { size = 64; align = 8; signed = true; } := int64_t;
typealias integer { size = 32; align = 8; signed = true; base = 16; } := intptr32_t;
typealias integer { size = 64; align = 8; signed = true; base = 16; } := intptr64_t;
typealias floating_point { exp_dig = 8; mant_dig = 24; align = 8; byte_order = native; } := float;
typealias floating_point { exp_dig = 11; mant_dig = 53; align = 8; byte_order = native; } := double;

typealias enum : integer { size = 8; } {
    false,
    true
} := Boolean;

trace {
    major = 1;
    minor = 8;
    uuid = "$TRACE_UUID";
    byte_order = $ENDIANNESS;
    packet.header := struct {
            uint32_t magic;
            uint8_t  uuid[16];
            uint32_t stream_id;
    } align(8);
};

env {
    domain = "ust";
    tracer_name = "qtctf";
    tracer_major = 1;
    tracer_minor = 0;
    architecture_bit_width = $ARC_BIT_WIDTH;
    trace_name = "$SESSION_NAME";
    trace_creation_datetime = "$CREATION_TIME";
    hostname = "$HOST_NAME";
};

clock {
    name = "$CLOCK_NAME";
    uuid = "53836526-5a62-4de0-93c8-3a1970afab23";
    description = "$CLOCK_TYPE";
    freq = $CLOCK_FREQUENCY;
    offset = $CLOCK_OFFSET;
};

typealias integer {
    size = 64; align = 8; signed = false;
    map = clock.monotonic.value;
} := uint64_clock_monotonic_t;

struct packet_context {
    uint64_clock_monotonic_t timestamp_begin;
    uint64_clock_monotonic_t timestamp_end;
    uint64_t content_size;
    uint64_t packet_size;
    uint64_t packet_seq_num;
    uint64_t events_discarded;
    uint32_t thread_id;
    string thread_name;
} align(8);

struct event_header {
    uint32_t id;
    uint64_clock_monotonic_t timestamp;
} align(8);

stream {
    id = 0;
    event.header := struct event_header;
    packet.context := struct packet_context;
};