LttFacility *ltt_event_facility(const LttEvent *e)
{
LttTrace * trace = e->tracefile->trace;
- unsigned id = e->event_id;
- return ltt_trace_facility_by_id(trace,id);
+ unsigned id = e->facility_id;
+ LttFacility *facility = ltt_trace_facility_by_id(trace,id);
+
+ g_assert(facility->exists);
+
+ return facility;
}
/*****************************************************************************
}
+
+LttTracefile *ltt_event_position_tracefile(LttEventPosition *ep)
+{
+ return ep->tracefile;
+}
+
/*****************************************************************************
*Function name
* ltt_event_cpu_i: get the cpu id where the event happens