X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fevent.c;h=0e87646e258c41d03500884144f2f76f0b709fc2;hb=3c165eaf5aa1e60ce88c036cfb692ce3e1d81585;hp=0c208c48dd8f4ce2a7728b90e5b2326f4fedd65d;hpb=f211bc6c8e798e23f6d1f49cf97d5e837de9b982;p=lttv.git diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index 0c208c48..0e87646e 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -35,11 +35,12 @@ #include #include #include - +#include void compute_fields_offsets(LttTracefile *tf, - LttFacility *fac, LttField *field, off_t *offset, void *root, guint is_compact); + LttFacility *fac, LttField *field, off_t *offset, void *root, + guint is_compact); LttEvent *ltt_event_new() @@ -63,9 +64,9 @@ void ltt_event_destroy(LttEvent *event) * unsigned : event type id ****************************************************************************/ -unsigned ltt_event_eventtype_id(const LttEvent *e) +uint16_t ltt_event_eventtype_id(const LttEvent *e) { - return (unsigned) e->event_id; + return e->event_id; } /***************************************************************************** @@ -74,51 +75,14 @@ unsigned ltt_event_eventtype_id(const LttEvent *e) *Input params * e : an instance of an event type *Return value - * LttFacility * : the facility of the event - ****************************************************************************/ - -LttFacility *ltt_event_facility(const LttEvent *e) -{ - LttTrace * trace = e->tracefile->trace; - unsigned id = e->facility_id; - LttFacility *facility = ltt_trace_facility_by_id(trace,id); - - g_assert(facility->exists); - - return facility; -} - -/***************************************************************************** - *Function name - * ltt_event_facility_id : get the facility id of the event - *Input params - * e : an instance of an event type - *Return value - * unsigned : the facility of the event + * struct marker_info *: the marker associated with the event ****************************************************************************/ -unsigned ltt_event_facility_id(const LttEvent *e) +struct marker_info *ltt_event_marker(const LttEvent *e) { - return e->facility_id; + return marker_get_info_from_id(e->tracefile->trace, e->event_id); } -/***************************************************************************** - *Function name - * ltt_event_eventtype : get the event type of the event - *Input params - * e : an instance of an event type - *Return value - * LttEventType * : the event type of the event - ****************************************************************************/ - -LttEventType *ltt_event_eventtype(const LttEvent *e) -{ - LttFacility* facility = ltt_event_facility(e); - if(!facility) return NULL; - return &g_array_index(facility->events, LttEventType, e->event_id); -} - - /***************************************************************************** *Function name * ltt_event_time : get the time of the event @@ -147,8 +111,6 @@ LttCycleCount ltt_event_cycle_count(const LttEvent *e) return e->tsc; } - - /***************************************************************************** *Function name * ltt_event_position_get : get the event position data @@ -568,7 +530,7 @@ char *ltt_event_get_string(LttEvent *e, LttField *f) * offset : pointer to the current offset, must be incremented ****************************************************************************/ - +#if 0 void compute_fields_offsets(LttTracefile *tf, LttFacility *fac, LttField *field, off_t *offset, void *root, guint is_compact) { @@ -775,4 +737,4 @@ void compute_offsets(LttTracefile *tf, LttFacility *fac, } } - +#endif //0