flt.lttng-utils.debug-info: copy boolean field class and field objects
[babeltrace.git] / src / plugins / lttng-utils / debug-info / trace-ir-metadata-field-class-copy.c
index d1d852be19c49ecdafe7d3c93bf3a53c2536edec..868699e580801b41f4d2ee5046b5d8ace8c55cf1 100644 (file)
@@ -27,7 +27,7 @@
 #define BT_COMP_LOG_SELF_COMP (md_maps->self_comp)
 #define BT_LOG_OUTPUT_LEVEL (md_maps->log_level)
 #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-META-FC-COPY"
-#include "plugins/comp-logging.h"
+#include "logging/comp-logging.h"
 
 #include "common/assert.h"
 #include "common/common.h"
@@ -153,6 +153,21 @@ void field_class_integer_set_props(const bt_field_class *input_fc,
                        bt_field_class_integer_get_field_value_range(input_fc));
 }
 
+static inline
+int field_class_bool_copy(
+               struct trace_ir_metadata_maps *md_maps,
+               const bt_field_class *in_field_class,
+               bt_field_class *out_field_class)
+{
+       BT_COMP_LOGD("Copying content of boolean field class: "
+                       "in-fc-addr=%p, out-fc-addr=%p",
+                       in_field_class, out_field_class);
+       BT_COMP_LOGD("Copied content of boolean field class: "
+                       "in-fc-addr=%p, out-fc-addr=%p",
+                       in_field_class, out_field_class);
+       return 0;
+}
+
 static inline
 int field_class_unsigned_integer_copy(
                struct trace_ir_metadata_maps *md_maps,
@@ -561,6 +576,10 @@ bt_field_class *create_field_class_copy_internal(struct trace_ir_metadata_maps *
                        in_field_class);
 
        switch (fc_type) {
+       case BT_FIELD_CLASS_TYPE_BOOL:
+               out_field_class = bt_field_class_bool_create(
+                               md_maps->output_trace_class);
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
                out_field_class = bt_field_class_integer_unsigned_create(
                                md_maps->output_trace_class);
@@ -700,6 +719,10 @@ int copy_field_class_content_internal(
 {
        int ret = 0;
        switch(bt_field_class_get_type(in_field_class)) {
+       case BT_FIELD_CLASS_TYPE_BOOL:
+               ret = field_class_bool_copy(md_maps,
+                               in_field_class, out_field_class);
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
                ret = field_class_unsigned_integer_copy(md_maps,
                                in_field_class, out_field_class);
This page took 0.030008 seconds and 4 git commands to generate.