Hi Phil, Can you please estimate when version 2 will be released ?
Can you please provide sample code that uses Babeltrace to read metadata, channel ? Thank you for the tip. You saved us many hours of work. Best regards, Zvika On Thu, Jun 13, 2019, 07:06 Philippe Proulx <eeppelitel...@gmail.com> wrote: > On Wed, Jun 12, 2019 at 11:22 PM Zvi Vered <vered...@gmail.com> wrote: > > > > Hello, > > > > I'm trying to read the file "metadata". > > I read the struct: > > > > struct metadata_packet_header { > > uint32_t magic; /* 0x75D11D57 */ > > uint8_t uuid[16]; /* Unique Universal Identifier */ > > uint32_t checksum; /* 0 if unused */ > > uint32_t content_size; /* in bits */ > > uint32_t packet_size; /* in bits */ > > uint8_t compression_scheme; /* 0 if unused */ > > uint8_t encryption_scheme; /* 0 if unused */ > > uint8_t checksum_scheme; /* 0 if unused */ > > uint8_t major; /* CTF spec major version number */ > > uint8_t minor; /* CTF spec minor version number */ > > HEADER_END; > > }; > > > > the magic is indeed 0x75D11D57. > > What is next struct I should read ? > > I would expect "packet context". Am I right ? > > what struct is it ? > > > > I want to write a simple babeltrace for windows. > > Not to discourage you, but I think you're only beginning a very long > journey. Reading a CTF trace entails: > > 1. Depacketize the metadata stream to get the metadata text. > > 2. Parse the metadata text to get the appropriate trace, stream, clock, > and event classes. That's a custom, and somewhat complex, > domain-specific language called TSDL. > > 3. Use the classes found in 2. to decode each data stream. This involves > decoding integer fields with custom sizes (for example, a 27-bit > unsigned integer field), dynamically finding the lengths of > sequences and the selectors of variants, updating the stream's clock, > and much more. > > 4. Merge the events of the trace's data streams decoded in 3. to get a > monotonic sequence of events. > > Add to this various fixes for known tracer bugs and support for features > such as trace file rotation and tracing session rotation. > > Please don't attempt this. > > We are currently polishing the Babeltrace 2 project which does all that, > and much more, for the Linux, macOS, and Windows platforms. Our goal is > to offer a flexible, plugin-based framework to read, manipulate, and > write traces in different formats. > > Phil > > > If I succeed, and you will find it relevant, I can upload this project. > > > > Thank you in advance, > > Zvika > > _______________________________________________ > > lttng-dev mailing list > > lttng-dev@lists.lttng.org > > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev >
_______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev