X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fevent.h;h=697b400ea4c5a08e1e7a8d2761010bb34870b3fa;hb=c617567aa52c96762a481fbf5ef1a1f3b4377d7e;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..697b400e 100644 --- a/ltt/branches/poly/ltt/event.h +++ b/ltt/branches/poly/ltt/event.h @@ -1,12 +1,13 @@ #ifndef _LTT_EVENT_H #define _LTT_EVENT_H -#include #include #include #include -#include #include +#include +#include +#include /* * Structure LttEvent and LttEventPosition must begin with the _exact_ same @@ -82,4 +83,30 @@ 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