+/*
+ * Structure LttEvent and LttEventPosition must begin with the _exact_ same
+ * fields in the exact same order. LttEventPosition is a parent of LttEvent.
+ */
+struct LttEvent {
+ /* Begin of LttEventPosition fields */
+ LttTracefile *tracefile;
+ unsigned int block;
+ unsigned int offset;
+
+ /* Timekeeping */
+ uint64_t tsc; /* Current timestamp counter */
+
+ /* End of LttEventPosition fields */
+ guint32 timestamp; /* truncated timestamp */
+
+ guint16 event_id;
+
+ LttTime event_time;
+
+ void *data; /* event data */
+ guint data_size;
+ guint event_size; /* event_size field of the header :
+ used to verify data_size from facility. */
+ uint32_t compact_data;
+
+ int count; /* the number of overflow of cycle count */
+ gint64 overflow_nsec; /* precalculated nsec for overflows */
+};
+
+struct LttEventPosition {
+ LttTracefile *tracefile;
+ unsigned int block;
+ unsigned int offset;
+
+ /* Timekeeping */
+ uint64_t tsc; /* Current timestamp counter */
+};
+
+static inline guint16 ltt_event_id(struct LttEvent *event)
+{
+ return event->event_id;
+}
+
+static inline LttTime ltt_event_time(struct LttEvent *event)
+{
+ return event->event_time;
+}