#include <lttng/urcu/pointer.h>
#include "common/bitfield.h"
#include "common/align.h"
-#include "clock.h"
+#include "common/clock.h"
#include "context-internal.h"
#include "lttng-tracer.h"
#include "common/ringbuffer/frontend_types.h"
static DEFINE_URCU_TLS(private_ctx_stack_t, private_ctx_stack);
/*
- * Force a read (imply TLS fixup for dlopen) of TLS variables.
+ * Force a read (imply TLS allocation for dlopen) of TLS variables.
*/
-void RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP(void)
+void RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS(void)
{
asm volatile ("" : : "m" (URCU_TLS(private_ctx_stack)));
}
}
static inline
-void ctx_get_struct_size(struct lttng_ust_ctx *ctx, size_t *ctx_len)
+void ctx_get_struct_size(struct lttng_ust_ring_buffer_ctx *bufctx,
+ struct lttng_ust_ctx *ctx, size_t *ctx_len)
{
int i;
size_t offset = 0;
return;
}
for (i = 0; i < ctx->nr_fields; i++)
- offset += ctx->fields[i].get_size(ctx->fields[i].priv, offset);
+ offset += ctx->fields[i].get_size(ctx->fields[i].priv, bufctx->probe_ctx, offset);
*ctx_len = offset;
}
return;
lttng_ust_ring_buffer_align_ctx(bufctx, ctx->largest_align);
for (i = 0; i < ctx->nr_fields; i++)
- ctx->fields[i].record(ctx->fields[i].priv, bufctx, chan);
+ ctx->fields[i].record(ctx->fields[i].priv, bufctx->probe_ctx, bufctx, chan);
}
/*
client_ctx.chan_ctx = lttng_ust_rcu_dereference(lttng_chan->priv->ctx);
client_ctx.event_ctx = lttng_ust_rcu_dereference(event_recorder->priv->ctx);
/* Compute internal size of context structures. */
- ctx_get_struct_size(client_ctx.chan_ctx, &client_ctx.packet_context_len);
- ctx_get_struct_size(client_ctx.event_ctx, &client_ctx.event_context_len);
+ ctx_get_struct_size(ctx, client_ctx.chan_ctx, &client_ctx.packet_context_len);
+ ctx_get_struct_size(ctx, client_ctx.event_ctx, &client_ctx.event_context_len);
nesting = lib_ring_buffer_nesting_inc(&client_config);
if (nesting < 0)