-
- if(likely(tf->event.facility_id == LTT_FACILITY_CORE)) {
- switch((enum ltt_core_events)tf->event.event_id) {
- case LTT_EVENT_FACILITY_LOAD:
- size = strlen((char*)tf->event.data) + 1;
- //g_debug("Update Event facility load of facility %s", (char*)tf->event.data);
- size += ltt_align(size, sizeof(guint32), tf->has_alignment);
- size += sizeof(struct LttFacilityLoad);
- break;
- case LTT_EVENT_FACILITY_UNLOAD:
- //g_debug("Update Event facility unload");
- size = sizeof(struct LttFacilityUnload);
- break;
- case LTT_EVENT_STATE_DUMP_FACILITY_LOAD:
- size = strlen((char*)tf->event.data) + 1;
- size += ltt_align(size, sizeof(guint32), tf->has_alignment);
- //g_debug("Update Event facility load state dump of facility %s",
- // (char*)tf->event.data);
- size += sizeof(struct LttStateDumpFacilityLoad);
- break;
- case LTT_EVENT_HEARTBEAT:
- //g_debug("Update Event heartbeat");
- size = sizeof(TimeHeartbeat);
- break;
- default:
- g_warning("Error in getting event size : tracefile %s, "
- "unknown event id %hhu in core facility.",
- g_quark_to_string(tf->name),
- tf->event.event_id);
- goto event_id_error;
-
- }
- } else {
- if(!f->exists) {
- g_error("Unknown facility %hhu (0x%hhx) in tracefile %s",
+
+ if(!f->exists) {
+ /* Specific handling of core events : necessary to read the facility control
+ * tracefile. */
+
+ if(likely(tf->event.facility_id == LTT_FACILITY_CORE)) {
+ switch((enum ltt_core_events)tf->event.event_id) {
+ case LTT_EVENT_FACILITY_LOAD:
+ size = strlen((char*)tf->event.data) + 1;
+ //g_debug("Update Event facility load of facility %s", (char*)tf->event.data);
+ size += ltt_align(size, sizeof(guint32), tf->has_alignment);
+ size += sizeof(struct LttFacilityLoad);
+ break;
+ case LTT_EVENT_FACILITY_UNLOAD:
+ //g_debug("Update Event facility unload");
+ size = sizeof(struct LttFacilityUnload);
+ break;
+ case LTT_EVENT_STATE_DUMP_FACILITY_LOAD:
+ size = strlen((char*)tf->event.data) + 1;
+ size += ltt_align(size, sizeof(guint32), tf->has_alignment);
+ //g_debug("Update Event facility load state dump of facility %s",
+ // (char*)tf->event.data);
+ size += sizeof(struct LttStateDumpFacilityLoad);
+ break;
+ case LTT_EVENT_HEARTBEAT:
+ //g_debug("Update Event heartbeat");
+ size = sizeof(TimeHeartbeat);
+ break;
+ default:
+ g_warning("Error in getting event size : tracefile %s, "
+ "unknown event id %hhu in core facility.",
+ g_quark_to_string(tf->name),
+ tf->event.event_id);
+ goto event_id_error;
+
+ }
+ goto no_offset; /* Skip the field computation */
+ } else {
+ g_warning("Unknown facility %hhu (0x%hhx) in tracefile %s",