b45595d9150c2bb4194f6317fc6c28509720aec5
12 * Structure LttEvent and LttEventPosition must begin with the _exact_ same
13 * fields in the exact same order. LttEventPosition is a parent of LttEvent.
16 /* Begin of LttEventPosition fields */
17 LttTracefile
*tracefile
;
22 uint64_t tsc
; /* Current timestamp counter */
24 /* End of LttEventPosition fields */
25 guint32 timestamp
; /* truncated timestamp */
31 void *data
; /* event data */
33 guint event_size
; /* event_size field of the header :
34 used to verify data_size from facility. */
35 uint32_t compact_data
;
37 int count
; /* the number of overflow of cycle count */
38 gint64 overflow_nsec
; /* precalculated nsec for overflows */
41 struct LttEventPosition
{
42 LttTracefile
*tracefile
;
47 uint64_t tsc
; /* Current timestamp counter */
50 static inline guint16
ltt_event_id(struct LttEvent
*event
)
52 return event
->event_id
;
55 static inline LttTime
ltt_event_time(struct LttEvent
*event
)
57 return event
->event_time
;
60 /* Obtain the position of the event within the tracefile. This
61 is used to seek back to this position later or to seek to another
62 position, computed relative to this position. The event position
63 structure is opaque and contains several fields, only two
64 of which are user accessible: block number and event index
67 void ltt_event_position(LttEvent
*e
, LttEventPosition
*ep
);
69 LttEventPosition
* ltt_event_position_new();
71 void ltt_event_position_get(LttEventPosition
*ep
, LttTracefile
**tf
,
72 guint
*block
, guint
*offset
, guint64
*tsc
);
74 void ltt_event_position_set(LttEventPosition
*ep
, LttTracefile
*tf
,
75 guint block
, guint offset
, guint64 tsc
);
77 gint
ltt_event_position_compare(const LttEventPosition
*ep1
,
78 const LttEventPosition
*ep2
);
80 void ltt_event_position_copy(LttEventPosition
*dest
,
81 const LttEventPosition
*src
);
83 LttTracefile
*ltt_event_position_tracefile(LttEventPosition
*ep
);
This page took 0.034428 seconds and 3 git commands to generate.