SoW-2020-0002: Trace Hit Counters
[deliverable/lttng-modules.git] / src / lttng-ring-buffer-client.h
index 4f8699c0227aa7c844d3e3db6ef3c33e32f32bea..c234e8aeca24cb450eb62ea7fb5801dad7304395 100644 (file)
@@ -141,7 +141,8 @@ size_t record_header_size(const struct lib_ring_buffer_config *config,
                                 struct lib_ring_buffer_ctx *ctx,
                                 struct lttng_client_ctx *client_ctx)
 {
-       struct lttng_channel *lttng_chan = channel_get_private(chan);
+       struct lttng_event_container *container = channel_get_private(chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
        struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv;
        struct lttng_event *event = lttng_probe_ctx->event;
        size_t orig_offset = offset;
@@ -212,7 +213,8 @@ void lttng_write_event_header(const struct lib_ring_buffer_config *config,
                            struct lib_ring_buffer_ctx *ctx,
                            uint32_t event_id)
 {
-       struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
+       struct lttng_event_container *container = channel_get_private(ctx->chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
        struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv;
        struct lttng_event *event = lttng_probe_ctx->event;
 
@@ -264,7 +266,8 @@ void lttng_write_event_header_slow(const struct lib_ring_buffer_config *config,
                                 struct lib_ring_buffer_ctx *ctx,
                                 uint32_t event_id)
 {
-       struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
+       struct lttng_event_container *container = channel_get_private(ctx->chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
        struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv;
        struct lttng_event *event = lttng_probe_ctx->event;
 
@@ -365,8 +368,9 @@ static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc,
                (struct packet_header *)
                        lib_ring_buffer_offset_address(&buf->backend,
                                subbuf_idx * chan->backend.subbuf_size);
-       struct lttng_channel *lttng_chan = channel_get_private(chan);
-       struct lttng_session *session = lttng_chan->session;
+       struct lttng_event_container *container = channel_get_private(chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
+       struct lttng_session *session = container->session;
 
        header->magic = CTF_MAGIC_NUMBER;
        memcpy(header->uuid, session->uuid.b, sizeof(session->uuid));
@@ -480,7 +484,8 @@ static int client_stream_id(const struct lib_ring_buffer_config *config,
                        uint64_t *stream_id)
 {
        struct channel *chan = buf->backend.chan;
-       struct lttng_channel *lttng_chan = channel_get_private(chan);
+       struct lttng_event_container *container = channel_get_private(chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
 
        *stream_id = lttng_chan->id;
        return 0;
@@ -555,10 +560,10 @@ struct channel *_channel_create(const char *name,
                                unsigned int switch_timer_interval,
                                unsigned int read_timer_interval)
 {
-       struct lttng_channel *lttng_chan = priv;
+       struct lttng_event_container *container = priv;
        struct channel *chan;
 
-       chan = channel_create(&client_config, name, lttng_chan, buf_addr,
+       chan = channel_create(&client_config, name, container, buf_addr,
                              subbuf_size, num_subbuf, switch_timer_interval,
                              read_timer_interval);
        if (chan) {
@@ -618,7 +623,8 @@ static
 int lttng_event_reserve(struct lib_ring_buffer_ctx *ctx,
                      uint32_t event_id)
 {
-       struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
+       struct lttng_event_container *container = channel_get_private(ctx->chan);
+       struct lttng_channel *lttng_chan = lttng_event_container_get_channel(container);
        struct lttng_probe_ctx *lttng_probe_ctx = ctx->priv;
        struct lttng_event *event = lttng_probe_ctx->event;
        struct lttng_client_ctx client_ctx;
This page took 0.025103 seconds and 5 git commands to generate.