X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=lttng-ring-buffer-client.h;h=7055e770734e52a6f339f3c6b78e1c7913f07a1d;hb=refs%2Fheads%2Fstable-2.4;hp=9872ea4bc5be56f35b22c00eac7aa6aeab2b324c;hpb=dca89bfb5d249756ba8d5c1544b843f3fcdcd26d;p=lttng-modules.git diff --git a/lttng-ring-buffer-client.h b/lttng-ring-buffer-client.h index 9872ea4b..7055e770 100644 --- a/lttng-ring-buffer-client.h +++ b/lttng-ring-buffer-client.h @@ -88,6 +88,7 @@ size_t ctx_get_size(size_t offset, struct lttng_ctx *ctx) if (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; @@ -102,6 +103,7 @@ void ctx_record(struct lib_ring_buffer_ctx *bufctx, if (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); }