X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-ring-buffer-client.h;h=8df37901095aade13f6281945ba9d32b5f940653;hb=2a0c481695b7387eb147fb0b5b655f0ef43e5a76;hp=dc6bbd0bb51480a78141ba7bb82be8b89e0fcd3e;hpb=71c1d8431c8b94c34332cf2fbdbd7c9dc5f1489a;p=lttng-modules.git diff --git a/ltt-ring-buffer-client.h b/ltt-ring-buffer-client.h index dc6bbd0b..8df37901 100644 --- a/ltt-ring-buffer-client.h +++ b/ltt-ring-buffer-client.h @@ -208,6 +208,7 @@ void ltt_write_event_header(const struct lib_ring_buffer_config *config, ctx_record(ctx, ltt_chan, ltt_chan->ctx); ctx_record(ctx, ltt_chan, event->ctx); + lib_ring_buffer_align_ctx(ctx, ctx->largest_align); return; @@ -271,6 +272,7 @@ void ltt_write_event_header_slow(const struct lib_ring_buffer_config *config, } ctx_record(ctx, ltt_chan, ltt_chan->ctx); ctx_record(ctx, ltt_chan, event->ctx); + lib_ring_buffer_align_ctx(ctx, ctx->largest_align); } static const struct lib_ring_buffer_config client_config; @@ -478,6 +480,20 @@ void ltt_event_write(struct lib_ring_buffer_ctx *ctx, const void *src, lib_ring_buffer_write(&client_config, ctx, src, len); } +static +void ltt_event_write_from_user(struct lib_ring_buffer_ctx *ctx, + const void __user *src, size_t len) +{ + lib_ring_buffer_copy_from_user(&client_config, ctx, src, len); +} + +static +void ltt_event_memset(struct lib_ring_buffer_ctx *ctx, + int c, size_t len) +{ + lib_ring_buffer_memset(&client_config, ctx, c, len); +} + static wait_queue_head_t *ltt_get_writer_buf_wait_queue(struct channel *chan, int cpu) { @@ -517,6 +533,8 @@ static struct ltt_transport ltt_relay_transport = { .event_reserve = ltt_event_reserve, .event_commit = ltt_event_commit, .event_write = ltt_event_write, + .event_write_from_user = ltt_event_write_from_user, + .event_memset = ltt_event_memset, .packet_avail_size = NULL, /* Would be racy anyway */ .get_writer_buf_wait_queue = ltt_get_writer_buf_wait_queue, .get_hp_wait_queue = ltt_get_hp_wait_queue,