X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flttng-ring-buffer-client.h;h=cec656af5a7c20898c8b8db61226902dcf5edc0a;hb=e978f27486ddac0b9cbea5577fc413c67bc61141;hp=ff404368edc6fac5ae6b48fddf0658f53a9bd842;hpb=b1199bd39f4b617b99518b72ceeea644b164b901;p=lttng-modules.git diff --git a/src/lttng-ring-buffer-client.h b/src/lttng-ring-buffer-client.h index ff404368..cec656af 100644 --- a/src/lttng-ring-buffer-client.h +++ b/src/lttng-ring-buffer-client.h @@ -13,6 +13,7 @@ #include /* for wrapper_vmalloc_sync_mappings() */ #include #include +#include #include #include @@ -98,11 +99,8 @@ void ctx_get_struct_size(struct lttng_kernel_ctx *ctx, size_t *ctx_len, return; } for (i = 0; i < ctx->nr_fields; i++) { - if (ctx->fields[i].get_size) - offset += ctx->fields[i].get_size(offset); - if (ctx->fields[i].get_size_arg) - offset += ctx->fields[i].get_size_arg(offset, - &ctx->fields[i], bufctx, chan); + offset += ctx->fields[i].get_size(ctx->fields[i].priv, + bufctx->probe_ctx, offset); } *ctx_len = offset; } @@ -118,7 +116,8 @@ void ctx_record(struct lib_ring_buffer_ctx *bufctx, 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); + ctx->fields[i].record(ctx->fields[i].priv, bufctx->probe_ctx, + bufctx, chan); } /* @@ -604,17 +603,18 @@ void lttng_buffer_read_close(struct lib_ring_buffer *buf) } static -int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx, - uint32_t event_id) +int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx) { struct lttng_kernel_event_recorder *event_recorder = ctx->client_priv; struct lttng_channel *lttng_chan = event_recorder->chan; struct lttng_client_ctx client_ctx; int ret, cpu; + uint32_t event_id; cpu = lib_ring_buffer_get_cpu(&client_config); if (unlikely(cpu < 0)) return -EPERM; + event_id = event_recorder->priv->id; memset(&ctx->priv, 0, sizeof(ctx->priv)); ctx->priv.chan = lttng_chan->chan; ctx->priv.reserve_cpu = cpu;