* consumer had time to extract them. We keep track of those gaps with the
* packet sequence number in each packet.
*/
-static
void ctf_print_discarded_lost(FILE *fp, struct ctf_stream_definition *stream)
{
if ((!stream->events_discarded && !stream->packets_lost) ||
ctf_update_current_packet_index(&file_stream->parent,
prev_index, cur_index);
+ /*
+ * We need to check if we are in trace read or called
+ * from packet indexing. In this last case, the
+ * collection is not there, so we cannot print the
+ * timestamps.
+ */
+ if ((&file_stream->parent)->stream_class->trace->parent.collection) {
+ ctf_print_discarded_lost(stderr, &file_stream->parent);
+ }
+
file_stream->parent.cycles_timestamp =
cur_index->ts_cycles.timestamp_begin;
file_stream->parent.real_timestamp =
uint64_t timestamp);
int ctf_append_trace_metadata(struct bt_trace_descriptor *tdp,
FILE *metadata_fp);
+void ctf_print_discarded_lost(FILE *fp, struct ctf_stream_definition *stream);
#endif /* _BABELTRACE_CTF_TYPES_H */