Rename shm_handle to lttng_ust_shm_handle
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2011 17:36:53 +0000 (13:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2011 17:36:53 +0000 (13:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
17 files changed:
include/ust/lttng-events.h
include/ust/lttng-ust-ctl.h
include/ust/ringbuffer-config.h
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/frontend.h
libringbuffer/frontend_api.h
libringbuffer/frontend_internal.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.h
libringbuffer/shm_types.h
libust/ltt-ring-buffer-client.h
libust/ltt-ring-buffer-metadata-client.h
libustctl/ustctl.c
tests/ust-basic-tracing/ust-basic-tracing.c
tests/ust-multi-test/ust-multi-test.c

index 05140c5f903afbbceb2c94525a36fb320cec7a9b..49bd6e9548b16bd8d8e577cbfd6b29265bcd239d 100644 (file)
@@ -201,7 +201,7 @@ struct ltt_event {
 };
 
 struct channel;
-struct shm_handle;
+struct lttng_ust_shm_handle;
 
 struct ltt_channel_ops {
        struct ltt_channel *(*channel_create)(const char *name,
@@ -214,11 +214,11 @@ struct ltt_channel_ops {
                                uint64_t *memory_map_size);
        void (*channel_destroy)(struct ltt_channel *ltt_chan);
        struct lib_ring_buffer *(*buffer_read_open)(struct channel *chan,
-                               struct shm_handle *handle,
+                               struct lttng_ust_shm_handle *handle,
                                int *shm_fd, int *wait_fd,
                                uint64_t *memory_map_size);
        void (*buffer_read_close)(struct lib_ring_buffer *buf,
-                               struct shm_handle *handle);
+                               struct lttng_ust_shm_handle *handle);
        int (*event_reserve)(struct lib_ring_buffer_ctx *ctx,
                             uint32_t event_id);
        void (*event_commit)(struct lib_ring_buffer_ctx *ctx);
@@ -230,12 +230,12 @@ struct ltt_channel_ops {
         * may change due to concurrent writes.
         */
        size_t (*packet_avail_size)(struct channel *chan,
-                                   struct shm_handle *handle);
+                                   struct lttng_ust_shm_handle *handle);
        //wait_queue_head_t *(*get_reader_wait_queue)(struct channel *chan);
        //wait_queue_head_t *(*get_hp_wait_queue)(struct channel *chan);
        int (*is_finalized)(struct channel *chan);
        int (*is_disabled)(struct channel *chan);
-       int (*flush_buffer)(struct channel *chan, struct shm_handle *handle);
+       int (*flush_buffer)(struct channel *chan, struct lttng_ust_shm_handle *handle);
 };
 
 struct ltt_channel {
@@ -251,7 +251,7 @@ struct ltt_channel {
        struct cds_list_head list;      /* Channel list */
        struct ltt_channel_ops *ops;
        int header_type;                /* 0: unset, 1: compact, 2: large */
-       struct shm_handle *handle;      /* shared-memory handle */
+       struct lttng_ust_shm_handle *handle;    /* shared-memory handle */
        int metadata_dumped:1;
 };
 
index bba594594cfd07f88b13cf52bd30fc8c9f53561c..e0e3e4083175bc65285b771916433099c8768748 100644 (file)
@@ -56,34 +56,34 @@ struct lttng_ust_calibrate;
 int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
 
 /*
- * Map channel shm_handle and add streams. Typically performed by the
+ * Map channel lttng_ust_shm_handle and add streams. Typically performed by the
  * consumer to map the objects into its memory space.
  */
-struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data);
-int ustctl_add_stream(struct shm_handle *shm_handle,
+struct lttng_ust_shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data);
+int ustctl_add_stream(struct lttng_ust_shm_handle *lttng_ust_shm_handle,
                struct lttng_ust_object_data *stream_data);
 /*
- * Note: the lttng_ust_object_data from which the shm_handle is derived can only
+ * Note: the lttng_ust_object_data from which the lttng_ust_shm_handle is derived can only
  * be released after unmapping the handle.
  */
-void ustctl_unmap_channel(struct shm_handle *shm_handle);
+void ustctl_unmap_channel(struct lttng_ust_shm_handle *lttng_ust_shm_handle);
 
 /* Buffer operations */
 
-struct shm_handle;
+struct lttng_ust_shm_handle;
 struct lib_ring_buffer;
 
 /* Open/close stream buffers for read */
-struct lib_ring_buffer *ustctl_open_stream_read(struct shm_handle *handle,
+struct lib_ring_buffer *ustctl_open_stream_read(struct lttng_ust_shm_handle *handle,
                int cpu);
-void ustctl_close_stream_read(struct shm_handle *handle,
+void ustctl_close_stream_read(struct lttng_ust_shm_handle *handle,
                 struct lib_ring_buffer *buf);
 
 /* For mmap mode, readable without "get" operation */
-int ustctl_get_mmap_len(struct shm_handle *handle,
+int ustctl_get_mmap_len(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf,
                unsigned long *len);
-int ustctl_get_max_subbuf_size(struct shm_handle *handle,
+int ustctl_get_max_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf,
                unsigned long *len);
 
@@ -91,30 +91,30 @@ int ustctl_get_max_subbuf_size(struct shm_handle *handle,
  * For mmap mode, operate on the current packet (between get/put or
  * get_next/put_next).
  */
-void *ustctl_get_mmap_base(struct shm_handle *handle,
+void *ustctl_get_mmap_base(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf);
-int ustctl_get_mmap_read_offset(struct shm_handle *handle,
+int ustctl_get_mmap_read_offset(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *off);
-int ustctl_get_subbuf_size(struct shm_handle *handle,
+int ustctl_get_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *len);
-int ustctl_get_padded_subbuf_size(struct shm_handle *handle,
+int ustctl_get_padded_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *len);
-int ustctl_get_next_subbuf(struct shm_handle *handle,
+int ustctl_get_next_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf);
-int ustctl_put_next_subbuf(struct shm_handle *handle,
+int ustctl_put_next_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf);
 
 /* snapshot */
 
-int ustctl_snapshot(struct shm_handle *handle,
+int ustctl_snapshot(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf);
-int ustctl_snapshot_get_consumed(struct shm_handle *handle,
+int ustctl_snapshot_get_consumed(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos);
-int ustctl_snapshot_get_produced(struct shm_handle *handle,
+int ustctl_snapshot_get_produced(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos);
-int ustctl_get_subbuf(struct shm_handle *handle,
+int ustctl_get_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos);
-int ustctl_put_subbuf(struct shm_handle *handle,
+int ustctl_put_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf);
 
 /* Release object created by members of this API */
index b3fbeef58cfa86b863a45fcef52ce2db82da7e0e..12bdc8695993a7b01f4e93e1b7f79718f8cf344c 100644 (file)
@@ -22,7 +22,7 @@ struct lib_ring_buffer;
 struct channel;
 struct lib_ring_buffer_config;
 struct lib_ring_buffer_ctx;
-struct shm_handle *handle;
+struct lttng_ust_shm_handle *handle;
 
 /*
  * Ring buffer client callbacks. Only used by slow path, never on fast path.
@@ -44,24 +44,24 @@ struct lib_ring_buffer_client_cb {
        size_t (*subbuffer_header_size) (void);
        void (*buffer_begin) (struct lib_ring_buffer *buf, u64 tsc,
                              unsigned int subbuf_idx,
-                             struct shm_handle *handle);
+                             struct lttng_ust_shm_handle *handle);
        void (*buffer_end) (struct lib_ring_buffer *buf, u64 tsc,
                            unsigned int subbuf_idx, unsigned long data_size,
-                           struct shm_handle *handle);
+                           struct lttng_ust_shm_handle *handle);
 
        /* Optional callbacks (can be set to NULL) */
 
        /* Called at buffer creation/finalize */
        int (*buffer_create) (struct lib_ring_buffer *buf, void *priv,
                              int cpu, const char *name,
-                             struct shm_handle *handle);
+                             struct lttng_ust_shm_handle *handle);
        /*
         * Clients should guarantee that no new reader handle can be opened
         * after finalize.
         */
        void (*buffer_finalize) (struct lib_ring_buffer *buf,
                                 void *priv, int cpu,
-                                struct shm_handle *handle);
+                                struct lttng_ust_shm_handle *handle);
 
        /*
         * Extract header length, payload length and timestamp from event
@@ -72,7 +72,7 @@ struct lib_ring_buffer_client_cb {
                            struct channel *chan, struct lib_ring_buffer *buf,
                            size_t offset, size_t *header_len,
                            size_t *payload_len, u64 *timestamp,
-                           struct shm_handle *handle);
+                           struct lttng_ust_shm_handle *handle);
 };
 
 /*
@@ -174,7 +174,7 @@ struct lib_ring_buffer_ctx {
        /* input received by lib_ring_buffer_reserve(), saved here. */
        struct channel *chan;           /* channel */
        void *priv;                     /* client private data */
-       struct shm_handle *handle;      /* shared-memory handle */
+       struct lttng_ust_shm_handle *handle;    /* shared-memory handle */
        size_t data_size;               /* size of payload */
        int largest_align;              /*
                                         * alignment of the largest element
@@ -212,7 +212,7 @@ static inline
 void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx,
                              struct channel *chan, void *priv,
                              size_t data_size, int largest_align,
-                             int cpu, struct shm_handle *handle)
+                             int cpu, struct lttng_ust_shm_handle *handle)
 {
        ctx->chan = chan;
        ctx->priv = priv;
index 83e07e426b3de3458a995bcfa953e0e33ee9d1fb..6eb0cf0b4e8feb4ab3f69f2f51f6e0be874b22f8 100644 (file)
 
 extern size_t lib_ring_buffer_read(struct lib_ring_buffer_backend *bufb,
                                   size_t offset, void *dest, size_t len,
-                                  struct shm_handle *handle);
+                                  struct lttng_ust_shm_handle *handle);
 
 extern int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb,
                                     size_t offset, void *dest, size_t len,
-                                    struct shm_handle *handle);
+                                    struct lttng_ust_shm_handle *handle);
 
 /*
  * Return the address where a given offset is located.
@@ -43,11 +43,11 @@ extern int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb,
 extern void *
 lib_ring_buffer_offset_address(struct lib_ring_buffer_backend *bufb,
                               size_t offset,
-                              struct shm_handle *handle);
+                              struct lttng_ust_shm_handle *handle);
 extern void *
 lib_ring_buffer_read_offset_address(struct lib_ring_buffer_backend *bufb,
                                    size_t offset,
-                                   struct shm_handle *handle);
+                                   struct lttng_ust_shm_handle *handle);
 
 /**
  * lib_ring_buffer_write - write data to a buffer backend
@@ -68,7 +68,7 @@ void lib_ring_buffer_write(const struct lib_ring_buffer_config *config,
 {
        struct lib_ring_buffer_backend *bufb = &ctx->buf->backend;
        struct channel_backend *chanb = &ctx->chan->backend;
-       struct shm_handle *handle = ctx->handle;
+       struct lttng_ust_shm_handle *handle = ctx->handle;
        size_t sbidx;
        size_t offset = ctx->buf_offset;
        struct lib_ring_buffer_backend_pages_shmp *rpages;
@@ -102,7 +102,7 @@ static inline
 unsigned long lib_ring_buffer_get_records_unread(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer *buf,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend *bufb = &buf->backend;
        struct lib_ring_buffer_backend_pages_shmp *pages;
index ba0497f9f089f3cb6714f2e59603524eab5c725b..788cdfb14fe378a6e3277a24c554e205e7eb935e 100644 (file)
@@ -25,7 +25,7 @@
 
 int lib_ring_buffer_backend_create(struct lib_ring_buffer_backend *bufb,
                                   struct channel_backend *chan, int cpu,
-                                  struct shm_handle *handle,
+                                  struct lttng_ust_shm_handle *handle,
                                   struct shm_object *shmobj);
 void channel_backend_unregister_notifiers(struct channel_backend *chanb);
 void lib_ring_buffer_backend_free(struct lib_ring_buffer_backend *bufb);
@@ -33,12 +33,12 @@ int channel_backend_init(struct channel_backend *chanb,
                         const char *name,
                         const struct lib_ring_buffer_config *config,
                         void *priv, size_t subbuf_size,
-                        size_t num_subbuf, struct shm_handle *handle);
+                        size_t num_subbuf, struct lttng_ust_shm_handle *handle);
 void channel_backend_free(struct channel_backend *chanb,
-                         struct shm_handle *handle);
+                         struct lttng_ust_shm_handle *handle);
 
 void lib_ring_buffer_backend_reset(struct lib_ring_buffer_backend *bufb,
-                                  struct shm_handle *handle);
+                                  struct lttng_ust_shm_handle *handle);
 void channel_backend_reset(struct channel_backend *chanb);
 
 int lib_ring_buffer_backend_init(void);
@@ -186,7 +186,7 @@ int subbuffer_id_check_index(const struct lib_ring_buffer_config *config,
 static inline
 void subbuffer_count_record(const struct lib_ring_buffer_config *config,
                            struct lib_ring_buffer_backend *bufb,
-                           unsigned long idx, struct shm_handle *handle)
+                           unsigned long idx, struct lttng_ust_shm_handle *handle)
 {
        unsigned long sb_bindex;
 
@@ -201,7 +201,7 @@ void subbuffer_count_record(const struct lib_ring_buffer_config *config,
 static inline
 void subbuffer_consume_record(const struct lib_ring_buffer_config *config,
                              struct lib_ring_buffer_backend *bufb,
-                             struct shm_handle *handle)
+                             struct lttng_ust_shm_handle *handle)
 {
        unsigned long sb_bindex;
 
@@ -218,7 +218,7 @@ unsigned long subbuffer_get_records_count(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer_backend *bufb,
                                unsigned long idx,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        unsigned long sb_bindex;
 
@@ -237,7 +237,7 @@ unsigned long subbuffer_count_records_overrun(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer_backend *bufb,
                                unsigned long idx,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend_pages_shmp *pages;
        unsigned long overruns, sb_bindex;
@@ -257,7 +257,7 @@ void subbuffer_set_data_size(const struct lib_ring_buffer_config *config,
                             struct lib_ring_buffer_backend *bufb,
                             unsigned long idx,
                             unsigned long data_size,
-                            struct shm_handle *handle)
+                            struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend_pages_shmp *pages;
        unsigned long sb_bindex;
@@ -271,7 +271,7 @@ static inline
 unsigned long subbuffer_get_read_data_size(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer_backend *bufb,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend_pages_shmp *pages;
        unsigned long sb_bindex;
@@ -286,7 +286,7 @@ unsigned long subbuffer_get_data_size(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer_backend *bufb,
                                unsigned long idx,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend_pages_shmp *pages;
        unsigned long sb_bindex;
@@ -304,7 +304,7 @@ static inline
 void lib_ring_buffer_clear_noref(const struct lib_ring_buffer_config *config,
                                 struct lib_ring_buffer_backend *bufb,
                                 unsigned long idx,
-                                struct shm_handle *handle)
+                                struct lttng_ust_shm_handle *handle)
 {
        unsigned long id, new_id;
 
@@ -344,7 +344,7 @@ static inline
 void lib_ring_buffer_set_noref_offset(const struct lib_ring_buffer_config *config,
                                      struct lib_ring_buffer_backend *bufb,
                                      unsigned long idx, unsigned long offset,
-                                     struct shm_handle *handle)
+                                     struct lttng_ust_shm_handle *handle)
 {
        if (config->mode != RING_BUFFER_OVERWRITE)
                return;
@@ -379,7 +379,7 @@ int update_read_sb_index(const struct lib_ring_buffer_config *config,
                         struct channel_backend *chanb,
                         unsigned long consumed_idx,
                         unsigned long consumed_count,
-                        struct shm_handle *handle)
+                        struct lttng_ust_shm_handle *handle)
 {
        unsigned long old_id, new_id;
 
index 9fa0f04d2a67d0bf6e1b46a997755e8fc16ff64e..c5ac2fad6aedd2ea201314550088b5968dfdd1cc 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 extern
-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,
@@ -48,12 +48,12 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config,
 
 /* channel_handle_create - for consumer. */
 extern
-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);
 
 /* channel_handle_add_stream - for consumer. */
 extern
-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);
 
 /*
@@ -62,7 +62,7 @@ int channel_handle_add_stream(struct shm_handle *handle,
  * channel.
  */
 extern
-void *channel_destroy(struct channel *chan, struct shm_handle *handle,
+void *channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
                int shadow);
 
 
@@ -80,14 +80,14 @@ void *channel_destroy(struct channel *chan, struct shm_handle *handle,
 extern 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);
 extern int lib_ring_buffer_open_read(struct lib_ring_buffer *buf,
-                                    struct shm_handle *handle,
+                                    struct lttng_ust_shm_handle *handle,
                                     int shadow);
 extern void lib_ring_buffer_release_read(struct lib_ring_buffer *buf,
-                                        struct shm_handle *handle,
+                                        struct lttng_ust_shm_handle *handle,
                                         int shadow);
 
 /*
@@ -96,23 +96,23 @@ extern void lib_ring_buffer_release_read(struct lib_ring_buffer *buf,
 extern 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);
 extern 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);
 
 extern int lib_ring_buffer_get_subbuf(struct lib_ring_buffer *buf,
                                      unsigned long consumed,
-                                     struct shm_handle *handle);
+                                     struct lttng_ust_shm_handle *handle);
 extern void lib_ring_buffer_put_subbuf(struct lib_ring_buffer *buf,
-                                      struct shm_handle *handle);
+                                      struct lttng_ust_shm_handle *handle);
 
 /*
  * lib_ring_buffer_get_next_subbuf/lib_ring_buffer_put_next_subbuf are helpers
  * to read sub-buffers sequentially.
  */
 static inline int lib_ring_buffer_get_next_subbuf(struct lib_ring_buffer *buf,
-                                                 struct shm_handle *handle)
+                                                 struct lttng_ust_shm_handle *handle)
 {
        int ret;
 
@@ -126,7 +126,7 @@ static inline int lib_ring_buffer_get_next_subbuf(struct lib_ring_buffer *buf,
 
 static inline
 void lib_ring_buffer_put_next_subbuf(struct lib_ring_buffer *buf,
-                                    struct shm_handle *handle)
+                                    struct lttng_ust_shm_handle *handle)
 {
        lib_ring_buffer_put_subbuf(buf, handle);
        lib_ring_buffer_move_consumer(buf, subbuf_align(buf->cons_snapshot,
@@ -135,7 +135,7 @@ void lib_ring_buffer_put_next_subbuf(struct lib_ring_buffer *buf,
 
 extern void channel_reset(struct channel *chan);
 extern void lib_ring_buffer_reset(struct lib_ring_buffer *buf,
-                                 struct shm_handle *handle);
+                                 struct lttng_ust_shm_handle *handle);
 
 static inline
 unsigned long lib_ring_buffer_get_offset(const struct lib_ring_buffer_config *config,
@@ -183,7 +183,7 @@ static inline
 unsigned long lib_ring_buffer_get_read_data_size(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer *buf,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        return subbuffer_get_read_data_size(config, &buf->backend, handle);
 }
index f570cc168174de626d134998571120e8e10a81a7..df9d56ff5e55b25510cea1323aa31ed2583881e3 100644 (file)
@@ -146,7 +146,7 @@ int lib_ring_buffer_reserve(const struct lib_ring_buffer_config *config,
                            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;
        struct lib_ring_buffer *buf;
        unsigned long o_begin, o_end, o_old;
        size_t before_hdr_pad = 0;
@@ -216,7 +216,7 @@ slow_path:
 static inline
 void lib_ring_buffer_switch(const struct lib_ring_buffer_config *config,
                            struct lib_ring_buffer *buf, enum switch_mode mode,
-                           struct shm_handle *handle)
+                           struct lttng_ust_shm_handle *handle)
 {
        lib_ring_buffer_switch_slow(buf, mode, handle);
 }
@@ -236,7 +236,7 @@ void lib_ring_buffer_commit(const struct lib_ring_buffer_config *config,
                            const 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;
        struct lib_ring_buffer *buf = ctx->buf;
        unsigned long offset_end = ctx->buf_offset;
        unsigned long endidx = subbuf_index(offset_end - 1, chan);
index a6b96c1a098ab089199cbc9d06f59549bcc4328f..4c72318c2cf8bdab3a4ab03fd02399a82587d608 100644 (file)
@@ -145,7 +145,7 @@ int lib_ring_buffer_reserve_slow(struct lib_ring_buffer_ctx *ctx);
 extern
 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);
 
 /* Buffer write helpers */
 
@@ -182,7 +182,7 @@ void lib_ring_buffer_vmcore_check_deliver(const struct lib_ring_buffer_config *c
                                          struct lib_ring_buffer *buf,
                                          unsigned long commit_count,
                                          unsigned long idx,
-                                         struct shm_handle *handle)
+                                         struct lttng_ust_shm_handle *handle)
 {
        if (config->oops == RING_BUFFER_OOPS_CONSISTENCY)
                v_set(config, &shmp_index(handle, buf->commit_hot, idx)->seq, commit_count);
@@ -192,7 +192,7 @@ static inline
 int lib_ring_buffer_poll_deliver(const struct lib_ring_buffer_config *config,
                                 struct lib_ring_buffer *buf,
                                 struct channel *chan,
-                                struct shm_handle *handle)
+                                struct lttng_ust_shm_handle *handle)
 {
        unsigned long consumed_old, consumed_idx, commit_count, write_offset;
 
@@ -243,7 +243,7 @@ static inline
 unsigned long lib_ring_buffer_get_data_size(const struct lib_ring_buffer_config *config,
                                            struct lib_ring_buffer *buf,
                                            unsigned long idx,
-                                           struct shm_handle *handle)
+                                           struct lttng_ust_shm_handle *handle)
 {
        return subbuffer_get_data_size(config, &buf->backend, idx, handle);
 }
@@ -257,7 +257,7 @@ static inline
 int lib_ring_buffer_reserve_committed(const struct lib_ring_buffer_config *config,
                                      struct lib_ring_buffer *buf,
                                      struct channel *chan,
-                                     struct shm_handle *handle)
+                                     struct lttng_ust_shm_handle *handle)
 {
        unsigned long offset, idx, commit_count;
 
@@ -289,7 +289,7 @@ void lib_ring_buffer_check_deliver(const struct lib_ring_buffer_config *config,
                                   unsigned long offset,
                                   unsigned long commit_count,
                                   unsigned long idx,
-                                  struct shm_handle *handle)
+                                  struct lttng_ust_shm_handle *handle)
 {
        unsigned long old_commit_count = commit_count
                                         - chan->backend.subbuf_size;
@@ -428,7 +428,7 @@ void lib_ring_buffer_write_commit_counter(const struct lib_ring_buffer_config *c
                                          unsigned long buf_offset,
                                          unsigned long commit_count,
                                          size_t slot_size,
-                                         struct shm_handle *handle)
+                                         struct lttng_ust_shm_handle *handle)
 {
        unsigned long offset, commit_seq_old;
 
@@ -454,10 +454,10 @@ void lib_ring_buffer_write_commit_counter(const struct lib_ring_buffer_config *c
 
 extern 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);
 extern void lib_ring_buffer_free(struct lib_ring_buffer *buf,
-                                struct shm_handle *handle);
+                                struct lttng_ust_shm_handle *handle);
 
 /* Keep track of trap nesting inside ring buffer code */
 extern __thread unsigned int lib_ring_buffer_nesting;
index 55b5f4c228dd84677f5de5ef5b773adaf584a46a..adf5978485f12577dd551a1c063256407abb913d 100644 (file)
@@ -29,7 +29,7 @@ int lib_ring_buffer_backend_allocate(const struct lib_ring_buffer_config *config
                                     struct lib_ring_buffer_backend *bufb,
                                     size_t size, size_t num_subbuf,
                                     int extra_reader_sb,
-                                    struct shm_handle *handle,
+                                    struct lttng_ust_shm_handle *handle,
                                     struct shm_object *shmobj)
 {
        struct channel_backend *chanb = &shmp(handle, bufb->chan)->backend;
@@ -115,7 +115,7 @@ array_error:
 
 int lib_ring_buffer_backend_create(struct lib_ring_buffer_backend *bufb,
                                   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;
@@ -138,7 +138,7 @@ void lib_ring_buffer_backend_free(struct lib_ring_buffer_backend *bufb)
 }
 
 void lib_ring_buffer_backend_reset(struct lib_ring_buffer_backend *bufb,
-                                  struct shm_handle *handle)
+                                  struct lttng_ust_shm_handle *handle)
 {
        struct channel_backend *chanb = &shmp(handle, bufb->chan)->backend;
        const struct lib_ring_buffer_config *config = &chanb->config;
@@ -194,7 +194,7 @@ void channel_backend_reset(struct channel_backend *chanb)
  * @parent: dentry of parent directory, %NULL for root directory
  * @subbuf_size: size of sub-buffers (> PAGE_SIZE, power of 2)
  * @num_subbuf: number of sub-buffers (power of 2)
- * @shm_handle: shared memory handle
+ * @lttng_ust_shm_handle: shared memory handle
  *
  * Returns channel pointer if successful, %NULL otherwise.
  *
@@ -208,7 +208,7 @@ int channel_backend_init(struct channel_backend *chanb,
                         const char *name,
                         const struct lib_ring_buffer_config *config,
                         void *priv, size_t subbuf_size, size_t num_subbuf,
-                        struct shm_handle *handle)
+                        struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan = caa_container_of(chanb, struct channel, backend);
        unsigned int i;
@@ -334,7 +334,7 @@ end:
  * Destroy all channel buffers and frees the channel.
  */
 void channel_backend_free(struct channel_backend *chanb,
-                         struct shm_handle *handle)
+                         struct lttng_ust_shm_handle *handle)
 {
        const struct lib_ring_buffer_config *config = &chanb->config;
        unsigned int i;
@@ -367,7 +367,7 @@ void channel_backend_free(struct channel_backend *chanb,
  * Returns the length copied.
  */
 size_t lib_ring_buffer_read(struct lib_ring_buffer_backend *bufb, size_t offset,
-                           void *dest, size_t len, struct shm_handle *handle)
+                           void *dest, size_t len, struct lttng_ust_shm_handle *handle)
 {
        struct channel_backend *chanb = &shmp(handle, bufb->chan)->backend;
        const struct lib_ring_buffer_config *config = &chanb->config;
@@ -405,7 +405,7 @@ size_t lib_ring_buffer_read(struct lib_ring_buffer_backend *bufb, size_t offset,
  * Should be protected by get_subbuf/put_subbuf.
  */
 int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb, size_t offset,
-                             void *dest, size_t len, struct shm_handle *handle)
+                             void *dest, size_t len, struct lttng_ust_shm_handle *handle)
 {
        struct channel_backend *chanb = &shmp(handle, bufb->chan)->backend;
        const struct lib_ring_buffer_config *config = &chanb->config;
@@ -447,7 +447,7 @@ int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb, size_t offse
  */
 void *lib_ring_buffer_read_offset_address(struct lib_ring_buffer_backend *bufb,
                                          size_t offset,
-                                         struct shm_handle *handle)
+                                         struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend_pages_shmp *rpages;
        struct channel_backend *chanb = &shmp(handle, bufb->chan)->backend;
@@ -475,7 +475,7 @@ void *lib_ring_buffer_read_offset_address(struct lib_ring_buffer_backend *bufb,
  */
 void *lib_ring_buffer_offset_address(struct lib_ring_buffer_backend *bufb,
                                     size_t offset,
-                                    struct shm_handle *handle)
+                                    struct lttng_ust_shm_handle *handle)
 {
        size_t sbidx;
        struct lib_ring_buffer_backend_pages_shmp *rpages;
index cf012dfaf2225dfe7a66cf2fb63f4e860c48265d..1fc44912b51f2db96eb30348740645e18f6a25bd 100644 (file)
@@ -86,13 +86,13 @@ __thread unsigned int lib_ring_buffer_nesting;
 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);
 
@@ -113,7 +113,7 @@ void lib_ring_buffer_free(struct lib_ring_buffer *buf,
  * 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;
@@ -169,7 +169,7 @@ void channel_reset(struct channel *chan)
  */
 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;
@@ -263,7 +263,7 @@ static void switch_buffer_timer(unsigned long data)
 #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;
@@ -283,7 +283,7 @@ static void lib_ring_buffer_start_switch_timer(struct lib_ring_buffer *buf,
 }
 
 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);
 
@@ -325,7 +325,7 @@ static void read_buffer_timer(unsigned long data)
 #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;
@@ -349,7 +349,7 @@ static void lib_ring_buffer_start_read_timer(struct lib_ring_buffer *buf,
 }
 
 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;
@@ -374,7 +374,7 @@ static void lib_ring_buffer_stop_read_timer(struct lib_ring_buffer *buf,
 }
 
 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;
@@ -395,7 +395,7 @@ static void channel_unregister_notifiers(struct channel *chan,
        //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)
@@ -423,7 +423,7 @@ static void channel_free(struct channel *chan, struct shm_handle *handle,
  * 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,
@@ -433,7 +433,7 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config,
        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;
 
@@ -441,7 +441,7 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config,
                                         read_timer_interval))
                return NULL;
 
-       handle = zmalloc(sizeof(struct shm_handle));
+       handle = zmalloc(sizeof(struct lttng_ust_shm_handle));
        if (!handle)
                return NULL;
 
@@ -510,13 +510,13 @@ error_table_alloc:
        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;
 
@@ -541,7 +541,7 @@ error_table_alloc:
        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;
@@ -555,7 +555,7 @@ int channel_handle_add_stream(struct shm_handle *handle,
 }
 
 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);
@@ -572,7 +572,7 @@ void channel_release(struct channel *chan, struct shm_handle *handle,
  * 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;
@@ -634,7 +634,7 @@ void *channel_destroy(struct channel *chan, struct shm_handle *handle,
 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)
 {
@@ -656,7 +656,7 @@ struct lib_ring_buffer *channel_get_ring_buffer(
 }
 
 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) {
@@ -672,7 +672,7 @@ int lib_ring_buffer_open_read(struct lib_ring_buffer *buf,
 }
 
 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);
@@ -700,7 +700,7 @@ void lib_ring_buffer_release_read(struct lib_ring_buffer *buf,
 
 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;
@@ -754,7 +754,7 @@ nodata:
  */
 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);
@@ -784,7 +784,7 @@ void lib_ring_buffer_move_consumer(struct lib_ring_buffer *buf,
  */
 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;
@@ -877,7 +877,7 @@ nodata:
  * @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);
@@ -940,7 +940,7 @@ void lib_ring_buffer_print_subbuffer_errors(struct lib_ring_buffer *buf,
                                            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;
@@ -966,7 +966,7 @@ static
 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;
@@ -1002,7 +1002,7 @@ void lib_ring_buffer_print_buffer_errors(struct lib_ring_buffer *buf,
 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;
@@ -1037,7 +1037,7 @@ void lib_ring_buffer_switch_old_start(struct lib_ring_buffer *buf,
                                      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);
@@ -1075,7 +1075,7 @@ void lib_ring_buffer_switch_old_end(struct lib_ring_buffer *buf,
                                    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);
@@ -1112,7 +1112,7 @@ void lib_ring_buffer_switch_new_start(struct lib_ring_buffer *buf,
                                      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);
@@ -1148,7 +1148,7 @@ void lib_ring_buffer_switch_new_end(struct lib_ring_buffer *buf,
                                    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);
@@ -1242,7 +1242,7 @@ int lib_ring_buffer_try_switch_slow(enum switch_mode mode,
  * 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;
@@ -1306,7 +1306,7 @@ int lib_ring_buffer_try_reserve_slow(struct lib_ring_buffer *buf,
                                     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);
@@ -1441,7 +1441,7 @@ int lib_ring_buffer_try_reserve_slow(struct lib_ring_buffer *buf,
 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;
index 45b6473d6fb0e9cee2a8e4c551e4d421912b020c..22d3accc1b5779e10c5bbfb969acffd5196809bb 100644 (file)
@@ -77,7 +77,7 @@ struct shm_ref zalloc_shm(struct shm_object *obj, size_t len);
 void align_shm(struct shm_object *obj, size_t align);
 
 static inline
-int shm_get_wakeup_fd(struct shm_handle *handle, struct shm_ref *ref)
+int shm_get_wakeup_fd(struct lttng_ust_shm_handle *handle, struct shm_ref *ref)
 {
        struct shm_object_table *table = handle->table;
        struct shm_object *obj;
@@ -92,7 +92,7 @@ int shm_get_wakeup_fd(struct shm_handle *handle, struct shm_ref *ref)
 }
 
 static inline
-int shm_get_wait_fd(struct shm_handle *handle, struct shm_ref *ref)
+int shm_get_wait_fd(struct lttng_ust_shm_handle *handle, struct shm_ref *ref)
 {
        struct shm_object_table *table = handle->table;
        struct shm_object *obj;
@@ -106,7 +106,7 @@ int shm_get_wait_fd(struct shm_handle *handle, struct shm_ref *ref)
 }
 
 static inline
-int shm_get_object_data(struct shm_handle *handle, struct shm_ref *ref,
+int shm_get_object_data(struct lttng_ust_shm_handle *handle, struct shm_ref *ref,
                int *shm_fd, int *wait_fd, uint64_t *memory_map_size)
 {
        struct shm_object_table *table = handle->table;
index e92c0af03d3d99e61f92b07684536161a116f4bf..9869eb88a82af57f25d1c34bed6ef306a4c48478 100644 (file)
@@ -29,7 +29,7 @@ struct shm_object_table {
        struct shm_object objects[];
 };
 
-struct shm_handle {
+struct lttng_ust_shm_handle {
        struct shm_object_table *table;
        DECLARE_SHMP(struct channel, chan);
        /*
index 6392739b50160aa4ff76efd9c70fa4a00f8666a7..f4911e8e8654d462dcd989a3c89e198a971615d0 100644 (file)
@@ -296,7 +296,7 @@ static size_t client_packet_header_size(void)
 
 static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc,
                                unsigned int subbuf_idx,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan = shmp(handle, buf->backend.chan);
        struct packet_header *header =
@@ -324,7 +324,7 @@ static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc,
  */
 static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
                              unsigned int subbuf_idx, unsigned long data_size,
-                             struct shm_handle *handle)
+                             struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan = shmp(handle, buf->backend.chan);
        struct packet_header *header =
@@ -348,12 +348,12 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
 }
 
 static int client_buffer_create(struct lib_ring_buffer *buf, void *priv,
-                               int cpu, const char *name, struct shm_handle *handle)
+                               int cpu, const char *name, struct lttng_ust_shm_handle *handle)
 {
        return 0;
 }
 
-static void client_buffer_finalize(struct lib_ring_buffer *buf, void *priv, int cpu, struct shm_handle *handle)
+static void client_buffer_finalize(struct lib_ring_buffer *buf, void *priv, int cpu, struct lttng_ust_shm_handle *handle)
 {
 }
 
@@ -404,7 +404,7 @@ void ltt_channel_destroy(struct ltt_channel *ltt_chan)
 
 static
 struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan,
-                                            struct shm_handle *handle,
+                                            struct lttng_ust_shm_handle *handle,
                                             int *shm_fd, int *wait_fd,
                                             uint64_t *memory_map_size)
 {
@@ -423,7 +423,7 @@ struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan,
 
 static
 void ltt_buffer_read_close(struct lib_ring_buffer *buf,
-                          struct shm_handle *handle)
+                          struct lttng_ust_shm_handle *handle)
 {
        lib_ring_buffer_release_read(buf, handle, 0);
 }
@@ -504,7 +504,7 @@ int ltt_is_disabled(struct channel *chan)
 }
 
 static
-int ltt_flush_buffer(struct channel *chan, struct shm_handle *handle)
+int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer *buf;
        int cpu;
index 477d6b955b9b8de731d1628b0d2f49c3b823068b..8adf7b6592c6c9bc5e90b7c14e236c7002852c5f 100644 (file)
@@ -79,7 +79,7 @@ static size_t client_packet_header_size(void)
 
 static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc,
                                unsigned int subbuf_idx,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan = shmp(handle, buf->backend.chan);
        struct metadata_packet_header *header =
@@ -109,7 +109,7 @@ static void client_buffer_begin(struct lib_ring_buffer *buf, u64 tsc,
  */
 static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
                              unsigned int subbuf_idx, unsigned long data_size,
-                             struct shm_handle *handle)
+                             struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan = shmp(handle, buf->backend.chan);
        struct metadata_packet_header *header =
@@ -129,14 +129,14 @@ static void client_buffer_end(struct lib_ring_buffer *buf, u64 tsc,
 
 static int client_buffer_create(struct lib_ring_buffer *buf, void *priv,
                                int cpu, const char *name,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        return 0;
 }
 
 static void client_buffer_finalize(struct lib_ring_buffer *buf,
                                   void *priv, int cpu,
-                                  struct shm_handle *handle)
+                                  struct lttng_ust_shm_handle *handle)
 {
 }
 
@@ -187,7 +187,7 @@ void ltt_channel_destroy(struct ltt_channel *ltt_chan)
 
 static
 struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan,
-                                            struct shm_handle *handle,
+                                            struct lttng_ust_shm_handle *handle,
                                             int *shm_fd, int *wait_fd,
                                             uint64_t *memory_map_size)
 {
@@ -202,7 +202,7 @@ struct lib_ring_buffer *ltt_buffer_read_open(struct channel *chan,
 
 static
 void ltt_buffer_read_close(struct lib_ring_buffer *buf,
-                          struct shm_handle *handle)
+                          struct lttng_ust_shm_handle *handle)
 {
        lib_ring_buffer_release_read(buf, handle, 0);
 }
@@ -227,7 +227,7 @@ void ltt_event_write(struct lib_ring_buffer_ctx *ctx, const void *src,
 }
 
 static
-size_t ltt_packet_avail_size(struct channel *chan, struct shm_handle *handle)
+size_t ltt_packet_avail_size(struct channel *chan, struct lttng_ust_shm_handle *handle)
                             
 {
        unsigned long o_begin;
@@ -270,7 +270,7 @@ int ltt_is_disabled(struct channel *chan)
 }
 
 static
-int ltt_flush_buffer(struct channel *chan, struct shm_handle *handle)
+int ltt_flush_buffer(struct channel *chan, struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer *buf;
        int shm_fd, wait_fd;
index 8e6e2f31402397d1dbfbaa933cd188cec6c2bbf4..060235e497dacebef533a729d6e877235fccfa09 100644 (file)
@@ -426,9 +426,9 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate)
 /* Buffer operations */
 
 /* Map channel shm into process memory */
-struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data)
+struct lttng_ust_shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data)
 {
-       struct shm_handle *handle;
+       struct lttng_ust_shm_handle *handle;
        struct channel *chan;
        size_t chan_size;
 
@@ -440,7 +440,7 @@ struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data)
                return NULL;
        }
        /*
-        * Set to -1 because the shm_handle destruction will take care
+        * Set to -1 because the lttng_ust_shm_handle destruction will take care
         * of closing shm_fd and wait_fd.
         */
        chan_data->shm_fd = -1;
@@ -464,7 +464,7 @@ struct shm_handle *ustctl_map_channel(struct lttng_ust_object_data *chan_data)
 }
 
 /* Add stream to channel shm and map its shm into process memory */
-int ustctl_add_stream(struct shm_handle *handle,
+int ustctl_add_stream(struct lttng_ust_shm_handle *handle,
                struct lttng_ust_object_data *stream_data)
 {
        int ret;
@@ -481,7 +481,7 @@ int ustctl_add_stream(struct shm_handle *handle,
                return ret;
        }
        /*
-        * Set to -1 because the shm_handle destruction will take care
+        * Set to -1 because the lttng_ust_shm_handle destruction will take care
         * of closing shm_fd and wait_fd.
         */
        stream_data->shm_fd = -1;
@@ -489,7 +489,7 @@ int ustctl_add_stream(struct shm_handle *handle,
        return 0;
 }
 
-void ustctl_unmap_channel(struct shm_handle *handle)
+void ustctl_unmap_channel(struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan;
 
@@ -497,7 +497,7 @@ void ustctl_unmap_channel(struct shm_handle *handle)
        channel_destroy(chan, handle, 1);
 }
 
-struct lib_ring_buffer *ustctl_open_stream_read(struct shm_handle *handle,
+struct lib_ring_buffer *ustctl_open_stream_read(struct lttng_ust_shm_handle *handle,
        int cpu)
 {
        struct channel *chan = handle->shadow_chan;
@@ -516,7 +516,7 @@ struct lib_ring_buffer *ustctl_open_stream_read(struct shm_handle *handle,
        return buf;
 }
 
-void ustctl_close_stream_read(struct shm_handle *handle,
+void ustctl_close_stream_read(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        lib_ring_buffer_release_read(buf, handle, 1);
@@ -524,14 +524,14 @@ void ustctl_close_stream_read(struct shm_handle *handle,
 
 /* For mmap mode, readable without "get" operation */
 
-void *ustctl_get_mmap_base(struct shm_handle *handle,
+void *ustctl_get_mmap_base(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        return shmp(handle, buf->backend.memory_map);
 }
 
 /* returns the length to mmap. */
-int ustctl_get_mmap_len(struct shm_handle *handle,
+int ustctl_get_mmap_len(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf,
                unsigned long *len)
 {
@@ -550,7 +550,7 @@ int ustctl_get_mmap_len(struct shm_handle *handle,
 }
 
 /* returns the maximum size for sub-buffers. */
-int ustctl_get_max_subbuf_size(struct shm_handle *handle,
+int ustctl_get_max_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf,
                unsigned long *len)
 {
@@ -566,7 +566,7 @@ int ustctl_get_max_subbuf_size(struct shm_handle *handle,
  */
 
 /* returns the offset of the subbuffer belonging to the mmap reader. */
-int ustctl_get_mmap_read_offset(struct shm_handle *handle,
+int ustctl_get_mmap_read_offset(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *off)
 {
        struct channel *chan = handle->shadow_chan;
@@ -581,7 +581,7 @@ int ustctl_get_mmap_read_offset(struct shm_handle *handle,
 }
 
 /* returns the size of the current sub-buffer, without padding (for mmap). */
-int ustctl_get_subbuf_size(struct shm_handle *handle,
+int ustctl_get_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *len)
 {
        struct channel *chan = handle->shadow_chan;
@@ -592,7 +592,7 @@ int ustctl_get_subbuf_size(struct shm_handle *handle,
 }
 
 /* returns the size of the current sub-buffer, without padding (for mmap). */
-int ustctl_get_padded_subbuf_size(struct shm_handle *handle,
+int ustctl_get_padded_subbuf_size(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *len)
 {
        struct channel *chan = handle->shadow_chan;
@@ -604,7 +604,7 @@ int ustctl_get_padded_subbuf_size(struct shm_handle *handle,
 }
 
 /* Get exclusive read access to the next sub-buffer that can be read. */
-int ustctl_get_next_subbuf(struct shm_handle *handle,
+int ustctl_get_next_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        return lib_ring_buffer_get_next_subbuf(buf, handle);
@@ -612,7 +612,7 @@ int ustctl_get_next_subbuf(struct shm_handle *handle,
 
 
 /* Release exclusive sub-buffer access, move consumer forward. */
-int ustctl_put_next_subbuf(struct shm_handle *handle,
+int ustctl_put_next_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        lib_ring_buffer_put_next_subbuf(buf, handle);
@@ -622,7 +622,7 @@ int ustctl_put_next_subbuf(struct shm_handle *handle,
 /* snapshot */
 
 /* Get a snapshot of the current ring buffer producer and consumer positions */
-int ustctl_snapshot(struct shm_handle *handle,
+int ustctl_snapshot(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        return lib_ring_buffer_snapshot(buf, &buf->cons_snapshot,
@@ -630,7 +630,7 @@ int ustctl_snapshot(struct shm_handle *handle,
 }
 
 /* Get the consumer position (iteration start) */
-int ustctl_snapshot_get_consumed(struct shm_handle *handle,
+int ustctl_snapshot_get_consumed(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos)
 {
        *pos = buf->cons_snapshot;
@@ -638,7 +638,7 @@ int ustctl_snapshot_get_consumed(struct shm_handle *handle,
 }
 
 /* Get the producer position (iteration end) */
-int ustctl_snapshot_get_produced(struct shm_handle *handle,
+int ustctl_snapshot_get_produced(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos)
 {
        *pos = buf->prod_snapshot;
@@ -646,21 +646,21 @@ int ustctl_snapshot_get_produced(struct shm_handle *handle,
 }
 
 /* Get exclusive read access to the specified sub-buffer position */
-int ustctl_get_subbuf(struct shm_handle *handle,
+int ustctl_get_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf, unsigned long *pos)
 {
        return lib_ring_buffer_get_subbuf(buf, *pos, handle);
 }
 
 /* Release exclusive sub-buffer access */
-int ustctl_put_subbuf(struct shm_handle *handle,
+int ustctl_put_subbuf(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        lib_ring_buffer_put_subbuf(buf, handle);
        return 0;
 }
 
-int ustctl_buffer_flush(struct shm_handle *handle,
+int ustctl_buffer_flush(struct lttng_ust_shm_handle *handle,
                struct lib_ring_buffer *buf)
 {
        lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE, handle);
index 386b755905a3deb7389887c541368dfa70db487f..23e9ceca4a3d807c49c9abc8ec9eb302d979c29a 100644 (file)
@@ -144,10 +144,10 @@ int close_streams(int sock, struct lttng_ust_object_data *stream_datas, int nr_c
 }
 
 static
-struct shm_handle *map_channel(struct lttng_ust_object_data *chan_data,
+struct lttng_ust_shm_handle *map_channel(struct lttng_ust_object_data *chan_data,
                struct lttng_ust_object_data *stream_datas, int nr_check)
 {
-       struct shm_handle *handle;
+       struct lttng_ust_shm_handle *handle;
        struct channel *chan;
        int k, ret;
 
@@ -188,7 +188,7 @@ error_destroy:
 }
 
 static
-void unmap_channel(struct shm_handle *handle)
+void unmap_channel(struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan;
 
@@ -198,7 +198,7 @@ void unmap_channel(struct shm_handle *handle)
 }
 
 static
-int consume_stream(struct shm_handle *handle, int cpu, char *outfile)
+int consume_stream(struct lttng_ust_shm_handle *handle, int cpu, char *outfile)
 {
        struct channel *chan;
        struct lib_ring_buffer *buf;
@@ -274,7 +274,7 @@ int consume_buffers(const char *outputpath)
        int k, ret;
        mode_t old_umask;
        char pathname[PATH_MAX];
-       struct shm_handle *handle;
+       struct lttng_ust_shm_handle *handle;
 
        snprintf(pathname, PATH_MAX - 1, "%s", outputpath);
        old_umask = umask(0);
index 2869b0e0c13d30f3d75d6900cb4762c2b5f15170..ee5364fc927b0b0fea36756c932c4dd2b73184e8 100644 (file)
@@ -151,10 +151,10 @@ int close_streams(int sock, struct lttng_ust_object_data *stream_datas, int nr_c
 }
 
 static
-struct shm_handle *map_channel(struct lttng_ust_object_data *chan_data,
+struct lttng_ust_shm_handle *map_channel(struct lttng_ust_object_data *chan_data,
                struct lttng_ust_object_data *stream_datas, int nr_check)
 {
-       struct shm_handle *handle;
+       struct lttng_ust_shm_handle *handle;
        struct channel *chan;
        int k, ret;
 
@@ -195,7 +195,7 @@ error_destroy:
 }
 
 static
-void unmap_channel(struct shm_handle *handle)
+void unmap_channel(struct lttng_ust_shm_handle *handle)
 {
        struct channel *chan;
 
@@ -205,7 +205,7 @@ void unmap_channel(struct shm_handle *handle)
 }
 
 static
-int consume_stream(struct shm_handle *handle, int cpu, char *outfile)
+int consume_stream(struct lttng_ust_shm_handle *handle, int cpu, char *outfile)
 {
        struct channel *chan;
        struct lib_ring_buffer *buf;
@@ -283,7 +283,7 @@ int consume_buffers(void)
 
        for (i = 0; i < NR_SESSIONS; i++) {
                char pathname[PATH_MAX];
-               struct shm_handle *handle;
+               struct lttng_ust_shm_handle *handle;
 
                snprintf(pathname, PATH_MAX - 1, "/tmp/testtrace%u", i);
                old_umask = umask(0);
This page took 0.055534 seconds and 4 git commands to generate.