Event Recording/CTF: Get closer to LTTNG output
Ravindra Kumar Meena
rmeena840 at gmail.com
Thu Jul 11 09:24:11 UTC 2019
>
> the basic structure is now similar to the LTTNG output. The next step is
> to produce a packet header identical to LTTNG:
>
> trace {
> major = 1;
> minor = 8;
> uuid = "6a7715d0-b502-4c65-8678-6777ac7f755a";
> byte_order = le;
> packet.header := struct {
> uint32_t magic;
> uint8_t uuid[16];
> uint32_t stream_id;
> uint64_t stream_instance_id;
> };
> };
>
I have added the ctf magic(0xC1FC1FC1) in header. I am facing difficulty in
adding uuid in header. uuid is 128 a bit number which has 5 octets of
8-4-4-4-12 bytes. So this is something i did:
#define UUID_octet_1 0x6a7715d0
#define UUID_octet_2 0xb502
#define UUID_octet_3 0x4c65
#define UUID_octet_4 0x8678
#define UUID_octet_5 0x6777ac7f755a
typedef struct bit_field
{
unsigned x: 12; // 12 bits
} bit_field;
typedef struct ctf_uuid {
uint32_t octet1;
uint16_t octet2;
uint16_t octet3;
uint16_t octet4;
bit_field octet5;
} ctf_uuid;
The babeltrace has recognized the ctf magic number but not able to
recognize uuid. Is there something else method to add uuid in header?
> Move the generation of the metadata file to the record client.
>
> Generate the clock dynamically, e.g. the use the current CLOCK_REALTIME
> to set the offset.
>
> clock {
> name = "monotonic";
> uuid = "234d669d-7651-4bc1-a7fd-af581ecc6232";
> description = "Monotonic Clock";
> freq = 1000000000; /* Frequency, in Hz */
> /* clock value offset from Epoch is: offset * (1/freq) */
> offset = 1539783991179109789;
> };
>
> Add a LTTNG compatible packet context:
>
> 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;
> unsigned long events_discarded;
> uint32_t cpu_id;
> };
>
Okay
--
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
<https://www.iitism.ac.in/>, Dhanbad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190711/9a8b2d9d/attachment-0002.html>
More information about the devel
mailing list