X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fringbuffer-config.h;h=3b7d348aa8b2d0e1f8b5be0ea00039ea13fa5e2d;hb=96f85541c4e3773d3d1579f04f84633bc9bb6696;hp=42889ccd0e4b5e8a197589c3294afbadafc79211;hpb=3c6f6263bb2d87dc863c24a4edc59c2c959270b0;p=lttng-ust.git diff --git a/include/lttng/ringbuffer-config.h b/include/lttng/ringbuffer-config.h index 42889ccd..3b7d348a 100644 --- a/include/lttng/ringbuffer-config.h +++ b/include/lttng/ringbuffer-config.h @@ -218,7 +218,8 @@ struct lttng_ust_lib_ring_buffer_config { * UST. Fields need to be only added at the end, never reordered, never * removed. */ -#define LTTNG_UST_RING_BUFFER_CTX_PADDING 24 +#define LTTNG_UST_RING_BUFFER_CTX_PADDING \ + (24 - sizeof(int) - sizeof(void *)) struct lttng_ust_lib_ring_buffer_ctx { /* input received by lib_ring_buffer_reserve(), saved here. */ struct channel *chan; /* channel */ @@ -246,7 +247,9 @@ struct lttng_ust_lib_ring_buffer_ctx { */ uint64_t tsc; /* time-stamp counter value */ unsigned int rflags; /* reservation flags */ - char padding[LTTNG_UST_RING_BUFFER_CTX_PADDING]; + unsigned int padding1; /* padding to realign on pointer */ + void *ip; /* caller ip address */ + char padding2[LTTNG_UST_RING_BUFFER_CTX_PADDING]; }; /** @@ -276,7 +279,9 @@ void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx, ctx->cpu = cpu; ctx->rflags = 0; ctx->handle = handle; - memset(ctx->padding, 0, LTTNG_UST_RING_BUFFER_CTX_PADDING); + ctx->padding1 = 0; + ctx->ip = 0; + memset(ctx->padding2, 0, LTTNG_UST_RING_BUFFER_CTX_PADDING); } /*