X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fevent.h;h=75b2e299e8bf1c378ecf79972de5079cce748e37;hb=bb8c6629ca2123180877cc3c62dada724c4b6a8a;hp=b45595d9150c2bb4194f6317fc6c28509720aec5;hpb=29af7cfdc9979121f09db4ba7c154f52d0fb518e;p=lttv.git diff --git a/ltt/branches/poly/ltt/event.h b/ltt/branches/poly/ltt/event.h index b45595d9..75b2e299 100644 --- a/ltt/branches/poly/ltt/event.h +++ b/ltt/branches/poly/ltt/event.h @@ -7,6 +7,7 @@ #include #include #include +#include /* * Structure LttEvent and LttEventPosition must begin with the _exact_ same @@ -82,4 +83,32 @@ void ltt_event_position_copy(LttEventPosition *dest, LttTracefile *ltt_event_position_tracefile(LttEventPosition *ep); +/* These functions extract data from an event after architecture specific + * conversions. */ + +guint32 ltt_event_get_unsigned(LttEvent *e, struct marker_field *f); + +gint32 ltt_event_get_int(LttEvent *e, struct marker_field *f); + +guint64 ltt_event_get_long_unsigned(LttEvent *e, struct marker_field *f); + +gint64 ltt_event_get_long_int(LttEvent *e, struct marker_field *f); + +float ltt_event_get_float(LttEvent *e, struct marker_field *f); + +double ltt_event_get_double(LttEvent *e, struct marker_field *f); + + +/* The string obtained is only valid until the next read from + * the same tracefile. */ + +gchar *ltt_event_get_string(LttEvent *e, struct marker_field *f); + +static inline LttCycleCount ltt_event_cycle_count(const LttEvent *e) +{ + return e->tsc; +} + + + #endif //_LTT_EVENT_H