debug-info: handle the static notifications
[babeltrace.git] / plugins / lttng-utils / debug-info.h
index c7a2f68eff1e3c8406ad20230f64cd3c03a47bd0..ea5a499d17d8798735c755abf935065c05a12124 100644 (file)
 #include <babeltrace/ctf-ir/fields.h>
 #include <babeltrace/ctf-ir/event-class.h>
 
+enum debug_info_stream_state {
+       /*
+        * We know the stream exists but we have never received a
+        * stream_begin notification for it.
+        */
+       DEBUG_INFO_UNKNOWN_STREAM,
+       /* We know this stream is active (between stream_begin and _end). */
+       DEBUG_INFO_ACTIVE_STREAM,
+       /* We have received a stream_end for this stream. */
+       DEBUG_INFO_COMPLETED_STREAM,
+};
+
 struct debug_info_component {
        FILE *err;
        char *arg_debug_info_field_name;
@@ -58,6 +70,7 @@ struct debug_info_trace {
        struct bt_ctf_trace *trace;
        struct bt_ctf_trace *writer_trace;
        struct debug_info_component *debug_info_component;
+       struct debug_info_iterator *debug_it;
        int static_listener_id;
        int trace_static;
        /* Map between reader and writer stream. */
@@ -68,6 +81,8 @@ struct debug_info_trace {
        GHashTable *packet_map;
        /* Map between a trace_class and its corresponding debug_info. */
        GHashTable *trace_debug_map;
+       /* Map between a stream and enum debug_info_stream_state. */
+       GHashTable *stream_states;
 };
 
 struct debug_info_source {
@@ -101,4 +116,8 @@ BT_HIDDEN
 void debug_info_handle_event(FILE *err, struct bt_ctf_event *event,
                struct debug_info *debug_info);
 
+BT_HIDDEN
+void debug_info_close_trace(struct debug_info_iterator *debug_it,
+               struct debug_info_trace *di_trace);
+
 #endif /* BABELTRACE_PLUGIN_DEBUG_INFO_H */
This page took 0.023842 seconds and 4 git commands to generate.