src.ctf.fs: emit discarded events/packets messages
[babeltrace.git] / plugins / text / pretty / print.c
index cdbbc1b66084804ed5c8411ab56a6e2b8aa5522f..88c84a97895381aedd9e5d1fd6da9e8b5a90eb5c 100644 (file)
@@ -82,10 +82,10 @@ void print_timestamp_cycles(struct pretty_component *pretty,
 {
        const bt_clock_snapshot *clock_snapshot;
        uint64_t cycles;
-       enum bt_clock_snapshot_status cv_status;
+       bt_clock_snapshot_state cs_state;
 
-       cv_status = bt_event_borrow_default_clock_snapshot_const(event, &clock_snapshot);
-       if (cv_status != BT_CLOCK_SNAPSHOT_STATUS_KNOWN || !clock_snapshot) {
+       cs_state = bt_event_borrow_default_clock_snapshot_const(event, &clock_snapshot);
+       if (cs_state != BT_CLOCK_SNAPSHOT_STATE_KNOWN || !clock_snapshot) {
                g_string_append(pretty->string, "????????????????????");
                return;
        }
@@ -223,7 +223,7 @@ int print_event_timestamp(struct pretty_component *pretty,
        const bt_stream *stream = NULL;
        const bt_stream_class *stream_class = NULL;
        const bt_clock_snapshot *clock_snapshot = NULL;
-       enum bt_clock_snapshot_status cv_status;
+       bt_clock_snapshot_state cs_state;
 
        stream = bt_event_borrow_stream_const(event);
        if (!stream) {
@@ -237,9 +237,9 @@ int print_event_timestamp(struct pretty_component *pretty,
                goto end;
        }
 
-       cv_status = bt_event_borrow_default_clock_snapshot_const(event,
+       cs_state = bt_event_borrow_default_clock_snapshot_const(event,
                &clock_snapshot);
-       if (cv_status != BT_CLOCK_SNAPSHOT_STATUS_KNOWN || !clock_snapshot) {
+       if (cs_state != BT_CLOCK_SNAPSHOT_STATE_KNOWN || !clock_snapshot) {
                /* No default clock value: skip the timestamp without an error */
                goto end;
        }
@@ -256,7 +256,7 @@ int print_event_timestamp(struct pretty_component *pretty,
                print_timestamp_cycles(pretty, event);
        } else {
                clock_snapshot = NULL;
-               cv_status = bt_event_borrow_default_clock_snapshot_const(event,
+               cs_state = bt_event_borrow_default_clock_snapshot_const(event,
                        &clock_snapshot);
                print_timestamp_wall(pretty, clock_snapshot);
        }
@@ -319,7 +319,7 @@ int print_event_header(struct pretty_component *pretty,
        const bt_stream *stream = NULL;
        const bt_trace *trace = NULL;
        int dom_print = 0;
-       enum bt_property_availability prop_avail;
+       bt_property_availability prop_avail;
 
        event_class = bt_event_borrow_class_const(event);
        stream_class = bt_event_class_borrow_stream_class_const(event_class);
@@ -451,7 +451,7 @@ int print_event_header(struct pretty_component *pretty,
                        [ BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE ] = "TRACE_DEBUG_LINE",
                        [ BT_EVENT_CLASS_LOG_LEVEL_DEBUG ] = "TRACE_DEBUG",
                };
-               enum bt_event_class_log_level log_level;
+               bt_event_class_log_level log_level;
                const char *log_level_str = NULL;
 
                prop_avail = bt_event_class_get_log_level(event_class,
@@ -525,14 +525,14 @@ int print_integer(struct pretty_component *pretty,
                const bt_field *field)
 {
        int ret = 0;
-       enum bt_field_class_integer_preferred_display_base base;
+       bt_field_class_integer_preferred_display_base base;
        const bt_field_class *int_fc;
        union {
                uint64_t u;
                int64_t s;
        } v;
        bool rst_color = false;
-       enum bt_field_class_type ft_type;
+       bt_field_class_type ft_type;
 
        int_fc = bt_field_borrow_class_const(field);
        BT_ASSERT(int_fc);
@@ -986,7 +986,7 @@ int print_field(struct pretty_component *pretty,
                const bt_field *field, bool print_names,
                GQuark *filter_fields, int filter_array_len)
 {
-       enum bt_field_class_type class_id;
+       bt_field_class_type class_id;
 
        class_id = bt_field_get_class_type(field);
        switch (class_id) {
@@ -1077,31 +1077,6 @@ end:
        return ret;
 }
 
-static
-int print_event_header_raw(struct pretty_component *pretty,
-               const bt_event *event)
-{
-       int ret = 0;
-       const bt_field *main_field = NULL;
-
-       main_field = bt_event_borrow_header_field_const(event);
-       if (!main_field) {
-               goto end;
-       }
-       if (!pretty->start_line) {
-               g_string_append(pretty->string, ", ");
-       }
-       pretty->start_line = false;
-       if (pretty->options.print_scope_field_names) {
-               print_name_equal(pretty, "stream.event.header");
-       }
-       ret = print_field(pretty, main_field,
-                       pretty->options.print_header_field_names, NULL, 0);
-
-end:
-       return ret;
-}
-
 static
 int print_stream_event_context(struct pretty_component *pretty,
                const bt_event *event)
@@ -1215,13 +1190,6 @@ int pretty_print_event(struct pretty_component *pretty,
                goto end;
        }
 
-       if (pretty->options.verbose) {
-               ret = print_event_header_raw(pretty, event);
-               if (ret != 0) {
-                       goto end;
-               }
-       }
-
        ret = print_stream_event_context(pretty, event);
        if (ret != 0) {
                goto end;
This page took 0.02537 seconds and 4 git commands to generate.