Rename struct ctf_file_event to struct ctf_stream_event
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:10:32 +0000 (16:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jun 2011 20:10:32 +0000 (16:10 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf-text/ctf-text.c
formats/ctf/ctf.c
include/babeltrace/ctf-ir/metadata.h

index 1500d735c18c437be2fc9c0744498ce9ffd222e8..361c527cce7a90d491a04b08a7d71f706bc19c62 100644 (file)
@@ -99,7 +99,7 @@ int ctf_text_write_event(struct stream_pos *ppos,
        struct ctf_stream_class *stream_class = stream->stream_class;
        int field_nr_saved;
        struct ctf_event *event_class;
        struct ctf_stream_class *stream_class = stream->stream_class;
        int field_nr_saved;
        struct ctf_event *event_class;
-       struct ctf_file_event *event;
+       struct ctf_stream_event *event;
        uint64_t id = 0;
        int ret;
 
        uint64_t id = 0;
        int ret;
 
index a20e6a7599053495f484a51480f9312093764451..b02ef2a23b62949c91f0629e36dce2dc2e0cc7cb 100644 (file)
@@ -119,7 +119,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_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
        struct ctf_stream_class *stream_class = stream->stream_class;
-       struct ctf_file_event *event;
+       struct ctf_stream_event *event;
        uint64_t id = 0;
        int ret;
 
        uint64_t id = 0;
        int ret;
 
@@ -211,7 +211,7 @@ static
 int ctf_write_event(struct stream_pos *pos, struct ctf_stream *stream)
 {
        struct ctf_stream_class *stream_class = stream->stream_class;
 int ctf_write_event(struct stream_pos *pos, struct ctf_stream *stream)
 {
        struct ctf_stream_class *stream_class = stream->stream_class;
-       struct ctf_file_event *event;
+       struct ctf_stream_event *event;
        uint64_t id = 0;
        int ret;
 
        uint64_t id = 0;
        int ret;
 
@@ -647,11 +647,11 @@ end_stream:
 }
 
 static
 }
 
 static
-struct ctf_file_event *create_event_definitions(struct ctf_trace *td,
-                                               struct ctf_stream *stream,
-                                               struct ctf_event *event)
+struct ctf_stream_event *create_event_definitions(struct ctf_trace *td,
+                                                 struct ctf_stream *stream,
+                                                 struct ctf_event *event)
 {
 {
-       struct ctf_file_event *file_event = g_new0(struct ctf_file_event, 1);
+       struct ctf_stream_event *stream_event = g_new0(struct ctf_stream_event, 1);
 
        if (event->context_decl) {
                struct definition *definition =
 
        if (event->context_decl) {
                struct definition *definition =
@@ -660,9 +660,9 @@ struct ctf_file_event *create_event_definitions(struct ctf_trace *td,
                if (!definition) {
                        goto error;
                }
                if (!definition) {
                        goto error;
                }
-               file_event->event_context = container_of(definition,
+               stream_event->event_context = container_of(definition,
                                        struct definition_struct, p);
                                        struct definition_struct, p);
-               stream->parent_def_scope = file_event->event_context->p.scope;
+               stream->parent_def_scope = stream_event->event_context->p.scope;
        }
        if (event->fields_decl) {
                struct definition *definition =
        }
        if (event->fields_decl) {
                struct definition *definition =
@@ -671,17 +671,17 @@ struct ctf_file_event *create_event_definitions(struct ctf_trace *td,
                if (!definition) {
                        goto error;
                }
                if (!definition) {
                        goto error;
                }
-               file_event->event_fields = container_of(definition,
+               stream_event->event_fields = container_of(definition,
                                        struct definition_struct, p);
                                        struct definition_struct, p);
-               stream->parent_def_scope = file_event->event_fields->p.scope;
+               stream->parent_def_scope = stream_event->event_fields->p.scope;
        }
        }
-       return file_event;
+       return stream_event;
 
 error:
 
 error:
-       if (file_event->event_fields)
-               definition_unref(&file_event->event_fields->p);
-       if (file_event->event_context)
-               definition_unref(&file_event->event_context->p);
+       if (stream_event->event_fields)
+               definition_unref(&stream_event->event_fields->p);
+       if (stream_event->event_context)
+               definition_unref(&stream_event->event_context->p);
        return NULL;
 }
 
        return NULL;
 }
 
@@ -737,22 +737,22 @@ int create_stream_definitions(struct ctf_trace *td, struct ctf_stream *stream)
        g_ptr_array_set_size(stream->events_by_id, stream_class->events_by_id->len);
        for (i = 0; i < stream->events_by_id->len; i++) {
                struct ctf_event *event = g_ptr_array_index(stream_class->events_by_id, i);
        g_ptr_array_set_size(stream->events_by_id, stream_class->events_by_id->len);
        for (i = 0; i < stream->events_by_id->len; i++) {
                struct ctf_event *event = g_ptr_array_index(stream_class->events_by_id, i);
-               struct ctf_file_event *file_event;
+               struct ctf_stream_event *stream_event;
 
                if (!event)
                        continue;
 
                if (!event)
                        continue;
-               file_event = create_event_definitions(td, stream, event);
-               if (!file_event)
+               stream_event = create_event_definitions(td, stream, event);
+               if (!stream_event)
                        goto error_event;
                        goto error_event;
-               g_ptr_array_index(stream->events_by_id, i) = file_event;
+               g_ptr_array_index(stream->events_by_id, i) = stream_event;
        }
        return 0;
 
 error_event:
        for (i = 0; i < stream->events_by_id->len; i++) {
        }
        return 0;
 
 error_event:
        for (i = 0; i < stream->events_by_id->len; i++) {
-               struct ctf_file_event *file_event = g_ptr_array_index(stream->events_by_id, i);
-               if (file_event)
-                       g_free(file_event);
+               struct ctf_stream_event *stream_event = g_ptr_array_index(stream->events_by_id, i);
+               if (stream_event)
+                       g_free(stream_event);
        }
        g_ptr_array_free(stream->events_by_id, TRUE);
 error:
        }
        g_ptr_array_free(stream->events_by_id, TRUE);
 error:
index 84725eaa1d3d8eb16e94c30b06e36ffbdd4e20cb..257f4f3352527202cf6532161ab4da2243245246 100644 (file)
@@ -41,12 +41,12 @@ struct ctf_stream {
        struct definition_struct *stream_packet_context;
        struct definition_struct *stream_event_header;
        struct definition_struct *stream_event_context;
        struct definition_struct *stream_packet_context;
        struct definition_struct *stream_event_header;
        struct definition_struct *stream_event_context;
-       GPtrArray *events_by_id;                /* Array of struct ctf_file_event pointers indexed by id */
+       GPtrArray *events_by_id;                /* Array of struct ctf_stream_event pointers indexed by id */
        struct definition_scope *parent_def_scope;      /* for initialization */
        int stream_definitions_created;
 };
 
        struct definition_scope *parent_def_scope;      /* for initialization */
        int stream_definitions_created;
 };
 
-struct ctf_file_event {
+struct ctf_stream_event {
        struct definition_struct *event_context;
        struct definition_struct *event_fields;
 };
        struct definition_struct *event_context;
        struct definition_struct *event_fields;
 };
This page took 0.03974 seconds and 4 git commands to generate.