static
void lib_ring_buffer_print_errors(struct channel *chan,
struct lib_ring_buffer *buf, int cpu,
- struct shm_handle *handle);
+ struct lttng_ust_shm_handle *handle);
/*
* Must be called under cpu hotplug protection.
*/
void lib_ring_buffer_free(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
* current iterator record is reset.
*/
void lib_ring_buffer_reset(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
*/
int lib_ring_buffer_create(struct lib_ring_buffer *buf,
struct channel_backend *chanb, int cpu,
- struct shm_handle *handle,
+ struct lttng_ust_shm_handle *handle,
struct shm_object *shmobj)
{
const struct lib_ring_buffer_config *config = &chanb->config;
#endif //0
static void lib_ring_buffer_start_switch_timer(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
//const struct lib_ring_buffer_config *config = &chan->backend.config;
}
static void lib_ring_buffer_stop_switch_timer(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
#endif //0
static void lib_ring_buffer_start_read_timer(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
}
static void lib_ring_buffer_stop_read_timer(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
}
static void channel_unregister_notifiers(struct channel *chan,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
int cpu;
//channel_backend_unregister_notifiers(&chan->backend);
}
-static void channel_free(struct channel *chan, struct shm_handle *handle,
+static void channel_free(struct channel *chan, struct lttng_ust_shm_handle *handle,
int shadow)
{
if (!shadow)
* Holds cpu hotplug.
* Returns NULL on failure.
*/
-struct shm_handle *channel_create(const struct lib_ring_buffer_config *config,
+struct lttng_ust_shm_handle *channel_create(const struct lib_ring_buffer_config *config,
const char *name, void *priv, void *buf_addr,
size_t subbuf_size,
size_t num_subbuf, unsigned int switch_timer_interval,
int ret, cpu;
size_t shmsize;
struct channel *chan;
- struct shm_handle *handle;
+ struct lttng_ust_shm_handle *handle;
struct shm_object *shmobj;
struct shm_ref *ref;
read_timer_interval))
return NULL;
- handle = zmalloc(sizeof(struct shm_handle));
+ handle = zmalloc(sizeof(struct lttng_ust_shm_handle));
if (!handle)
return NULL;
return NULL;
}
-struct shm_handle *channel_handle_create(int shm_fd, int wait_fd,
+struct lttng_ust_shm_handle *channel_handle_create(int shm_fd, int wait_fd,
uint64_t memory_map_size)
{
- struct shm_handle *handle;
+ struct lttng_ust_shm_handle *handle;
struct shm_object *object;
- handle = zmalloc(sizeof(struct shm_handle));
+ handle = zmalloc(sizeof(struct lttng_ust_shm_handle));
if (!handle)
return NULL;
return NULL;
}
-int channel_handle_add_stream(struct shm_handle *handle,
+int channel_handle_add_stream(struct lttng_ust_shm_handle *handle,
int shm_fd, int wait_fd, uint64_t memory_map_size)
{
struct shm_object *object;
}
static
-void channel_release(struct channel *chan, struct shm_handle *handle,
+void channel_release(struct channel *chan, struct lttng_ust_shm_handle *handle,
int shadow)
{
channel_free(chan, handle, shadow);
* They should release their handle at that point. Returns the private
* data pointer.
*/
-void *channel_destroy(struct channel *chan, struct shm_handle *handle,
+void *channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
int shadow)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
struct lib_ring_buffer *channel_get_ring_buffer(
const struct lib_ring_buffer_config *config,
struct channel *chan, int cpu,
- struct shm_handle *handle,
+ struct lttng_ust_shm_handle *handle,
int *shm_fd, int *wait_fd,
uint64_t *memory_map_size)
{
}
int lib_ring_buffer_open_read(struct lib_ring_buffer *buf,
- struct shm_handle *handle,
+ struct lttng_ust_shm_handle *handle,
int shadow)
{
if (shadow) {
}
void lib_ring_buffer_release_read(struct lib_ring_buffer *buf,
- struct shm_handle *handle,
+ struct lttng_ust_shm_handle *handle,
int shadow)
{
struct channel *chan = shmp(handle, buf->backend.chan);
int lib_ring_buffer_snapshot(struct lib_ring_buffer *buf,
unsigned long *consumed, unsigned long *produced,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
*/
void lib_ring_buffer_move_consumer(struct lib_ring_buffer *buf,
unsigned long consumed_new,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct lib_ring_buffer_backend *bufb = &buf->backend;
struct channel *chan = shmp(handle, bufb->chan);
*/
int lib_ring_buffer_get_subbuf(struct lib_ring_buffer *buf,
unsigned long consumed,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
* @buf: ring buffer
*/
void lib_ring_buffer_put_subbuf(struct lib_ring_buffer *buf,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct lib_ring_buffer_backend *bufb = &buf->backend;
struct channel *chan = shmp(handle, bufb->chan);
struct channel *chan,
unsigned long cons_offset,
int cpu,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long cons_idx, commit_count, commit_count_sb;
void lib_ring_buffer_print_buffer_errors(struct lib_ring_buffer *buf,
struct channel *chan,
void *priv, int cpu,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long write_offset, cons_offset;
static
void lib_ring_buffer_print_errors(struct channel *chan,
struct lib_ring_buffer *buf, int cpu,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
void *priv = chan->backend.priv;
struct channel *chan,
struct switch_offsets *offsets,
u64 tsc,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long oldidx = subbuf_index(offsets->old, chan);
struct channel *chan,
struct switch_offsets *offsets,
u64 tsc,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long oldidx = subbuf_index(offsets->old - 1, chan);
struct channel *chan,
struct switch_offsets *offsets,
u64 tsc,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long beginidx = subbuf_index(offsets->begin, chan);
struct channel *chan,
struct switch_offsets *offsets,
u64 tsc,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
unsigned long endidx = subbuf_index(offsets->end - 1, chan);
* for a ACTIVE flush.
*/
void lib_ring_buffer_switch_slow(struct lib_ring_buffer *buf, enum switch_mode mode,
- struct shm_handle *handle)
+ struct lttng_ust_shm_handle *handle)
{
struct channel *chan = shmp(handle, buf->backend.chan);
const struct lib_ring_buffer_config *config = &chan->backend.config;
struct lib_ring_buffer_ctx *ctx)
{
const struct lib_ring_buffer_config *config = &chan->backend.config;
- struct shm_handle *handle = ctx->handle;
+ struct lttng_ust_shm_handle *handle = ctx->handle;
unsigned long reserve_commit_diff;
offsets->begin = v_read(config, &buf->offset);
int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx)
{
struct channel *chan = ctx->chan;
- struct shm_handle *handle = ctx->handle;
+ struct lttng_ust_shm_handle *handle = ctx->handle;
const struct lib_ring_buffer_config *config = &chan->backend.config;
struct lib_ring_buffer *buf;
struct switch_offsets offsets;