6 /* Events and their content, including the raw data, are only valid
7 until reading another event from the same tracefile.
8 Indeed, since event reading is critical to the performance,
9 the memory associated with an event may be reused at each read. */
12 /* Obtain the trace unique integer id associated with the type of
15 unsigned ltt_event_eventtype_id(LttEvent
*e
);
18 /* Facility and type for the event */
20 LttFacility
*ltt_event_facility(LttEvent
*e
);
22 LttEventType
*ltt_event_eventtype(LttEvent
*e
);
25 /* Root field for the event */
27 LttField
*ltt_event_field(LttEvent
*e
);
30 /* Time and cycle count for the event */
32 LttTime
ltt_event_time(LttEvent
*e
);
34 LttCycleCount
ltt_event_cycle_count(LttEvent
*e
);
37 /* Obtain the position of the event within the tracefile. This
38 is used to seek back to this position later or to seek to another
39 position, computed relative to this position. The event position
40 structure is opaque and contains several fields, only two
41 of which are user accessible: block number and event index
44 void ltt_event_position(LttEvent
*e
, LttEventPosition
*ep
);
46 LttEventPosition
* ltt_event_position_new();
48 void ltt_event_position_get(LttEventPosition
*ep
,
49 unsigned *block_number
, unsigned *index_in_block
, LttTracefile
** tf
);
51 void ltt_event_position_set(LttEventPosition
*ep
,
52 unsigned block_number
, unsigned index_in_block
);
55 /* CPU id of the event */
57 unsigned ltt_event_cpu_id(LttEvent
*e
);
60 /* Pointer to the raw data for the event. This should not be used directly
61 unless prepared to do all the architecture specific conversions. */
63 void *ltt_event_data(LttEvent
*e
);
66 /* The number of elements in a sequence field is specific to each event
67 instance. This function returns the number of elements for an array or
68 sequence field in an event. */
70 unsigned ltt_event_field_element_number(LttEvent
*e
, LttField
*f
);
73 /* Set the currently selected element for a sequence or array field. */
75 void ltt_event_field_element_select(LttEvent
*e
, LttField
*f
, unsigned i
);
78 /* A union is like a structure except that only a single member at a time
79 is present depending on the specific event instance. This function tells
80 the active member for a union field in an event. */
82 unsigned ltt_event_field_union_member(LttEvent
*e
, LttField
*f
);
85 /* These functions extract data from an event after architecture specific
88 unsigned ltt_event_get_unsigned(LttEvent
*e
, LttField
*f
);
90 int ltt_event_get_int(LttEvent
*e
, LttField
*f
);
92 unsigned long ltt_event_get_long_unsigned(LttEvent
*e
, LttField
*f
);
94 long int ltt_event_get_long_int(LttEvent
*e
, LttField
*f
);
96 float ltt_event_get_float(LttEvent
*e
, LttField
*f
);
98 double ltt_event_get_double(LttEvent
*e
, LttField
*f
);
101 /* The string obtained is only valid until the next read from
102 the same tracefile. */
104 char *ltt_event_get_string(LttEvent
*e
, LttField
*f
);
This page took 0.058054 seconds and 4 git commands to generate.