From 9e88d150c4119a0c6d6288cad6d6db87df7bac4b Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Fri, 30 Mar 2012 15:48:00 -0400 Subject: [PATCH] Rename ctf_stream to ctf_stream_definition Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- formats/bt-dummy/bt-dummy.c | 2 +- formats/ctf-text/ctf-text.c | 2 +- formats/ctf/callbacks.c | 4 ++-- formats/ctf/ctf.c | 14 +++++++------- formats/ctf/events-private.h | 4 ++-- include/babeltrace/ctf-ir/metadata.h | 10 +++++----- include/babeltrace/ctf/callbacks-internal.h | 2 +- include/babeltrace/ctf/events-internal.h | 4 ++-- include/babeltrace/ctf/metadata.h | 2 +- include/babeltrace/ctf/types.h | 2 +- include/babeltrace/types.h | 4 ++-- lib/iterator.c | 6 +++--- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/formats/bt-dummy/bt-dummy.c b/formats/bt-dummy/bt-dummy.c index 5f7a1a5a..2e94421f 100644 --- a/formats/bt-dummy/bt-dummy.c +++ b/formats/bt-dummy/bt-dummy.c @@ -31,7 +31,7 @@ #include static -int bt_dummy_write_event(struct stream_pos *ppos, struct ctf_stream *stream) +int bt_dummy_write_event(struct stream_pos *ppos, struct ctf_stream_definition *stream) { return 0; } diff --git a/formats/ctf-text/ctf-text.c b/formats/ctf-text/ctf-text.c index a4316e8f..aa07b7ca 100644 --- a/formats/ctf-text/ctf-text.c +++ b/formats/ctf-text/ctf-text.c @@ -211,7 +211,7 @@ const char *print_loglevel(int value) } static -int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream *stream) +int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream_definition *stream) { struct ctf_text_stream_pos *pos = diff --git a/formats/ctf/callbacks.c b/formats/ctf/callbacks.c index 6130911f..e27a6a3d 100644 --- a/formats/ctf/callbacks.c +++ b/formats/ctf/callbacks.c @@ -146,7 +146,7 @@ int bt_ctf_iter_add_callback(struct bt_ctf_iter *iter, } static -struct ctf_event_definition *extract_ctf_stream_event(struct ctf_stream *stream) +struct ctf_event_definition *extract_ctf_stream_event(struct ctf_stream_definition *stream) { struct ctf_stream_declaration *stream_class = stream->stream_class; struct ctf_event *event_class; @@ -172,7 +172,7 @@ struct ctf_event_definition *extract_ctf_stream_event(struct ctf_stream *stream) } void process_callbacks(struct bt_ctf_iter *iter, - struct ctf_stream *stream) + struct ctf_stream_definition *stream) { struct bt_stream_callbacks *bt_stream_cb; struct bt_callback_chain *bt_chain; diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 22a55e64..22051f18 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,7 +899,7 @@ end_stream: static struct ctf_event_definition *create_event_definitions(struct ctf_trace *td, - struct ctf_stream *stream, + struct ctf_stream_definition *stream, struct ctf_event *event) { struct ctf_event_definition *stream_event = g_new0(struct ctf_event_definition, 1); @@ -937,7 +937,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; @@ -1236,7 +1236,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; diff --git a/formats/ctf/events-private.h b/formats/ctf/events-private.h index bc1dfbd9..4ea19be5 100644 --- a/formats/ctf/events-private.h +++ b/formats/ctf/events-private.h @@ -26,7 +26,7 @@ #include static inline -uint64_t ctf_get_timestamp_raw(struct ctf_stream *stream, +uint64_t ctf_get_timestamp_raw(struct ctf_stream_definition *stream, uint64_t timestamp) { uint64_t ts_nsec; @@ -41,7 +41,7 @@ uint64_t ctf_get_timestamp_raw(struct ctf_stream *stream, } static inline -uint64_t ctf_get_timestamp(struct ctf_stream *stream, +uint64_t ctf_get_timestamp(struct ctf_stream_definition *stream, uint64_t timestamp) { uint64_t ts_nsec; diff --git a/include/babeltrace/ctf-ir/metadata.h b/include/babeltrace/ctf-ir/metadata.h index f3e7b68c..fb78439b 100644 --- a/include/babeltrace/ctf-ir/metadata.h +++ b/include/babeltrace/ctf-ir/metadata.h @@ -30,12 +30,12 @@ struct ctf_trace; struct ctf_stream_declaration; -struct ctf_stream; +struct ctf_stream_definition; struct ctf_event; -struct ctf_stream; +struct ctf_stream_definition; struct ctf_clock; -struct ctf_stream { +struct ctf_stream_definition { struct ctf_stream_declaration *stream_class; uint64_t timestamp; /* Current timestamp, in ns */ uint64_t event_id; /* Current event ID */ @@ -137,7 +137,7 @@ struct ctf_trace { /* innermost definition scope. to be used as parent of stream. */ struct definition_scope *definition_scope; GPtrArray *streams; /* Array of struct ctf_stream_declaration pointers */ - struct ctf_stream *metadata; + struct ctf_stream_definition *metadata; GHashTable *clocks; struct ctf_clock *single_clock; /* currently supports only one clock */ struct trace_collection *collection; /* Container of this trace */ @@ -204,7 +204,7 @@ struct ctf_stream_declaration { CTF_STREAM_stream_id = (1 << 0), } field_mask; - GPtrArray *streams; /* Array of struct ctf_stream pointers */ + GPtrArray *streams; /* Array of struct ctf_stream_definition pointers */ }; #define CTF_EVENT_SET_FIELD(ctf_event, field) \ diff --git a/include/babeltrace/ctf/callbacks-internal.h b/include/babeltrace/ctf/callbacks-internal.h index 611851ae..b76f82e1 100644 --- a/include/babeltrace/ctf/callbacks-internal.h +++ b/include/babeltrace/ctf/callbacks-internal.h @@ -52,6 +52,6 @@ struct bt_dependencies { int refcount; /* free when decremented to 0 */ }; -void process_callbacks(struct bt_ctf_iter *iter, struct ctf_stream *stream); +void process_callbacks(struct bt_ctf_iter *iter, struct ctf_stream_definition *stream); #endif /* _BABELTRACE_CALLBACKS_INTERNAL_H */ diff --git a/include/babeltrace/ctf/events-internal.h b/include/babeltrace/ctf/events-internal.h index c3ee8fcd..2ff37545 100644 --- a/include/babeltrace/ctf/events-internal.h +++ b/include/babeltrace/ctf/events-internal.h @@ -28,13 +28,13 @@ #include #include -struct ctf_stream; +struct ctf_stream_definition; struct ctf_event_definition; /* * the structure to manipulate events */ struct bt_ctf_event { - struct ctf_stream *stream; + struct ctf_stream_definition *stream; struct ctf_event_definition *event; }; diff --git a/include/babeltrace/ctf/metadata.h b/include/babeltrace/ctf/metadata.h index 82b01708..5262f44a 100644 --- a/include/babeltrace/ctf/metadata.h +++ b/include/babeltrace/ctf/metadata.h @@ -34,7 +34,7 @@ #define TSDL_MAGIC 0x75D11D57 struct ctf_file_stream { - struct ctf_stream parent; + struct ctf_stream_definition parent; struct ctf_stream_pos pos; /* current stream position */ }; diff --git a/include/babeltrace/ctf/types.h b/include/babeltrace/ctf/types.h index faa653ea..9e429bd3 100644 --- a/include/babeltrace/ctf/types.h +++ b/include/babeltrace/ctf/types.h @@ -200,7 +200,7 @@ void ctf_pos_get_event(struct ctf_stream_pos *pos) } } -void ctf_print_timestamp(FILE *fp, struct ctf_stream *stream, +void ctf_print_timestamp(FILE *fp, struct ctf_stream_definition *stream, uint64_t timestamp); #endif /* _BABELTRACE_CTF_TYPES_H */ diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index 9addebb2..845a8ae9 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -34,7 +34,7 @@ /* Preallocate this many fields for structures */ #define DEFAULT_NR_STRUCT_FIELDS 8 -struct ctf_stream; +struct ctf_stream_definition; struct stream_pos; struct format; struct definition; @@ -106,7 +106,7 @@ struct stream_pos { /* read/write dispatch table. Specific to plugin used for stream. */ rw_dispatch *rw_table; /* rw dispatch table */ int (*event_cb)(struct stream_pos *pos, - struct ctf_stream *stream); + struct ctf_stream_definition *stream); }; static inline diff --git a/lib/iterator.c b/lib/iterator.c index 1658a723..784166f2 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -149,7 +149,7 @@ static int seek_ctf_trace_by_timestamp(struct ctf_trace *tin, stream_class = g_ptr_array_index(tin->streams, i); /* for each file_stream */ for (j = 0; j < stream_class->streams->len; j++) { - struct ctf_stream *stream; + struct ctf_stream_definition *stream; struct ctf_file_stream *cfs; stream = g_ptr_array_index(stream_class->streams, j); @@ -191,7 +191,7 @@ int bt_iter_set_pos(struct bt_iter *iter, const struct bt_iter_pos *iter_pos) i++) { struct stream_saved_pos *saved_pos; struct ctf_stream_pos *stream_pos; - struct ctf_stream *stream; + struct ctf_stream_definition *stream; saved_pos = &g_array_index( iter_pos->u.restore->stream_saved_pos, @@ -332,7 +332,7 @@ struct bt_iter_pos *bt_iter_get_pos(struct bt_iter *iter) for (stream_id = 0; stream_id < stream_class->streams->len; stream_id++) { - struct ctf_stream *stream; + struct ctf_stream_definition *stream; struct ctf_file_stream *cfs; struct stream_saved_pos saved_pos; -- 2.34.1