[lttng-dev] How to add event_header_compact?
Ravindra Kumar Meena
rmeena840 at gmail.com
Thu Jul 18 10:34:57 EDT 2019
Hi developers,
I have added event_header_compact in metadata and I have to add it in C
language so the binary stream have this header. I followed the CTF
documentation https://diamon.org/ctf/#spec6.1
struct event_header_compact {
enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
variant <id> {
struct {
uint27_clock_monotonic_t timestamp;
} compact;
struct {
uint32_t id;
uint64_clock_monotonic_t timestamp;
} extended;
} v;
} align(8);
Since C does not have variant data-type. I am facing problem in adding it C
language. What should be the approach for the same? Do you have any
examples where it's been already done?
Thanks
--
*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: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190718/0374d04a/attachment.html>
More information about the lttng-dev
mailing list