Fix: eliminate timestamp overlap between packets
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 24 Nov 2013 09:09:04 +0000 (04:09 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 24 Nov 2013 09:26:41 +0000 (04:26 -0500)
commit635e457c7c8b9b5df544abce1ab326401983f2da
tree5928465140c8722148f658ebaf2436221b782076
parentcf262f57baebeb3db47b4a44d0ab153b4d2abb2d
Fix: eliminate timestamp overlap between packets

By using the timestamp sampled at space reservation when the packet is
being filled as "end timestamp" for a packet, we can ensure there is no
overlap between packet timestamp ranges, so that packet timestamp end <=
following packets timestamp begin.

Overlap between consecutive packets becomes an issue when the end
timestamp of a packet is greater than the end timestamp of a following
packet, IOW a packet completely contains the timestamp range of a
following packet.  This kind of situation does not allow trace viewers
to do binary search within the packet timestamps. This kind of situation
will typically never occur if packets are significantly larger than
event size, but this fix ensures it can never even theoretically happen.

The only case where packets can still theoretically overlap is if they
have equal begin and end timestamps, which is valid.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/frontend_api.h
lib/ringbuffer/frontend_internal.h
lib/ringbuffer/ring_buffer_frontend.c
This page took 0.02537 seconds and 4 git commands to generate.