Fix ring_buffer_frontend.c: missing include lttng-tracer-core.h
authorWade Farnsworth <wade_farnsworth@mentor.com>
Thu, 20 Sep 2012 13:52:22 +0000 (09:52 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 Sep 2012 13:53:34 +0000 (09:53 -0400)
commit2b62afde3b4130d901cf8424d976cff6df75274a
tree31300a5eb980e033b7b1aa04cf66950d270ad13d
parentad929ebecc25452e0524120316285f0974ac3899
Fix ring_buffer_frontend.c: missing include lttng-tracer-core.h

In lib/ringbuffer/ring_buffer_frontend.c, RING_BUFFER_ALIGN is undefined,
leading to no alignment offset being recorded after the call to
config->cb.record_header_size() in lib_ring_buffer_try_reserve_slow().

However, lttng-ring-buffer-client.h does define RING_BUFFER_ALIGN, so
the alignment offset will be produced when the packet header is written
in lttng_write_event_header().

This discrepancy may be observed on architectures that don't set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS, such as ARM, with a babeltrace
error such as:

babeltrace: ../../include/babeltrace/ctf/types.h:206: ctf_pos_get_event:
Assertion `pos->offset <= pos->content_size' failed.
Aborted

indicating that the actual content size differs from the calculated one
due to the difference in alignment.  Including the appropriate header
file in ring_buffer_frontend.c solves the problem.

Signed-off-by: Wade Farnsworth <wade_farnsworth@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_frontend.c
This page took 0.024648 seconds and 4 git commands to generate.