X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=65b4cf7643518b3b4362c8c314a0c43803bec837;hp=22a55e64b50c813fa02827a31cf5c322075cd784;hb=d3ded99df05c7602749aa50530a1dc69db4cc066;hpb=c716f83b53677d5f2e6a15463408f464006eafb7 diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 22a55e64..65b4cf76 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -125,7 +125,7 @@ struct format ctf_format = { * Update stream current timestamp, keep at clock frequency. */ static -void ctf_update_timestamp(struct ctf_stream *stream, +void ctf_update_timestamp(struct ctf_stream_definition *stream, struct definition_integer *integer_definition) { struct declaration_integer *integer_declaration = @@ -156,7 +156,7 @@ void ctf_update_timestamp(struct ctf_stream *stream, * applying offsets as needed (unix time). */ void ctf_print_timestamp(FILE *fp, - struct ctf_stream *stream, + struct ctf_stream_definition *stream, uint64_t timestamp) { uint64_t ts_sec = 0, ts_nsec; @@ -221,7 +221,7 @@ end: } static -int ctf_read_event(struct stream_pos *ppos, struct ctf_stream *stream) +int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream) { struct ctf_stream_pos *pos = container_of(ppos, struct ctf_stream_pos, parent); @@ -335,7 +335,7 @@ error: } static -int ctf_write_event(struct stream_pos *pos, struct ctf_stream *stream) +int ctf_write_event(struct stream_pos *pos, struct ctf_stream_definition *stream) { struct ctf_stream_declaration *stream_class = stream->stream_class; struct ctf_event_definition *event; @@ -899,8 +899,8 @@ end_stream: static struct ctf_event_definition *create_event_definitions(struct ctf_trace *td, - struct ctf_stream *stream, - struct ctf_event *event) + struct ctf_stream_definition *stream, + struct ctf_event_declaration *event) { struct ctf_event_definition *stream_event = g_new0(struct ctf_event_definition, 1); @@ -926,6 +926,7 @@ struct ctf_event_definition *create_event_definitions(struct ctf_trace *td, struct definition_struct, p); stream->parent_def_scope = stream_event->event_fields->p.scope; } + stream_event->stream = stream; return stream_event; error: @@ -937,7 +938,7 @@ error: } static -int create_stream_definitions(struct ctf_trace *td, struct ctf_stream *stream) +int create_stream_definitions(struct ctf_trace *td, struct ctf_stream_definition *stream) { struct ctf_stream_declaration *stream_class; int ret; @@ -987,7 +988,7 @@ int create_stream_definitions(struct ctf_trace *td, struct ctf_stream *stream) stream->events_by_id = g_ptr_array_new(); 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_event_declaration *event = g_ptr_array_index(stream_class->events_by_id, i); struct ctf_event_definition *stream_event; if (!event) @@ -1236,7 +1237,7 @@ int create_stream_packet_index(struct ctf_trace *td, } static -int create_trace_definitions(struct ctf_trace *td, struct ctf_stream *stream) +int create_trace_definitions(struct ctf_trace *td, struct ctf_stream_definition *stream) { int ret;