From: Julien Desfossez Date: Fri, 30 Mar 2012 19:47:13 +0000 (-0400) Subject: Rename ctf_stream_class to ctf_stream_declaration X-Git-Tag: v1.0.0-rc1~21 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=f380e105704874a3b1fc065122ca286397e3f83c Rename ctf_stream_class to ctf_stream_declaration Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index 273c9b72..8aeae362 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -216,7 +216,7 @@ int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream *stream) { struct ctf_text_stream_pos *pos = container_of(ppos, struct ctf_text_stream_pos, parent); - struct ctf_stream_class *stream_class = stream->stream_class; + struct ctf_stream_declaration *stream_class = stream->stream_class; int field_nr_saved; struct ctf_event *event_class; struct ctf_stream_event *event; diff --git a/formats/ctf/callbacks.c b/formats/ctf/callbacks.c index e9dbba96..ea41344a 100644 --- a/formats/ctf/callbacks.c +++ b/formats/ctf/callbacks.c @@ -83,7 +83,7 @@ int bt_ctf_iter_add_callback(struct bt_ctf_iter *iter, tin = container_of(td_read, struct ctf_trace, parent); for (stream_id = 0; stream_id < tin->streams->len; stream_id++) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; struct bt_stream_callbacks *bt_stream_cb = NULL; struct bt_callback_chain *bt_chain = NULL; struct bt_callback new_callback; @@ -148,7 +148,7 @@ int bt_ctf_iter_add_callback(struct bt_ctf_iter *iter, static struct ctf_stream_event *extract_ctf_stream_event(struct ctf_stream *stream) { - struct ctf_stream_class *stream_class = stream->stream_class; + struct ctf_stream_declaration *stream_class = stream->stream_class; struct ctf_event *event_class; struct ctf_stream_event *event; uint64_t id = stream->event_id; diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 2965f496..494ba990 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -225,7 +225,7 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream *stream) { struct ctf_stream_pos *pos = container_of(ppos, struct ctf_stream_pos, parent); - struct ctf_stream_class *stream_class = stream->stream_class; + struct ctf_stream_declaration *stream_class = stream->stream_class; struct ctf_stream_event *event; uint64_t id = 0; int ret; @@ -337,7 +337,7 @@ error: static int ctf_write_event(struct stream_pos *pos, struct ctf_stream *stream) { - struct ctf_stream_class *stream_class = stream->stream_class; + struct ctf_stream_declaration *stream_class = stream->stream_class; struct ctf_stream_event *event; uint64_t id; int ret; @@ -939,7 +939,7 @@ error: static int create_stream_definitions(struct ctf_trace *td, struct ctf_stream *stream) { - struct ctf_stream_class *stream_class; + struct ctf_stream_declaration *stream_class; int ret; int i; @@ -1021,7 +1021,7 @@ static int create_stream_packet_index(struct ctf_trace *td, struct ctf_file_stream *file_stream) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; int len_index; struct ctf_stream_pos *pos; struct stat filestats; @@ -1462,7 +1462,7 @@ static int prepare_mmap_stream_definition(struct ctf_trace *td, struct ctf_file_stream *file_stream) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; uint64_t stream_id = 0; int ret; @@ -1601,7 +1601,7 @@ void ctf_close_trace(struct trace_descriptor *tdp) if (td->streams) { for (i = 0; i < td->streams->len; i++) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; int j; stream = g_ptr_array_index(td->streams, i); diff --git a/formats/ctf/events.c b/formats/ctf/events.c index 15882eef..5b881113 100644 --- a/formats/ctf/events.c +++ b/formats/ctf/events.c @@ -141,7 +141,7 @@ const struct definition *bt_ctf_get_index(const struct bt_ctf_event *event, const char *bt_ctf_event_name(const struct bt_ctf_event *event) { struct ctf_event *event_class; - struct ctf_stream_class *stream_class; + struct ctf_stream_declaration *stream_class; if (!event) return NULL; diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c index 119114c0..9c381c5f 100644 --- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c +++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c @@ -240,7 +240,7 @@ int get_unary_uuid(struct bt_list_head *head, unsigned char *uuid) } static -struct ctf_stream_class *trace_stream_lookup(struct ctf_trace *trace, uint64_t stream_id) +struct ctf_stream_declaration *trace_stream_lookup(struct ctf_trace *trace, uint64_t stream_id) { if (trace->streams->len <= stream_id) return NULL; @@ -1801,7 +1801,7 @@ error: static -int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_stream_class *stream, struct ctf_trace *trace) +int ctf_stream_declaration_visit(FILE *fd, int depth, struct ctf_node *node, struct ctf_stream_declaration *stream, struct ctf_trace *trace) { int ret = 0; @@ -1927,9 +1927,9 @@ int ctf_stream_visit(FILE *fd, int depth, struct ctf_node *node, { int ret = 0; struct ctf_node *iter; - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; - stream = g_new0(struct ctf_stream_class, 1); + stream = g_new0(struct ctf_stream_declaration, 1); stream->declaration_scope = new_declaration_scope(parent_declaration_scope); stream->events_by_id = g_ptr_array_new(); stream->event_quark_to_id = g_hash_table_new(g_direct_hash, g_direct_equal); diff --git a/include/babeltrace/ctf-ir/metadata.h b/include/babeltrace/ctf-ir/metadata.h index 024b50f1..75697396 100644 --- a/include/babeltrace/ctf-ir/metadata.h +++ b/include/babeltrace/ctf-ir/metadata.h @@ -29,14 +29,14 @@ #include struct ctf_trace; -struct ctf_stream_class; +struct ctf_stream_declaration; struct ctf_stream; struct ctf_event; struct ctf_stream; struct ctf_clock; struct ctf_stream { - struct ctf_stream_class *stream_class; + struct ctf_stream_declaration *stream_class; uint64_t timestamp; /* Current timestamp, in ns */ uint64_t event_id; /* Current event ID */ int has_timestamp; @@ -136,7 +136,7 @@ struct ctf_trace { struct declaration_scope *declaration_scope; /* innermost definition scope. to be used as parent of stream. */ struct definition_scope *definition_scope; - GPtrArray *streams; /* Array of struct ctf_stream_class pointers */ + GPtrArray *streams; /* Array of struct ctf_stream_declaration pointers */ struct ctf_stream *metadata; GHashTable *clocks; struct ctf_clock *single_clock; /* currently supports only one clock */ @@ -185,7 +185,7 @@ struct ctf_trace { (ctf_stream)->(field); \ }) -struct ctf_stream_class { +struct ctf_stream_declaration { struct ctf_trace *trace; /* parent is lexical scope conaining the stream scope */ struct declaration_scope *declaration_scope; @@ -223,7 +223,7 @@ struct ctf_stream_class { struct ctf_event { /* stream mapped by stream_id */ - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; /* parent is lexical scope conaining the event scope */ struct declaration_scope *declaration_scope; diff --git a/lib/iterator.c b/lib/iterator.c index 2527f89f..1658a723 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -144,7 +144,7 @@ static int seek_ctf_trace_by_timestamp(struct ctf_trace *tin, /* for each stream_class */ for (i = 0; i < tin->streams->len; i++) { - struct ctf_stream_class *stream_class; + struct ctf_stream_declaration *stream_class; stream_class = g_ptr_array_index(tin->streams, i); /* for each file_stream */ @@ -264,7 +264,7 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos) /* Populate heap with each stream */ for (stream_id = 0; stream_id < tin->streams->len; stream_id++) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; int filenr; stream = g_ptr_array_index(tin->streams, @@ -325,7 +325,7 @@ struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter) for (stream_class_id = 0; stream_class_id < tin->streams->len; stream_class_id++) { - struct ctf_stream_class *stream_class; + struct ctf_stream_declaration *stream_class; stream_class = g_ptr_array_index(tin->streams, stream_class_id); @@ -444,7 +444,7 @@ int bt_iter_seek(struct bt_iter *iter, /* Populate heap with each stream */ for (stream_id = 0; stream_id < tin->streams->len; stream_id++) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; int filenr; stream = g_ptr_array_index(tin->streams, stream_id); @@ -497,7 +497,7 @@ int bt_iter_init(struct bt_iter *iter, /* Populate heap with each stream */ for (stream_id = 0; stream_id < tin->streams->len; stream_id++) { - struct ctf_stream_class *stream; + struct ctf_stream_declaration *stream; int filenr; stream = g_ptr_array_index(tin->streams, stream_id);