X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Flttng-event-notifier-notification.c;h=054d33393f459832fac3906e81ba634cfe8c41f9;hb=8915cf5e47e6dd0ba1baebdb13027b0ce4237c86;hp=0ba566ba9c6810fc79f3d8126121b310dd03a580;hpb=218585b9b0ab4586da4b6fc55c85a70b0b201151;p=lttng-modules.git diff --git a/src/lttng-event-notifier-notification.c b/src/lttng-event-notifier-notification.c index 0ba566ba..054d3339 100644 --- a/src/lttng-event-notifier-notification.c +++ b/src/lttng-event-notifier-notification.c @@ -283,7 +283,11 @@ int notification_append_capture( } break; case LTTNG_INTERPRETER_TYPE_STRING: - ret = lttng_msgpack_write_str(writer, output->u.str.str); + if (output->u.str.user) { + ret = lttng_msgpack_write_user_str(writer, output->u.str.user_str); + } else { + ret = lttng_msgpack_write_str(writer, output->u.str.str); + } if (ret) { WARN_ON_ONCE(1); goto end; @@ -381,7 +385,7 @@ void notification_send(struct lttng_event_notifier_notification *notif, struct lttng_kernel_event_notifier *event_notifier) { struct lttng_event_notifier_group *event_notifier_group = event_notifier->priv->group; - struct lib_ring_buffer_ctx ctx; + struct lttng_kernel_ring_buffer_ctx ctx; struct lttng_kernel_abi_event_notifier_notification kernel_notif; size_t capture_buffer_content_len, reserve_size; int ret; @@ -408,18 +412,16 @@ void notification_send(struct lttng_event_notifier_notification *notif, return; } - lib_ring_buffer_align_ctx(&ctx, lttng_alignof(kernel_notif)); - /* Write the notif structure. */ event_notifier_group->ops->event_write(&ctx, &kernel_notif, - sizeof(kernel_notif)); + sizeof(kernel_notif), lttng_alignof(kernel_notif)); /* * Write the capture buffer. No need to realigned as the below is a raw * char* buffer. */ event_notifier_group->ops->event_write(&ctx, ¬if->capture_buf, - capture_buffer_content_len); + capture_buffer_content_len, 1); event_notifier_group->ops->event_commit(&ctx); irq_work_queue(&event_notifier_group->wakeup_pending); @@ -427,7 +429,7 @@ void notification_send(struct lttng_event_notifier_notification *notif, void lttng_event_notifier_notification_send(struct lttng_kernel_event_notifier *event_notifier, const char *stack_data, - struct lttng_probe_ctx *probe_ctx, + struct lttng_kernel_probe_ctx *probe_ctx, struct lttng_kernel_notification_ctx *notif_ctx) { struct lttng_event_notifier_notification notif = { 0 };