Fix non-matching packet context wrt last packet event read
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Aug 2011 20:38:04 +0000 (16:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Aug 2011 20:38:04 +0000 (16:38 -0400)
commit5f643ed7d0d2d21d3797938e34735ef8f1bd9186
tree19c8a9ca366d29254baf5cf6bf99cedda6c92335
parent0293560ca8732a9958d26fa9d2c7e978ebf1d8ad
Fix non-matching packet context wrt last packet event read

The last event in a packet is seen with the timestamp of the beginning
of the next packet due to an incorrect handling of ctf_move_pos() : the
"ctf_move_pos_slow" that switches between packets needs to be called at
the next event, rather than at the end of the last event of the packet.
When the position was getting to the end of the payload of the last
event, it was immediately changing packet, which changed all packet
context information, including the current timestamp.

This is fixed by explicitely calling the ctf_move_pos_slow() on packet
boundaries at the beginning of event read rather than at each
ctf_move_pos call.

We also fix handling of empty trace packets here: when an empty packet
is detected, we need to move on to the next packet immediately within
ctf_move_pos_slow() rather than let the caller think there is some event
data in the empty packet.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c
include/babeltrace/ctf/types.h
This page took 0.025079 seconds and 4 git commands to generate.