From: Mathieu Desnoyers Date: Thu, 18 Mar 2021 20:08:10 +0000 (-0400) Subject: Fix: java agent: migrate to new channel structures X-Git-Tag: v2.13.0-rc1~243 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e016c06adf51c2e213303343026c2b5d3d7776e1;p=lttng-ust.git Fix: java agent: migrate to new channel structures Signed-off-by: Mathieu Desnoyers Change-Id: Ic20da8461a6d8fe741b701b7b9e68a3aeb2ad7a1 --- diff --git a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c index 9c379bcf..ae478ba3 100644 --- a/liblttng-ust-java-agent/jni/common/lttng_ust_context.c +++ b/liblttng-ust-java-agent/jni/common/lttng_ust_context.c @@ -137,7 +137,7 @@ static size_t get_size_cb(struct lttng_ust_ctx_field *field, size_t offset) static void record_cb(struct lttng_ust_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct lttng_channel *chan) + struct lttng_ust_channel_buffer *lttng_chan_buf) { struct lttng_ust_jni_ctx_entry *jctx; const char *ctx_name = field->event_field->name; @@ -155,7 +155,7 @@ static void record_cb(struct lttng_ust_ctx_field *field, case JNI_TYPE_NULL: sel_char = LTTNG_UST_DYNAMIC_TYPE_NONE; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); break; case JNI_TYPE_INTEGER: { @@ -163,9 +163,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_S32; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_LONG: @@ -174,9 +174,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_S64; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_DOUBLE: @@ -185,9 +185,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_DOUBLE; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_FLOAT: @@ -196,9 +196,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_FLOAT; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_SHORT: @@ -207,9 +207,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_S16; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_BYTE: @@ -218,9 +218,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_S8; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_BOOLEAN: @@ -229,9 +229,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_S8; lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); lib_ring_buffer_align_ctx(ctx, lttng_alignof(v)); - chan->ops->event_write(ctx, &v, sizeof(v)); + lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v)); break; } case JNI_TYPE_STRING: @@ -245,9 +245,9 @@ static void record_cb(struct lttng_ust_ctx_field *field, sel_char = LTTNG_UST_DYNAMIC_TYPE_NONE; } lib_ring_buffer_align_ctx(ctx, lttng_alignof(char)); - chan->ops->event_write(ctx, &sel_char, sizeof(sel_char)); + lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char)); if (str) { - chan->ops->event_write(ctx, str, strlen(str) + 1); + lttng_chan_buf->ops->event_write(ctx, str, strlen(str) + 1); } break; }