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>
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;
{
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;
}
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)
{
}
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,
};
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
-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
-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
-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 =
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);
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
-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
-void ctf_set_context(struct trace_descriptor *descriptor,
+void ctf_set_context(struct bt_trace_descriptor *descriptor,
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
-int ctf_close_trace(struct trace_descriptor *descriptor);
+int ctf_close_trace(struct bt_trace_descriptor *descriptor);
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
-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
-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
-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;
}
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;
* 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)
{
}
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),
}
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);
}
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;
}
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,
}
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,
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)
*/
#define BT_HIDDEN __attribute__((visibility("hidden")))
-struct trace_descriptor;
+struct bt_trace_descriptor;
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;
};
struct ctf_trace {
- struct trace_descriptor parent;
+ struct bt_trace_descriptor parent;
/* root scope */
struct declaration_scope *root_declaration_scope;
#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 trace_descriptor trace_descriptor;
+ struct bt_trace_descriptor trace_descriptor;
FILE *fp; /* File pointer. NULL if unset. */
int depth;
int dummy; /* disable output */
struct bt_trace_handle;
/* Parent trace descriptor */
-struct trace_descriptor {
+struct bt_trace_descriptor {
};
struct mmap_stream {
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);
- 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);
- 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);
- void (*set_handle)(struct trace_descriptor *descriptor,
+ void (*set_handle)(struct bt_trace_descriptor *descriptor,
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);
- 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);
- 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);
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,
- struct trace_descriptor *td);
+ struct bt_trace_descriptor *td);
#ifdef __cplusplus
}
*/
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 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;
/* 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)
/* 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)
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);
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)
* 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;
}
int bt_trace_collection_remove(struct trace_collection *tc,
- struct trace_descriptor *td)
+ struct bt_trace_descriptor *td)
{
if (!tc || !td)
return -EINVAL;