projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move private ABI counter client symbols to dedicated header
[lttng-ust.git]
/
include
/
lttng
/
ringbuffer-context.h
diff --git
a/include/lttng/ringbuffer-context.h
b/include/lttng/ringbuffer-context.h
index 8a7b5758a09cc26884cc3ac142838a4c280ef395..e22fee19943c4bd1c7bff321292a4e16e73ede10 100644
(file)
--- a/
include/lttng/ringbuffer-context.h
+++ b/
include/lttng/ringbuffer-context.h
@@
-16,7
+16,7
@@
#include <string.h>
#include <lttng/ust-tracer.h>
#include <string.h>
#include <lttng/ust-tracer.h>
-#include <lttng/ust-
align
.h>
+#include <lttng/ust-
utils
.h>
#include <lttng/ust-compiler.h>
struct lttng_ust_lib_ring_buffer;
#include <lttng/ust-compiler.h>
struct lttng_ust_lib_ring_buffer;
@@
-27,7
+27,7
@@
struct lttng_ust_lib_ring_buffer_ctx;
* ring buffer context
*
* Context passed to lib_ring_buffer_reserve(), lib_ring_buffer_commit(),
* ring buffer context
*
* Context passed to lib_ring_buffer_reserve(), lib_ring_buffer_commit(),
- * lib_ring_buffer_try_discard_reserve(), lib_ring_buffer_align_ctx() and
+ * lib_ring_buffer_try_discard_reserve(), l
ttng_ust_l
ib_ring_buffer_align_ctx() and
* lib_ring_buffer_write().
*
* IMPORTANT: this structure is part of the ABI between the probe and
* lib_ring_buffer_write().
*
* IMPORTANT: this structure is part of the ABI between the probe and
@@
-74,7
+74,7
@@
struct lttng_ust_lib_ring_buffer_ctx {
};
/**
};
/**
- * lib_ring_buffer_ctx_init - initialize ring buffer context
+ * l
ttng_ust_l
ib_ring_buffer_ctx_init - initialize ring buffer context
* @ctx: ring buffer context to initialize
* @chan: channel
* @priv: client private data
* @ctx: ring buffer context to initialize
* @chan: channel
* @priv: client private data
@@
-82,11
+82,11
@@
struct lttng_ust_lib_ring_buffer_ctx {
* @largest_align: largest alignment within data payload types
*/
static inline lttng_ust_notrace
* @largest_align: largest alignment within data payload types
*/
static inline lttng_ust_notrace
-void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+void l
ttng_ust_l
ib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_lib_ring_buffer_channel *chan,
void *priv, size_t data_size, int largest_align);
static inline
struct lttng_ust_lib_ring_buffer_channel *chan,
void *priv, size_t data_size, int largest_align);
static inline
-void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+void l
ttng_ust_l
ib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_lib_ring_buffer_channel *chan,
void *priv, size_t data_size, int largest_align)
{
struct lttng_ust_lib_ring_buffer_channel *chan,
void *priv, size_t data_size, int largest_align)
{
@@
-101,57
+101,64
@@
void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx,
}
/*
}
/*
- * We need to define RING_BUFFER_ALIGN_ATTR so it is known early at
+ * We need to define
LTTNG_UST_
RING_BUFFER_ALIGN_ATTR so it is known early at
* compile-time. We have to duplicate the "config->align" information and the
* definition here because config->align is used both in the slow and fast
* compile-time. We have to duplicate the "config->align" information and the
* definition here because config->align is used both in the slow and fast
- * paths, but RING_BUFFER_ALIGN_ATTR is only available for the client code.
+ * paths, but LTTNG_UST_RING_BUFFER_ALIGN_ATTR is only available for the client
+ * code.
*/
*/
-#ifdef
RING_BUFFER
_ALIGN
+#ifdef
LTTNG_UST_RING_BUFFER_NATURAL
_ALIGN
-# define
RING_BUFFER_ALIGN_ATTR
/* Default arch alignment */
+# define
LTTNG_UST_RING_BUFFER_ALIGN_ATTR
/* Default arch alignment */
/*
/*
- * Calculate the offset needed to align the type.
- * size_of_type must be non-zero.
+ * lttng_ust_lib_ring_buffer_align - Calculate the offset needed to align the type.
+ * @align_drift: object offset from an "alignment"-aligned address.
+ * @size_of_type: Must be non-zero, power of 2.
*/
static inline lttng_ust_notrace
*/
static inline lttng_ust_notrace
-unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type);
+unsigned int l
ttng_ust_l
ib_ring_buffer_align(size_t align_drift, size_t size_of_type);
static inline
static inline
-unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
+unsigned int l
ttng_ust_l
ib_ring_buffer_align(size_t align_drift, size_t size_of_type)
{
return lttng_ust_offset_align(align_drift, size_of_type);
}
#else
{
return lttng_ust_offset_align(align_drift, size_of_type);
}
#else
-# define RING_BUFFER_ALIGN_ATTR __attribute__((packed))
+# define
LTTNG_UST_
RING_BUFFER_ALIGN_ATTR __attribute__((packed))
/*
/*
- * Calculate the offset needed to align the type.
- * size_of_type must be non-zero.
+ * lttng_ust_lib_ring_buffer_align - Calculate the offset needed to align the type.
+ * @align_drift: object offset from an "alignment"-aligned address.
+ * @size_of_type: Must be non-zero, power of 2.
*/
static inline lttng_ust_notrace
*/
static inline lttng_ust_notrace
-unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type);
+unsigned int l
ttng_ust_l
ib_ring_buffer_align(size_t align_drift, size_t size_of_type);
static inline
static inline
-unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
+unsigned int l
ttng_ust_l
ib_ring_buffer_align(size_t align_drift, size_t size_of_type)
{
{
+ /*
+ * On architectures with efficient unaligned memory access, the content
+ * of the ringbuffer is packed and so the offset is always zero.
+ */
return 0;
}
#endif
/**
return 0;
}
#endif
/**
- * lib_ring_buffer_align_ctx - Align context offset on "alignment"
+ * l
ttng_ust_l
ib_ring_buffer_align_ctx - Align context offset on "alignment"
* @ctx: ring buffer context.
*/
static inline lttng_ust_notrace
* @ctx: ring buffer context.
*/
static inline lttng_ust_notrace
-void lib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+void l
ttng_ust_l
ib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx,
size_t alignment);
static inline
size_t alignment);
static inline
-void lib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+void l
ttng_ust_l
ib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx,
size_t alignment)
{
size_t alignment)
{
- ctx->buf_offset += lib_ring_buffer_align(ctx->buf_offset,
+ ctx->buf_offset += l
ttng_ust_l
ib_ring_buffer_align(ctx->buf_offset,
alignment);
}
alignment);
}
This page took
0.025343 seconds
and
4
git commands to generate.