2 * lttng-ring-buffer-client.h
4 * LTTng lib ring buffer client template.
6 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; only
11 * version 2.1 of the License.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <linux/module.h>
24 #include <linux/types.h>
25 #include "lib/bitfield.h"
26 #include "wrapper/vmalloc.h" /* for wrapper_vmalloc_sync_all() */
27 #include "wrapper/trace-clock.h"
28 #include "lttng-events.h"
29 #include "lttng-tracer.h"
30 #include "wrapper/ringbuffer/frontend_types.h"
32 #define LTTNG_COMPACT_EVENT_BITS 5
33 #define LTTNG_COMPACT_TSC_BITS 27
35 static struct lttng_transport lttng_relay_transport
;
38 * Keep the natural field alignment for _each field_ within this structure if
39 * you ever add/remove a field from this header. Packed attribute is not used
40 * because gcc generates poor code on at least powerpc and mips. Don't ever
41 * let gcc add padding between the structure elements.
43 * The guarantee we have with timestamps is that all the events in a
44 * packet are included (inclusive) within the begin/end timestamps of
45 * the packet. Another guarantee we have is that the "timestamp begin",
46 * as well as the event timestamps, are monotonically increasing (never
47 * decrease) when moving forward in a stream (physically). But this
48 * guarantee does not apply to "timestamp end", because it is sampled at
49 * commit time, which is not ordered with respect to space reservation.
52 struct packet_header
{
53 /* Trace packet header */
56 * contains endianness information.
62 /* Stream packet context */
63 uint64_t timestamp_begin
; /* Cycle count at subbuffer start */
64 uint64_t timestamp_end
; /* Cycle count at subbuffer end */
65 uint64_t content_size
; /* Size of data in subbuffer */
66 uint64_t packet_size
; /* Subbuffer size (include padding) */
67 uint64_t packet_seq_num
; /* Packet sequence number */
68 unsigned long events_discarded
; /*
69 * Events lost in this subbuffer since
70 * the beginning of the trace.
73 uint32_t cpu_id
; /* CPU id associated with stream */
74 uint8_t header_end
; /* End of header */
79 static inline notrace u64
lib_ring_buffer_clock_read(struct channel
*chan
)
81 return trace_clock_read64();
85 size_t ctx_get_size(size_t offset
, struct lttng_ctx
*ctx
)
88 size_t orig_offset
= offset
;
92 offset
+= lib_ring_buffer_align(offset
, ctx
->largest_align
);
93 for (i
= 0; i
< ctx
->nr_fields
; i
++)
94 offset
+= ctx
->fields
[i
].get_size(offset
);
95 return offset
- orig_offset
;
99 void ctx_record(struct lib_ring_buffer_ctx
*bufctx
,
100 struct lttng_channel
*chan
,
101 struct lttng_ctx
*ctx
)
107 lib_ring_buffer_align_ctx(bufctx
, ctx
->largest_align
);
108 for (i
= 0; i
< ctx
->nr_fields
; i
++)
109 ctx
->fields
[i
].record(&ctx
->fields
[i
], bufctx
, chan
);
113 * record_header_size - Calculate the header size and padding necessary.
114 * @config: ring buffer instance configuration
116 * @offset: offset in the write buffer
117 * @pre_header_padding: padding to add before the header (output)
118 * @ctx: reservation context
120 * Returns the event header size (including padding).
122 * The payload must itself determine its own alignment from the biggest type it
126 unsigned char record_header_size(const struct lib_ring_buffer_config
*config
,
127 struct channel
*chan
, size_t offset
,
128 size_t *pre_header_padding
,
129 struct lib_ring_buffer_ctx
*ctx
)
131 struct lttng_channel
*lttng_chan
= channel_get_private(chan
);
132 struct lttng_event
*event
= ctx
->priv
;
133 size_t orig_offset
= offset
;
136 switch (lttng_chan
->header_type
) {
137 case 1: /* compact */
138 padding
= lib_ring_buffer_align(offset
, lttng_alignof(uint32_t));
140 if (!(ctx
->rflags
& (RING_BUFFER_RFLAG_FULL_TSC
| LTTNG_RFLAG_EXTENDED
))) {
141 offset
+= sizeof(uint32_t); /* id and timestamp */
143 /* Minimum space taken by LTTNG_COMPACT_EVENT_BITS id */
144 offset
+= (LTTNG_COMPACT_EVENT_BITS
+ CHAR_BIT
- 1) / CHAR_BIT
;
145 /* Align extended struct on largest member */
146 offset
+= lib_ring_buffer_align(offset
, lttng_alignof(uint64_t));
147 offset
+= sizeof(uint32_t); /* id */
148 offset
+= lib_ring_buffer_align(offset
, lttng_alignof(uint64_t));
149 offset
+= sizeof(uint64_t); /* timestamp */
153 padding
= lib_ring_buffer_align(offset
, lttng_alignof(uint16_t));
155 offset
+= sizeof(uint16_t);
156 if (!(ctx
->rflags
& (RING_BUFFER_RFLAG_FULL_TSC
| LTTNG_RFLAG_EXTENDED
))) {
157 offset
+= lib_ring_buffer_align(offset
, lttng_alignof(uint32_t));
158 offset
+= sizeof(uint32_t); /* timestamp */
160 /* Align extended struct on largest member */
161 offset
+= lib_ring_buffer_align(offset
, lttng_alignof(uint64_t));
162 offset
+= sizeof(uint32_t); /* id */
163 offset
+= lib_ring_buffer_align(offset
, lttng_alignof(uint64_t));
164 offset
+= sizeof(uint64_t); /* timestamp */
171 offset
+= ctx_get_size(offset
, event
->ctx
);
172 offset
+= ctx_get_size(offset
, lttng_chan
->ctx
);
174 *pre_header_padding
= padding
;
175 return offset
- orig_offset
;
178 #include "wrapper/ringbuffer/api.h"
181 void lttng_write_event_header_slow(const struct lib_ring_buffer_config
*config
,
182 struct lib_ring_buffer_ctx
*ctx
,
186 * lttng_write_event_header
188 * Writes the event header to the offset (already aligned on 32-bits).
190 * @config: ring buffer instance configuration
191 * @ctx: reservation context
192 * @event_id: event ID
195 void lttng_write_event_header(const struct lib_ring_buffer_config
*config
,
196 struct lib_ring_buffer_ctx
*ctx
,
199 struct lttng_channel
*lttng_chan
= channel_get_private(ctx
->chan
);
200 struct lttng_event
*event
= ctx
->priv
;
202 if (unlikely(ctx
->rflags
))
205 switch (lttng_chan
->header_type
) {
206 case 1: /* compact */
208 uint32_t id_time
= 0;
210 bt_bitfield_write(&id_time
, uint32_t,
212 LTTNG_COMPACT_EVENT_BITS
,
214 bt_bitfield_write(&id_time
, uint32_t,
215 LTTNG_COMPACT_EVENT_BITS
,
216 LTTNG_COMPACT_TSC_BITS
,
218 lib_ring_buffer_write(config
, ctx
, &id_time
, sizeof(id_time
));
223 uint32_t timestamp
= (uint32_t) ctx
->tsc
;
224 uint16_t id
= event_id
;
226 lib_ring_buffer_write(config
, ctx
, &id
, sizeof(id
));
227 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint32_t));
228 lib_ring_buffer_write(config
, ctx
, ×tamp
, sizeof(timestamp
));
235 ctx_record(ctx
, lttng_chan
, lttng_chan
->ctx
);
236 ctx_record(ctx
, lttng_chan
, event
->ctx
);
237 lib_ring_buffer_align_ctx(ctx
, ctx
->largest_align
);
242 lttng_write_event_header_slow(config
, ctx
, event_id
);
246 void lttng_write_event_header_slow(const struct lib_ring_buffer_config
*config
,
247 struct lib_ring_buffer_ctx
*ctx
,
250 struct lttng_channel
*lttng_chan
= channel_get_private(ctx
->chan
);
251 struct lttng_event
*event
= ctx
->priv
;
253 switch (lttng_chan
->header_type
) {
254 case 1: /* compact */
255 if (!(ctx
->rflags
& (RING_BUFFER_RFLAG_FULL_TSC
| LTTNG_RFLAG_EXTENDED
))) {
256 uint32_t id_time
= 0;
258 bt_bitfield_write(&id_time
, uint32_t,
260 LTTNG_COMPACT_EVENT_BITS
,
262 bt_bitfield_write(&id_time
, uint32_t,
263 LTTNG_COMPACT_EVENT_BITS
,
264 LTTNG_COMPACT_TSC_BITS
, ctx
->tsc
);
265 lib_ring_buffer_write(config
, ctx
, &id_time
, sizeof(id_time
));
268 uint64_t timestamp
= ctx
->tsc
;
270 bt_bitfield_write(&id
, uint8_t,
272 LTTNG_COMPACT_EVENT_BITS
,
274 lib_ring_buffer_write(config
, ctx
, &id
, sizeof(id
));
275 /* Align extended struct on largest member */
276 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint64_t));
277 lib_ring_buffer_write(config
, ctx
, &event_id
, sizeof(event_id
));
278 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint64_t));
279 lib_ring_buffer_write(config
, ctx
, ×tamp
, sizeof(timestamp
));
284 if (!(ctx
->rflags
& (RING_BUFFER_RFLAG_FULL_TSC
| LTTNG_RFLAG_EXTENDED
))) {
285 uint32_t timestamp
= (uint32_t) ctx
->tsc
;
286 uint16_t id
= event_id
;
288 lib_ring_buffer_write(config
, ctx
, &id
, sizeof(id
));
289 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint32_t));
290 lib_ring_buffer_write(config
, ctx
, ×tamp
, sizeof(timestamp
));
293 uint64_t timestamp
= ctx
->tsc
;
295 lib_ring_buffer_write(config
, ctx
, &id
, sizeof(id
));
296 /* Align extended struct on largest member */
297 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint64_t));
298 lib_ring_buffer_write(config
, ctx
, &event_id
, sizeof(event_id
));
299 lib_ring_buffer_align_ctx(ctx
, lttng_alignof(uint64_t));
300 lib_ring_buffer_write(config
, ctx
, ×tamp
, sizeof(timestamp
));
307 ctx_record(ctx
, lttng_chan
, lttng_chan
->ctx
);
308 ctx_record(ctx
, lttng_chan
, event
->ctx
);
309 lib_ring_buffer_align_ctx(ctx
, ctx
->largest_align
);
312 static const struct lib_ring_buffer_config client_config
;
314 static u64
client_ring_buffer_clock_read(struct channel
*chan
)
316 return lib_ring_buffer_clock_read(chan
);
320 size_t client_record_header_size(const struct lib_ring_buffer_config
*config
,
321 struct channel
*chan
, size_t offset
,
322 size_t *pre_header_padding
,
323 struct lib_ring_buffer_ctx
*ctx
)
325 return record_header_size(config
, chan
, offset
,
326 pre_header_padding
, ctx
);
330 * client_packet_header_size - called on buffer-switch to a new sub-buffer
332 * Return header size without padding after the structure. Don't use packed
333 * structure because gcc generates inefficient code on some architectures
336 static size_t client_packet_header_size(void)
338 return offsetof(struct packet_header
, ctx
.header_end
);
341 static void client_buffer_begin(struct lib_ring_buffer
*buf
, u64 tsc
,
342 unsigned int subbuf_idx
)
344 struct channel
*chan
= buf
->backend
.chan
;
345 struct packet_header
*header
=
346 (struct packet_header
*)
347 lib_ring_buffer_offset_address(&buf
->backend
,
348 subbuf_idx
* chan
->backend
.subbuf_size
);
349 struct lttng_channel
*lttng_chan
= channel_get_private(chan
);
350 struct lttng_session
*session
= lttng_chan
->session
;
352 header
->magic
= CTF_MAGIC_NUMBER
;
353 memcpy(header
->uuid
, session
->uuid
.b
, sizeof(session
->uuid
));
354 header
->stream_id
= lttng_chan
->id
;
355 header
->ctx
.timestamp_begin
= tsc
;
356 header
->ctx
.timestamp_end
= 0;
357 header
->ctx
.content_size
= ~0ULL; /* for debugging */
358 header
->ctx
.packet_size
= ~0ULL;
359 header
->ctx
.packet_seq_num
= chan
->backend
.num_subbuf
* \
360 buf
->backend
.buf_cnt
[subbuf_idx
].seq_cnt
+ \
362 header
->ctx
.events_discarded
= 0;
363 header
->ctx
.cpu_id
= buf
->backend
.cpu
;
367 * offset is assumed to never be 0 here : never deliver a completely empty
368 * subbuffer. data_size is between 1 and subbuf_size.
370 static void client_buffer_end(struct lib_ring_buffer
*buf
, u64 tsc
,
371 unsigned int subbuf_idx
, unsigned long data_size
)
373 struct channel
*chan
= buf
->backend
.chan
;
374 struct packet_header
*header
=
375 (struct packet_header
*)
376 lib_ring_buffer_offset_address(&buf
->backend
,
377 subbuf_idx
* chan
->backend
.subbuf_size
);
378 unsigned long records_lost
= 0;
380 header
->ctx
.timestamp_end
= tsc
;
381 header
->ctx
.content_size
=
382 (uint64_t) data_size
* CHAR_BIT
; /* in bits */
383 header
->ctx
.packet_size
=
384 (uint64_t) PAGE_ALIGN(data_size
) * CHAR_BIT
; /* in bits */
385 records_lost
+= lib_ring_buffer_get_records_lost_full(&client_config
, buf
);
386 records_lost
+= lib_ring_buffer_get_records_lost_wrap(&client_config
, buf
);
387 records_lost
+= lib_ring_buffer_get_records_lost_big(&client_config
, buf
);
388 header
->ctx
.events_discarded
= records_lost
;
391 static int client_buffer_create(struct lib_ring_buffer
*buf
, void *priv
,
392 int cpu
, const char *name
)
397 static void client_buffer_finalize(struct lib_ring_buffer
*buf
, void *priv
, int cpu
)
401 static struct packet_header
*client_packet_header(
402 const struct lib_ring_buffer_config
*config
,
403 struct lib_ring_buffer
*buf
)
405 return lib_ring_buffer_read_offset_address(&buf
->backend
, 0);
408 static int client_timestamp_begin(const struct lib_ring_buffer_config
*config
,
409 struct lib_ring_buffer
*buf
,
410 uint64_t *timestamp_begin
)
412 struct packet_header
*header
= client_packet_header(config
, buf
);
413 *timestamp_begin
= header
->ctx
.timestamp_begin
;
418 static int client_timestamp_end(const struct lib_ring_buffer_config
*config
,
419 struct lib_ring_buffer
*buf
,
420 uint64_t *timestamp_end
)
422 struct packet_header
*header
= client_packet_header(config
, buf
);
423 *timestamp_end
= header
->ctx
.timestamp_end
;
428 static int client_events_discarded(const struct lib_ring_buffer_config
*config
,
429 struct lib_ring_buffer
*buf
,
430 uint64_t *events_discarded
)
432 struct packet_header
*header
= client_packet_header(config
, buf
);
433 *events_discarded
= header
->ctx
.events_discarded
;
438 static int client_content_size(const struct lib_ring_buffer_config
*config
,
439 struct lib_ring_buffer
*buf
,
440 uint64_t *content_size
)
442 struct packet_header
*header
= client_packet_header(config
, buf
);
443 *content_size
= header
->ctx
.content_size
;
448 static int client_packet_size(const struct lib_ring_buffer_config
*config
,
449 struct lib_ring_buffer
*buf
,
450 uint64_t *packet_size
)
452 struct packet_header
*header
= client_packet_header(config
, buf
);
453 *packet_size
= header
->ctx
.packet_size
;
458 static int client_stream_id(const struct lib_ring_buffer_config
*config
,
459 struct lib_ring_buffer
*buf
,
462 struct packet_header
*header
= client_packet_header(config
, buf
);
463 *stream_id
= header
->stream_id
;
468 static int client_current_timestamp(const struct lib_ring_buffer_config
*config
,
469 struct lib_ring_buffer
*bufb
,
472 *ts
= config
->cb
.ring_buffer_clock_read(bufb
->backend
.chan
);
477 static int client_sequence_number(const struct lib_ring_buffer_config
*config
,
478 struct lib_ring_buffer
*buf
,
481 struct packet_header
*header
= client_packet_header(config
, buf
);
483 *seq
= header
->ctx
.packet_seq_num
;
488 static const struct lib_ring_buffer_config client_config
= {
489 .cb
.ring_buffer_clock_read
= client_ring_buffer_clock_read
,
490 .cb
.record_header_size
= client_record_header_size
,
491 .cb
.subbuffer_header_size
= client_packet_header_size
,
492 .cb
.buffer_begin
= client_buffer_begin
,
493 .cb
.buffer_end
= client_buffer_end
,
494 .cb
.buffer_create
= client_buffer_create
,
495 .cb
.buffer_finalize
= client_buffer_finalize
,
497 .tsc_bits
= LTTNG_COMPACT_TSC_BITS
,
498 .alloc
= RING_BUFFER_ALLOC_PER_CPU
,
499 .sync
= RING_BUFFER_SYNC_PER_CPU
,
500 .mode
= RING_BUFFER_MODE_TEMPLATE
,
501 .backend
= RING_BUFFER_PAGE
,
502 .output
= RING_BUFFER_OUTPUT_TEMPLATE
,
503 .oops
= RING_BUFFER_OOPS_CONSISTENCY
,
504 .ipi
= RING_BUFFER_IPI_BARRIER
,
505 .wakeup
= RING_BUFFER_WAKEUP_BY_TIMER
,
509 void release_priv_ops(void *priv_ops
)
511 module_put(THIS_MODULE
);
515 void lttng_channel_destroy(struct channel
*chan
)
517 channel_destroy(chan
);
521 struct channel
*_channel_create(const char *name
,
522 struct lttng_channel
*lttng_chan
, void *buf_addr
,
523 size_t subbuf_size
, size_t num_subbuf
,
524 unsigned int switch_timer_interval
,
525 unsigned int read_timer_interval
)
527 struct channel
*chan
;
529 chan
= channel_create(&client_config
, name
, lttng_chan
, buf_addr
,
530 subbuf_size
, num_subbuf
, switch_timer_interval
,
531 read_timer_interval
);
534 * Ensure this module is not unloaded before we finish
535 * using lttng_relay_transport.ops.
537 if (!try_module_get(THIS_MODULE
)) {
538 printk(KERN_WARNING
"LTT : Can't lock transport module.\n");
541 chan
->backend
.priv_ops
= <tng_relay_transport
.ops
;
542 chan
->backend
.release_priv_ops
= release_priv_ops
;
547 lttng_channel_destroy(chan
);
552 struct lib_ring_buffer
*lttng_buffer_read_open(struct channel
*chan
)
554 struct lib_ring_buffer
*buf
;
557 for_each_channel_cpu(cpu
, chan
) {
558 buf
= channel_get_ring_buffer(&client_config
, chan
, cpu
);
559 if (!lib_ring_buffer_open_read(buf
))
566 int lttng_buffer_has_read_closed_stream(struct channel
*chan
)
568 struct lib_ring_buffer
*buf
;
571 for_each_channel_cpu(cpu
, chan
) {
572 buf
= channel_get_ring_buffer(&client_config
, chan
, cpu
);
573 if (!atomic_long_read(&buf
->active_readers
))
580 void lttng_buffer_read_close(struct lib_ring_buffer
*buf
)
582 lib_ring_buffer_release_read(buf
);
586 int lttng_event_reserve(struct lib_ring_buffer_ctx
*ctx
,
589 struct lttng_channel
*lttng_chan
= channel_get_private(ctx
->chan
);
592 cpu
= lib_ring_buffer_get_cpu(&client_config
);
597 switch (lttng_chan
->header_type
) {
598 case 1: /* compact */
600 ctx
->rflags
|= LTTNG_RFLAG_EXTENDED
;
603 if (event_id
> 65534)
604 ctx
->rflags
|= LTTNG_RFLAG_EXTENDED
;
610 ret
= lib_ring_buffer_reserve(&client_config
, ctx
);
613 lttng_write_event_header(&client_config
, ctx
, event_id
);
616 lib_ring_buffer_put_cpu(&client_config
);
621 void lttng_event_commit(struct lib_ring_buffer_ctx
*ctx
)
623 lib_ring_buffer_commit(&client_config
, ctx
);
624 lib_ring_buffer_put_cpu(&client_config
);
628 void lttng_event_write(struct lib_ring_buffer_ctx
*ctx
, const void *src
,
631 lib_ring_buffer_write(&client_config
, ctx
, src
, len
);
635 void lttng_event_write_from_user(struct lib_ring_buffer_ctx
*ctx
,
636 const void __user
*src
, size_t len
)
638 lib_ring_buffer_copy_from_user_inatomic(&client_config
, ctx
, src
, len
);
642 void lttng_event_memset(struct lib_ring_buffer_ctx
*ctx
,
645 lib_ring_buffer_memset(&client_config
, ctx
, c
, len
);
649 void lttng_event_strcpy(struct lib_ring_buffer_ctx
*ctx
, const char *src
,
652 lib_ring_buffer_strcpy(&client_config
, ctx
, src
, len
, '#');
656 void lttng_event_strcpy_from_user(struct lib_ring_buffer_ctx
*ctx
,
657 const char __user
*src
, size_t len
)
659 lib_ring_buffer_strcpy_from_user_inatomic(&client_config
, ctx
, src
,
664 wait_queue_head_t
*lttng_get_writer_buf_wait_queue(struct channel
*chan
, int cpu
)
666 struct lib_ring_buffer
*buf
= channel_get_ring_buffer(&client_config
,
668 return &buf
->write_wait
;
672 wait_queue_head_t
*lttng_get_hp_wait_queue(struct channel
*chan
)
674 return &chan
->hp_wait
;
678 int lttng_is_finalized(struct channel
*chan
)
680 return lib_ring_buffer_channel_is_finalized(chan
);
684 int lttng_is_disabled(struct channel
*chan
)
686 return lib_ring_buffer_channel_is_disabled(chan
);
689 static struct lttng_transport lttng_relay_transport
= {
690 .name
= "relay-" RING_BUFFER_MODE_TEMPLATE_STRING
,
691 .owner
= THIS_MODULE
,
693 .channel_create
= _channel_create
,
694 .channel_destroy
= lttng_channel_destroy
,
695 .buffer_read_open
= lttng_buffer_read_open
,
696 .buffer_has_read_closed_stream
=
697 lttng_buffer_has_read_closed_stream
,
698 .buffer_read_close
= lttng_buffer_read_close
,
699 .event_reserve
= lttng_event_reserve
,
700 .event_commit
= lttng_event_commit
,
701 .event_write
= lttng_event_write
,
702 .event_write_from_user
= lttng_event_write_from_user
,
703 .event_memset
= lttng_event_memset
,
704 .event_strcpy
= lttng_event_strcpy
,
705 .event_strcpy_from_user
= lttng_event_strcpy_from_user
,
706 .packet_avail_size
= NULL
, /* Would be racy anyway */
707 .get_writer_buf_wait_queue
= lttng_get_writer_buf_wait_queue
,
708 .get_hp_wait_queue
= lttng_get_hp_wait_queue
,
709 .is_finalized
= lttng_is_finalized
,
710 .is_disabled
= lttng_is_disabled
,
711 .timestamp_begin
= client_timestamp_begin
,
712 .timestamp_end
= client_timestamp_end
,
713 .events_discarded
= client_events_discarded
,
714 .content_size
= client_content_size
,
715 .packet_size
= client_packet_size
,
716 .stream_id
= client_stream_id
,
717 .current_timestamp
= client_current_timestamp
,
718 .sequence_number
= client_sequence_number
,
722 static int __init
lttng_ring_buffer_client_init(void)
725 * This vmalloc sync all also takes care of the lib ring buffer
726 * vmalloc'd module pages when it is built as a module into LTTng.
728 wrapper_vmalloc_sync_all();
729 lttng_transport_register(<tng_relay_transport
);
733 module_init(lttng_ring_buffer_client_init
);
735 static void __exit
lttng_ring_buffer_client_exit(void)
737 lttng_transport_unregister(<tng_relay_transport
);
740 module_exit(lttng_ring_buffer_client_exit
);
742 MODULE_LICENSE("GPL and additional rights");
743 MODULE_AUTHOR("Mathieu Desnoyers");
744 MODULE_DESCRIPTION("LTTng ring buffer " RING_BUFFER_MODE_TEMPLATE_STRING