X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fevent.h;h=456f229edf5736fe83ad6815d6a3fb4adcd853de;hb=1184dc37d4cee465b9888fcec352c4ebe86d4246;hp=8293d15fcf59c59c010604d2527a8037e95a034c;hpb=2e2088e13a4514ce9c0ee0bd508fc831c6dc0edf;p=lttv.git diff --git a/ltt/event.h b/ltt/event.h index 8293d15f..456f229e 100644 --- a/ltt/event.h +++ b/ltt/event.h @@ -10,6 +10,11 @@ struct marker_field; +struct LttField { + int offset; + int size; +}; + /* * Structure LttEvent and LttEventPosition must begin with the _exact_ same * fields in the exact same order. LttEventPosition is a parent of LttEvent. @@ -31,6 +36,7 @@ struct LttEvent { LttTime event_time; void *data; /* event data */ + GArray *fields_offsets; /* current field offsets table */ guint data_size; guint event_size; /* event_size field of the header : used to verify data_size from marker. */ @@ -108,4 +114,9 @@ static inline LttCycleCount ltt_event_cycle_count(const LttEvent *e) return e->tsc; } +static inline struct LttField *ltt_event_field(const LttEvent *e, int index) +{ + return &g_array_index(e->fields_offsets, struct LttField, index); +} + #endif //_LTT_EVENT_H