Namespace the struct trace_descriptor
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 15 Feb 2013 19:20:16 +0000 (14:20 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Feb 2013 19:20:16 +0000 (14:20 -0500)
This struct is exposed in the public API so we need to namespace it.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
15 files changed:
converter/babeltrace.c
formats/bt-dummy/bt-dummy.c
formats/ctf-text/ctf-text.c
formats/ctf/callbacks.c
formats/ctf/ctf.c
formats/ctf/events.c
include/babeltrace/babeltrace-internal.h
include/babeltrace/ctf-ir/metadata.h
include/babeltrace/ctf-text/types.h
include/babeltrace/format.h
include/babeltrace/trace-collection.h
include/babeltrace/trace-handle-internal.h
lib/context.c
lib/iterator.c
lib/trace-collection.c

index b1f32c94b4d097d425e34910c56b1e68728b802c..ef5016ed3a1907f91176ff9ba3ce59e352d7c6e4 100644 (file)
@@ -516,7 +516,7 @@ int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
        return ret;
 }
 
        return ret;
 }
 
-int convert_trace(struct trace_descriptor *td_write,
+int convert_trace(struct bt_trace_descriptor *td_write,
                  struct bt_context *ctx)
 {
        struct bt_ctf_iter *iter;
                  struct bt_context *ctx)
 {
        struct bt_ctf_iter *iter;
@@ -556,7 +556,7 @@ int main(int argc, char **argv)
 {
        int ret, partial_error = 0, open_success = 0;
        struct format *fmt_write;
 {
        int ret, partial_error = 0, open_success = 0;
        struct format *fmt_write;
-       struct trace_descriptor *td_write;
+       struct bt_trace_descriptor *td_write;
        struct bt_context *ctx;
        int i;
 
        struct bt_context *ctx;
        int i;
 
index 537e6bbba1206308feecff945cc61111d57f7904..f0ce913c2a0a88344ea1ad47349810673f1d4a70 100644 (file)
@@ -45,7 +45,7 @@ int bt_dummy_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definitio
 }
 
 static
 }
 
 static
-struct trace_descriptor *bt_dummy_open_trace(const char *path, int flags,
+struct bt_trace_descriptor *bt_dummy_open_trace(const char *path, int flags,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
@@ -58,7 +58,7 @@ struct trace_descriptor *bt_dummy_open_trace(const char *path, int flags,
 }
 
 static
 }
 
 static
-int bt_dummy_close_trace(struct trace_descriptor *td)
+int bt_dummy_close_trace(struct bt_trace_descriptor *td)
 {
        struct ctf_text_stream_pos *pos =
                container_of(td, struct ctf_text_stream_pos,
 {
        struct ctf_text_stream_pos *pos =
                container_of(td, struct ctf_text_stream_pos,
index 1f798b2bc372c522e369f9d2d86e0b66965bcc8b..718865828cb3afaab98bdcc557e7e5a4f6d75d49 100644 (file)
@@ -87,11 +87,11 @@ enum bt_loglevel {
 };
 
 static
 };
 
 static
-struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
+struct bt_trace_descriptor *ctf_text_open_trace(const char *path, int flags,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp);
 static
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp);
 static
-int ctf_text_close_trace(struct trace_descriptor *descriptor);
+int ctf_text_close_trace(struct bt_trace_descriptor *descriptor);
 
 static
 rw_dispatch write_dispatch_table[] = {
 
 static
 rw_dispatch write_dispatch_table[] = {
@@ -555,7 +555,7 @@ error:
 }
 
 static
 }
 
 static
-struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
+struct bt_trace_descriptor *ctf_text_open_trace(const char *path, int flags,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
@@ -592,7 +592,7 @@ error:
 }
 
 static
 }
 
 static
-int ctf_text_close_trace(struct trace_descriptor *td)
+int ctf_text_close_trace(struct bt_trace_descriptor *td)
 {
        int ret;
        struct ctf_text_stream_pos *pos =
 {
        int ret;
        struct ctf_text_stream_pos *pos =
index 793f3d3874e039b30afbe16684a0e27968540450..3595532d5a05b4234777f5865c44e300b66b4ed0 100644 (file)
@@ -89,7 +89,7 @@ int bt_ctf_iter_add_callback(struct bt_ctf_iter *iter,
        tc = iter->parent.ctx->tc;
        for (i = 0; i < tc->array->len; i++) {
                struct ctf_trace *tin;
        tc = iter->parent.ctx->tc;
        for (i = 0; i < tc->array->len; i++) {
                struct ctf_trace *tin;
-               struct trace_descriptor *td_read;
+               struct bt_trace_descriptor *td_read;
 
                td_read = g_ptr_array_index(tc->array, i);
                tin = container_of(td_read, struct ctf_trace, parent);
 
                td_read = g_ptr_array_index(tc->array, i);
                tin = container_of(td_read, struct ctf_trace, parent);
index c6b148cc1cc99b0889c4f3e8ef70bfe9fdaf23f9..2411f7ff43e4afc3ede991396949d3d06a724e85 100644 (file)
@@ -76,33 +76,33 @@ uint64_t opt_clock_offset;
 extern int yydebug;
 
 static
 extern int yydebug;
 
 static
-struct trace_descriptor *ctf_open_trace(const char *path, int flags,
+struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
-struct trace_descriptor *ctf_open_mmap_trace(
+struct bt_trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
                struct mmap_stream_list *mmap_list,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
-void ctf_set_context(struct trace_descriptor *descriptor,
+void ctf_set_context(struct bt_trace_descriptor *descriptor,
                struct bt_context *ctx);
 static
                struct bt_context *ctx);
 static
-void ctf_set_handle(struct trace_descriptor *descriptor,
+void ctf_set_handle(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle);
 
 static
                struct bt_trace_handle *handle);
 
 static
-int ctf_close_trace(struct trace_descriptor *descriptor);
+int ctf_close_trace(struct bt_trace_descriptor *descriptor);
 static
 static
-uint64_t ctf_timestamp_begin(struct trace_descriptor *descriptor,
+uint64_t ctf_timestamp_begin(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle, enum bt_clock_type type);
 static
                struct bt_trace_handle *handle, enum bt_clock_type type);
 static
-uint64_t ctf_timestamp_end(struct trace_descriptor *descriptor,
+uint64_t ctf_timestamp_end(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle, enum bt_clock_type type);
 static
                struct bt_trace_handle *handle, enum bt_clock_type type);
 static
-int ctf_convert_index_timestamp(struct trace_descriptor *tdp);
+int ctf_convert_index_timestamp(struct bt_trace_descriptor *tdp);
 
 static
 rw_dispatch read_dispatch_table[] = {
 
 static
 rw_dispatch read_dispatch_table[] = {
@@ -141,7 +141,7 @@ struct format ctf_format = {
 };
 
 static
 };
 
 static
-uint64_t ctf_timestamp_begin(struct trace_descriptor *descriptor,
+uint64_t ctf_timestamp_begin(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle, enum bt_clock_type type)
 {
        struct ctf_trace *tin;
                struct bt_trace_handle *handle, enum bt_clock_type type)
 {
        struct ctf_trace *tin;
@@ -202,7 +202,7 @@ error:
 }
 
 static
 }
 
 static
-uint64_t ctf_timestamp_end(struct trace_descriptor *descriptor,
+uint64_t ctf_timestamp_end(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle, enum bt_clock_type type)
 {
        struct ctf_trace *tin;
                struct bt_trace_handle *handle, enum bt_clock_type type)
 {
        struct ctf_trace *tin;
@@ -1695,7 +1695,7 @@ error:
  * since the index creation read it entirely.
  */
 static
  * since the index creation read it entirely.
  */
 static
-struct trace_descriptor *ctf_open_trace(const char *path, int flags,
+struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
@@ -1859,7 +1859,7 @@ error:
 }
 
 static
 }
 
 static
-struct trace_descriptor *ctf_open_mmap_trace(
+struct bt_trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                struct mmap_stream_list *mmap_list,
                void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
@@ -1891,7 +1891,7 @@ error:
 }
 
 static
 }
 
 static
-int ctf_convert_index_timestamp(struct trace_descriptor *tdp)
+int ctf_convert_index_timestamp(struct bt_trace_descriptor *tdp)
 {
        int i, j, k;
        struct ctf_trace *td = container_of(tdp, struct ctf_trace, parent);
 {
        int i, j, k;
        struct ctf_trace *td = container_of(tdp, struct ctf_trace, parent);
@@ -1959,7 +1959,7 @@ int ctf_close_file_stream(struct ctf_file_stream *file_stream)
 }
 
 static
 }
 
 static
-int ctf_close_trace(struct trace_descriptor *tdp)
+int ctf_close_trace(struct bt_trace_descriptor *tdp)
 {
        struct ctf_trace *td = container_of(tdp, struct ctf_trace, parent);
        int ret;
 {
        struct ctf_trace *td = container_of(tdp, struct ctf_trace, parent);
        int ret;
@@ -2000,7 +2000,7 @@ int ctf_close_trace(struct trace_descriptor *tdp)
 }
 
 static
 }
 
 static
-void ctf_set_context(struct trace_descriptor *descriptor,
+void ctf_set_context(struct bt_trace_descriptor *descriptor,
                struct bt_context *ctx)
 {
        struct ctf_trace *td = container_of(descriptor, struct ctf_trace,
                struct bt_context *ctx)
 {
        struct ctf_trace *td = container_of(descriptor, struct ctf_trace,
@@ -2010,7 +2010,7 @@ void ctf_set_context(struct trace_descriptor *descriptor,
 }
 
 static
 }
 
 static
-void ctf_set_handle(struct trace_descriptor *descriptor,
+void ctf_set_handle(struct bt_trace_descriptor *descriptor,
                struct bt_trace_handle *handle)
 {
        struct ctf_trace *td = container_of(descriptor, struct ctf_trace,
                struct bt_trace_handle *handle)
 {
        struct ctf_trace *td = container_of(descriptor, struct ctf_trace,
index ff0fcb302864dbb520daa01285b5facebab1bade..d9460b169e98e68ebb0c0f6a9630b4f563f4d522 100644 (file)
@@ -613,7 +613,7 @@ int bt_ctf_get_event_decl_list(int handle_id, struct bt_context *ctx,
                unsigned int *count)
 {
        struct bt_trace_handle *handle;
                unsigned int *count)
 {
        struct bt_trace_handle *handle;
-       struct trace_descriptor *td;
+       struct bt_trace_descriptor *td;
        struct ctf_trace *tin;
 
        if (!ctx || !list || !count)
        struct ctf_trace *tin;
 
        if (!ctx || !list || !count)
index 6b6fcecfbb3bd24d67066f98824e4fe8085ad68c..6219b3a22eb0e41fe6a3a8496502df83610f2f97 100644 (file)
@@ -50,9 +50,9 @@ extern int babeltrace_verbose, babeltrace_debug;
  */
 #define BT_HIDDEN __attribute__((visibility("hidden")))
 
  */
 #define BT_HIDDEN __attribute__((visibility("hidden")))
 
-struct trace_descriptor;
+struct bt_trace_descriptor;
 struct trace_collection {
 struct trace_collection {
-       GPtrArray *array;       /* struct trace_descriptor */
+       GPtrArray *array;       /* struct bt_trace_descriptor */
        GHashTable *clocks;     /* struct ctf_clock */
 
        uint64_t single_clock_offset_avg;
        GHashTable *clocks;     /* struct ctf_clock */
 
        uint64_t single_clock_offset_avg;
index b209993d984979f90bbc870b0602b3d2c998cd45..04e894512702fb110b7f900573c9524255d6f3a9 100644 (file)
@@ -174,7 +174,7 @@ struct ctf_tracer_env {
 };
 
 struct ctf_trace {
 };
 
 struct ctf_trace {
-       struct trace_descriptor parent;
+       struct bt_trace_descriptor parent;
        /* root scope */
        struct declaration_scope *root_declaration_scope;
 
        /* root scope */
        struct declaration_scope *root_declaration_scope;
 
index 8681f39d64b64cee3f0ab72dbcb3b7bc675206db..15c833332838eafcbcbaed72806a69733d6424c4 100644 (file)
 #include <babeltrace/format.h>
 
 /*
 #include <babeltrace/format.h>
 
 /*
- * Inherit from both struct bt_stream_pos and struct trace_descriptor.
+ * Inherit from both struct bt_stream_pos and struct bt_trace_descriptor.
  */
 struct ctf_text_stream_pos {
        struct bt_stream_pos parent;
  */
 struct ctf_text_stream_pos {
        struct bt_stream_pos parent;
-       struct trace_descriptor trace_descriptor;
+       struct bt_trace_descriptor trace_descriptor;
        FILE *fp;               /* File pointer. NULL if unset. */
        int depth;
        int dummy;              /* disable output */
        FILE *fp;               /* File pointer. NULL if unset. */
        int depth;
        int dummy;              /* disable output */
index fa0e3251ad839973685816ede43a0183b6664289..d0f9378e5dfce942c785858345b2bd298e47c060 100644 (file)
@@ -46,7 +46,7 @@ struct bt_context;
 struct bt_trace_handle;
 
 /* Parent trace descriptor */
 struct bt_trace_handle;
 
 /* Parent trace descriptor */
-struct trace_descriptor {
+struct bt_trace_descriptor {
 };
 
 struct mmap_stream {
 };
 
 struct mmap_stream {
@@ -61,25 +61,25 @@ struct mmap_stream_list {
 struct format {
        bt_intern_str name;
 
 struct format {
        bt_intern_str name;
 
-       struct trace_descriptor *(*open_trace)(const char *path, int flags,
+       struct bt_trace_descriptor *(*open_trace)(const char *path, int flags,
                        void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
                        void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
-       struct trace_descriptor *(*open_mmap_trace)(
+       struct bt_trace_descriptor *(*open_mmap_trace)(
                        struct mmap_stream_list *mmap_list,
                        void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
                        struct mmap_stream_list *mmap_list,
                        void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
-       int (*close_trace)(struct trace_descriptor *descriptor);
-       void (*set_context)(struct trace_descriptor *descriptor,
+       int (*close_trace)(struct bt_trace_descriptor *descriptor);
+       void (*set_context)(struct bt_trace_descriptor *descriptor,
                        struct bt_context *ctx);
                        struct bt_context *ctx);
-       void (*set_handle)(struct trace_descriptor *descriptor,
+       void (*set_handle)(struct bt_trace_descriptor *descriptor,
                        struct bt_trace_handle *handle);
                        struct bt_trace_handle *handle);
-       uint64_t (*timestamp_begin)(struct trace_descriptor *descriptor,
+       uint64_t (*timestamp_begin)(struct bt_trace_descriptor *descriptor,
                        struct bt_trace_handle *handle, enum bt_clock_type type);
                        struct bt_trace_handle *handle, enum bt_clock_type type);
-       uint64_t (*timestamp_end)(struct trace_descriptor *descriptor,
+       uint64_t (*timestamp_end)(struct bt_trace_descriptor *descriptor,
                        struct bt_trace_handle *handle, enum bt_clock_type type);
                        struct bt_trace_handle *handle, enum bt_clock_type type);
-       int (*convert_index_timestamp)(struct trace_descriptor *descriptor);
+       int (*convert_index_timestamp)(struct bt_trace_descriptor *descriptor);
 };
 
 extern struct format *bt_lookup_format(bt_intern_str qname);
 };
 
 extern struct format *bt_lookup_format(bt_intern_str qname);
index e65654f86f7cb152b6911808c76e286b29d45ed1..904a7d8594e290280a84dfd249e102ee63eda6c2 100644 (file)
@@ -38,9 +38,9 @@ struct trace_collection;
 void bt_init_trace_collection(struct trace_collection *tc);
 void bt_finalize_trace_collection(struct trace_collection *tc);
 int bt_trace_collection_add(struct trace_collection *tc,
 void bt_init_trace_collection(struct trace_collection *tc);
 void bt_finalize_trace_collection(struct trace_collection *tc);
 int bt_trace_collection_add(struct trace_collection *tc,
-                        struct trace_descriptor *td);
+                        struct bt_trace_descriptor *td);
 int bt_trace_collection_remove(struct trace_collection *tc,
 int bt_trace_collection_remove(struct trace_collection *tc,
-                        struct trace_descriptor *td);
+                        struct bt_trace_descriptor *td);
 
 #ifdef __cplusplus
 }
 
 #ifdef __cplusplus
 }
index 2b5a5ae198e75163458c0f696184c92e11b9f23d..f7e2b8a89d98c20899c699613a05735ed6996959 100644 (file)
@@ -43,7 +43,7 @@
  */
 struct bt_trace_handle {
        int id;
  */
 struct bt_trace_handle {
        int id;
-       struct trace_descriptor *td;
+       struct bt_trace_descriptor *td;
        struct format *format;
        char path[PATH_MAX];
        uint64_t real_timestamp_begin;
        struct format *format;
        char path[PATH_MAX];
        uint64_t real_timestamp_begin;
index 18e2e22c7891011229412e613b93828eccf1c904..e6b60fa686fb95f2ac5f14fabd29ae423197d3c6 100644 (file)
@@ -72,7 +72,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
                struct mmap_stream_list *stream_list,
                FILE *metadata)
 {
                struct mmap_stream_list *stream_list,
                FILE *metadata)
 {
-       struct trace_descriptor *td;
+       struct bt_trace_descriptor *td;
        struct format *fmt;
        struct bt_trace_handle *handle;
        int ret, closeret;
        struct format *fmt;
        struct bt_trace_handle *handle;
        int ret, closeret;
index dc12a2f41020d34fa4903bc61494bddb092e53c7..4190e65286d914021133ea110e936a27ce51c208 100644 (file)
@@ -309,7 +309,7 @@ static int seek_last_ctf_trace_collection(struct trace_collection *tc,
        /* For each trace in the trace_collection */
        for (i = 0; i < tc->array->len; i++) {
                struct ctf_trace *tin;
        /* For each trace in the trace_collection */
        for (i = 0; i < tc->array->len; i++) {
                struct ctf_trace *tin;
-               struct trace_descriptor *td_read;
+               struct bt_trace_descriptor *td_read;
 
                td_read = g_ptr_array_index(tc->array, i);
                if (!td_read)
 
                td_read = g_ptr_array_index(tc->array, i);
                if (!td_read)
@@ -421,7 +421,7 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
                /* for each trace in the trace_collection */
                for (i = 0; i < tc->array->len; i++) {
                        struct ctf_trace *tin;
                /* for each trace in the trace_collection */
                for (i = 0; i < tc->array->len; i++) {
                        struct ctf_trace *tin;
-                       struct trace_descriptor *td_read;
+                       struct bt_trace_descriptor *td_read;
 
                        td_read = g_ptr_array_index(tc->array, i);
                        if (!td_read)
 
                        td_read = g_ptr_array_index(tc->array, i);
                        if (!td_read)
@@ -451,7 +451,7 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos)
 
                for (i = 0; i < tc->array->len; i++) {
                        struct ctf_trace *tin;
 
                for (i = 0; i < tc->array->len; i++) {
                        struct ctf_trace *tin;
-                       struct trace_descriptor *td_read;
+                       struct bt_trace_descriptor *td_read;
                        int stream_id;
 
                        td_read = g_ptr_array_index(tc->array, i);
                        int stream_id;
 
                        td_read = g_ptr_array_index(tc->array, i);
@@ -675,7 +675,7 @@ int bt_iter_init(struct bt_iter *iter,
 
        for (i = 0; i < ctx->tc->array->len; i++) {
                struct ctf_trace *tin;
 
        for (i = 0; i < ctx->tc->array->len; i++) {
                struct ctf_trace *tin;
-               struct trace_descriptor *td_read;
+               struct bt_trace_descriptor *td_read;
 
                td_read = g_ptr_array_index(ctx->tc->array, i);
                if (!td_read)
 
                td_read = g_ptr_array_index(ctx->tc->array, i);
                if (!td_read)
index fc06dcd961c36aa3af3d723dae8fd85d20dfbfda..608a6e458093f7f751a0807112f1c0b7ffa98c00 100644 (file)
@@ -156,7 +156,7 @@ static void clock_add(gpointer key, gpointer value, gpointer user_data)
  * convert the index from cycles to real time.
  */
 int bt_trace_collection_add(struct trace_collection *tc,
  * convert the index from cycles to real time.
  */
 int bt_trace_collection_add(struct trace_collection *tc,
-                               struct trace_descriptor *td)
+                               struct bt_trace_descriptor *td)
 {
        struct ctf_trace *trace;
 
 {
        struct ctf_trace *trace;
 
@@ -209,7 +209,7 @@ error:
 }
 
 int bt_trace_collection_remove(struct trace_collection *tc,
 }
 
 int bt_trace_collection_remove(struct trace_collection *tc,
-                           struct trace_descriptor *td)
+                           struct bt_trace_descriptor *td)
 {
        if (!tc || !td)
                return -EINVAL;
 {
        if (!tc || !td)
                return -EINVAL;
This page took 0.034383 seconds and 4 git commands to generate.