Calculate context length outside of retry loop
[lttng-modules.git] / lib / ringbuffer / config.h
index 657c04d224a431ef41c7627aaf41a494072304c8..05985197ff930ee3b6a889f36abbbc5f6599aa06 100644 (file)
@@ -26,8 +26,8 @@
 
 #include <linux/types.h>
 #include <linux/percpu.h>
-#include "../align.h"
-#include "../../lttng-tracer-core.h"
+#include <lib/align.h>
+#include <lttng-tracer-core.h>
 
 struct lib_ring_buffer;
 struct channel;
@@ -48,7 +48,8 @@ struct lib_ring_buffer_client_cb {
        size_t (*record_header_size) (const struct lib_ring_buffer_config *config,
                                      struct channel *chan, size_t offset,
                                      size_t *pre_header_padding,
-                                     struct lib_ring_buffer_ctx *ctx);
+                                     struct lib_ring_buffer_ctx *ctx,
+                                     void *client_ctx);
 
        /* Slow path only, at subbuffer switch */
        size_t (*subbuffer_header_size) (void);
@@ -106,7 +107,7 @@ struct lib_ring_buffer_client_cb {
  *
  * wakeup:
  *
- * RING_BUFFER_WAKEUP_BY_TIMER uses per-cpu deferrable timers to poll the
+ * RING_BUFFER_WAKEUP_BY_TIMER uses per-cpu timers to poll the
  * buffers and wake up readers if data is ready. Mainly useful for tracers which
  * don't want to call into the wakeup code on the tracing path. Use in
  * combination with "read_timer_interval" channel_create() argument.
@@ -200,6 +201,8 @@ struct lib_ring_buffer_ctx {
                                         */
        u64 tsc;                        /* time-stamp counter value */
        unsigned int rflags;            /* reservation flags */
+       /* Cache backend pages pointer chasing. */
+       struct lib_ring_buffer_backend_pages *backend_pages;
 };
 
 /**
@@ -207,7 +210,7 @@ struct lib_ring_buffer_ctx {
  * @ctx: ring buffer context to initialize
  * @chan: channel
  * @priv: client private data
- * @data_size: size of record data payload
+ * @data_size: size of record data payload. It must be greater than 0.
  * @largest_align: largest alignment within data payload types
  * @cpu: processor id
  */
@@ -223,6 +226,7 @@ void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx,
        ctx->largest_align = largest_align;
        ctx->cpu = cpu;
        ctx->rflags = 0;
+       ctx->backend_pages = NULL;
 }
 
 /*
@@ -310,6 +314,6 @@ int lib_ring_buffer_check_config(const struct lib_ring_buffer_config *config,
        return 0;
 }
 
-#include "../../wrapper/ringbuffer/vatomic.h"
+#include <wrapper/ringbuffer/vatomic.h>
 
 #endif /* _LIB_RING_BUFFER_CONFIG_H */
This page took 0.02418 seconds and 4 git commands to generate.