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)
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>

No differences found
This page took 0.039079 seconds and 4 git commands to generate.