X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=c343f18366acb0ed22517957fb1e4608e2683a99;hp=d4004d856b731555be744afc6481d8afe9f9d84c;hb=fca049584ae1bcd9b0859924f982c6a0f6c7388f;hpb=41e82e008e6a49f5f9f9d3e7100dacd65676464b diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index d4004d85..c343f183 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -121,6 +121,7 @@ void ctf_update_timestamp(struct ctf_stream *stream, updateval = stream->timestamp; updateval &= ~((1ULL << integer_declaration->len) - 1); updateval += newval; + stream->prev_timestamp = stream->timestamp; stream->timestamp = updateval; } @@ -405,22 +406,19 @@ void ctf_move_pos_slow(struct ctf_stream_pos *pos, size_t offset, int whence) pos->cur_index - 1); events_discarded_diff -= index->events_discarded; } - if (events_discarded_diff != 0) { - fflush(stdout); - fprintf(stderr, "[warning] %d events discarded by tracer. You should try using larger buffers.\n", - events_discarded_diff); - fflush(stderr); - } + file_stream->parent.events_discarded = events_discarded_diff; if (pos->offset == EOF) return; /* The reader will expect us to skip padding */ assert(pos->offset + offset == pos->content_size); ++pos->cur_index; + file_stream->parent.prev_timestamp = file_stream->parent.timestamp; break; } case SEEK_SET: assert(offset == 0); /* only seek supported for now */ pos->cur_index = 0; + file_stream->parent.prev_timestamp = 0; break; default: assert(0);