From: Wade Farnsworth Date: Thu, 20 Sep 2012 13:52:22 +0000 (-0400) Subject: Fix ring_buffer_frontend.c: missing include lttng-tracer-core.h X-Git-Tag: v2.1.0~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4ef415a92af77f9324026b62e023e15824330dcd;p=lttng-modules.git 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_frontend.c b/lib/ringbuffer/ring_buffer_frontend.c index dc0357f5..a04333a3 100644 --- a/lib/ringbuffer/ring_buffer_frontend.c +++ b/lib/ringbuffer/ring_buffer_frontend.c @@ -55,6 +55,7 @@ #include #include +#include "../../lttng-tracer-core.h" #include "../../wrapper/ringbuffer/config.h" #include "../../wrapper/ringbuffer/backend.h" #include "../../wrapper/ringbuffer/frontend.h"