X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-client.h;h=96aeb1e5d7d2b5c5116ae884e9481e8e6b7370cd;hb=74233c240221e5a27a2cffda221018acec16754d;hp=e734632ff05368cb298e23faeeb9fa8bfad0965a;hpb=3ae776d848830ec03db468e68e243e8a4ee401b0;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index e734632f..96aeb1e5 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -76,6 +76,7 @@ size_t ctx_get_size(size_t offset, struct lttng_ctx *ctx) if (caa_likely(!ctx)) return 0; + offset += lib_ring_buffer_align(offset, ctx->largest_align); for (i = 0; i < ctx->nr_fields; i++) offset += ctx->fields[i].get_size(offset); return offset - orig_offset; @@ -90,6 +91,7 @@ void ctx_record(struct lttng_ust_lib_ring_buffer_ctx *bufctx, if (caa_likely(!ctx)) return; + lib_ring_buffer_align_ctx(bufctx, ctx->largest_align); for (i = 0; i < ctx->nr_fields; i++) ctx->fields[i].record(&ctx->fields[i], bufctx, chan); }