/* Remove from event hash table. */
cds_hlist_del(&event_recorder->priv->hlist);
- lttng_destroy_context(event_recorder->ctx);
+ lttng_destroy_context(event_recorder->priv->ctx);
free(event_recorder->parent);
free(event_recorder->priv);
free(event_recorder);
abort();
}
cds_list_for_each_entry(event_recorder_priv, &session_priv->events_head, node) {
- ret = lttng_ust_context_set_provider_rcu(&event_recorder_priv->pub->ctx,
+ ret = lttng_ust_context_set_provider_rcu(&event_recorder_priv->ctx,
name, get_size, record, get_value);
if (ret)
abort();
size_t packet_context_len;
size_t event_context_len;
struct lttng_ust_ctx *chan_ctx;
+ struct lttng_ust_ctx *event_ctx;
};
static inline uint64_t lib_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
struct lttng_client_ctx *client_ctx)
{
struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(chan);
- struct lttng_ust_stack_ctx *lttng_ctx = ctx->priv;
size_t orig_offset = offset;
size_t padding;
}
offset += ctx_get_aligned_size(offset, client_ctx->chan_ctx,
client_ctx->packet_context_len);
- offset += ctx_get_aligned_size(offset, lttng_ctx->event_ctx,
+ offset += ctx_get_aligned_size(offset, client_ctx->event_ctx,
client_ctx->event_context_len);
*pre_header_padding = padding;
return offset - orig_offset;
uint32_t event_id)
{
struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(ctx->chan);
- struct lttng_ust_stack_ctx *lttng_ctx = ctx->priv;
if (caa_unlikely(ctx->rflags))
goto slow_path;
}
ctx_record(ctx, lttng_chan, client_ctx->chan_ctx, APP_CTX_ENABLED);
- ctx_record(ctx, lttng_chan, lttng_ctx->event_ctx, APP_CTX_ENABLED);
+ ctx_record(ctx, lttng_chan, client_ctx->event_ctx, APP_CTX_ENABLED);
lib_ring_buffer_align_ctx(ctx, ctx->largest_align);
return;
uint32_t event_id)
{
struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(ctx->chan);
- struct lttng_ust_stack_ctx *lttng_ctx = ctx->priv;
switch (lttng_chan->priv->header_type) {
case 1: /* compact */
WARN_ON_ONCE(1);
}
ctx_record(ctx, lttng_chan, client_ctx->chan_ctx, APP_CTX_ENABLED);
- ctx_record(ctx, lttng_chan, lttng_ctx->event_ctx, APP_CTX_ENABLED);
+ ctx_record(ctx, lttng_chan, client_ctx->event_ctx, APP_CTX_ENABLED);
lib_ring_buffer_align_ctx(ctx, ctx->largest_align);
}
{
struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(ctx->chan);
struct lttng_ust_stack_ctx *lttng_ctx = ctx->priv;
+ struct lttng_ust_event_recorder *event_recorder = lttng_ctx->event_recorder;
struct lttng_client_ctx client_ctx;
int ret, cpu;
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,
APP_CTX_ENABLED);
- ctx_get_struct_size(lttng_ctx->event_ctx, &client_ctx.event_context_len,
+ ctx_get_struct_size(client_ctx.event_ctx, &client_ctx.event_context_len,
APP_CTX_ENABLED);
cpu = lib_ring_buffer_get_cpu(&client_config);