2 * Babeltrace - Trace IR field copy
4 * Copyright (c) 2015-2019 EfficiOS Inc. and Linux Foundation
5 * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
6 * Copyright (c) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 #define BT_COMP_LOG_SELF_COMP (md_maps->self_comp)
28 #define BT_LOG_OUTPUT_LEVEL (md_maps->log_level)
29 #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-META-FC-COPY"
30 #include "plugins/comp-logging.h"
32 #include "common/assert.h"
33 #include "common/common.h"
34 #include "compat/compiler.h"
35 #include <babeltrace2/babeltrace.h>
37 #include "trace-ir-metadata-copy.h"
38 #include "trace-ir-metadata-field-class-copy.h"
41 * This fonction walks througth the nested structures field class to resolve a
42 * field path object. A field path is made of indexes inside possibly nested
43 * structures ultimately leading to a field class.
46 const bt_field_class
*walk_field_path(struct trace_ir_metadata_maps
*md_maps
,
47 const bt_field_path
*fp
, const bt_field_class
*fc
)
49 uint64_t i
, fp_item_count
;
50 const bt_field_class
*curr_fc
;
52 BT_ASSERT(bt_field_class_get_type(fc
) == BT_FIELD_CLASS_TYPE_STRUCTURE
);
53 BT_COMP_LOGD("Walking field path on field class: fp-addr=%p, fc-addr=%p",
56 fp_item_count
= bt_field_path_get_item_count(fp
);
58 for (i
= 0; i
< fp_item_count
; i
++) {
59 bt_field_class_type fc_type
= bt_field_class_get_type(curr_fc
);
60 const bt_field_path_item
*fp_item
=
61 bt_field_path_borrow_item_by_index_const(fp
, i
);
64 case BT_FIELD_CLASS_TYPE_STRUCTURE
:
66 const bt_field_class_structure_member
*member
;
68 BT_ASSERT(bt_field_path_item_get_type(fp_item
) ==
69 BT_FIELD_PATH_ITEM_TYPE_INDEX
);
70 member
= bt_field_class_structure_borrow_member_by_index_const(
72 bt_field_path_item_index_get_index(fp_item
));
73 curr_fc
= bt_field_class_structure_member_borrow_field_class_const(
77 case BT_FIELD_CLASS_TYPE_VARIANT
:
79 const bt_field_class_variant_option
*option
;
81 BT_ASSERT(bt_field_path_item_get_type(fp_item
) ==
82 BT_FIELD_PATH_ITEM_TYPE_INDEX
);
83 option
= bt_field_class_variant_borrow_option_by_index_const(
85 bt_field_path_item_index_get_index(fp_item
));
86 curr_fc
= bt_field_class_variant_option_borrow_field_class_const(
90 case BT_FIELD_CLASS_TYPE_STATIC_ARRAY
:
91 case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY
:
93 BT_ASSERT(bt_field_path_item_get_type(fp_item
) ==
94 BT_FIELD_PATH_ITEM_TYPE_CURRENT_ARRAY_ELEMENT
);
95 curr_fc
= bt_field_class_array_borrow_element_field_class_const(
108 const bt_field_class
*resolve_field_path_to_field_class(const bt_field_path
*fp
,
109 struct trace_ir_metadata_maps
*md_maps
)
111 struct field_class_resolving_context
*fc_resolving_ctx
;
112 const bt_field_class
*fc
;
115 BT_COMP_LOGD("Resolving field path: fp-addr=%p", fp
);
117 fc_resolving_ctx
= md_maps
->fc_resolving_ctx
;
118 fp_scope
= bt_field_path_get_root_scope(fp
);
121 case BT_SCOPE_PACKET_CONTEXT
:
122 fc
= walk_field_path(md_maps
, fp
,
123 fc_resolving_ctx
->packet_context
);
125 case BT_SCOPE_EVENT_COMMON_CONTEXT
:
126 fc
= walk_field_path(md_maps
, fp
,
127 fc_resolving_ctx
->event_common_context
);
129 case BT_SCOPE_EVENT_SPECIFIC_CONTEXT
:
130 fc
= walk_field_path(md_maps
, fp
,
131 fc_resolving_ctx
->event_specific_context
);
133 case BT_SCOPE_EVENT_PAYLOAD
:
134 fc
= walk_field_path(md_maps
, fp
,
135 fc_resolving_ctx
->event_payload
);
145 void field_class_integer_set_props(const bt_field_class
*input_fc
,
146 bt_field_class
*output_fc
)
148 bt_field_class_integer_set_preferred_display_base(output_fc
,
149 bt_field_class_integer_get_preferred_display_base(input_fc
));
150 bt_field_class_integer_set_field_value_range(output_fc
,
151 bt_field_class_integer_get_field_value_range(input_fc
));
155 int field_class_unsigned_integer_copy(
156 struct trace_ir_metadata_maps
*md_maps
,
157 const bt_field_class
*in_field_class
,
158 bt_field_class
*out_field_class
)
160 BT_COMP_LOGD("Copying content of unsigned integer field class: "
161 "in-fc-addr=%p, out-fc-addr=%p",
162 in_field_class
, out_field_class
);
164 field_class_integer_set_props(in_field_class
, out_field_class
);
166 BT_COMP_LOGD("Copied content of unsigned integer field class: "
167 "in-fc-addr=%p, out-fc-addr=%p",
168 in_field_class
, out_field_class
);
173 int field_class_signed_integer_copy(
174 struct trace_ir_metadata_maps
*md_maps
,
175 const bt_field_class
*in_field_class
,
176 bt_field_class
*out_field_class
)
178 BT_COMP_LOGD("Copying content of signed integer field class: "
179 "in-fc-addr=%p, out-fc-addr=%p",
180 in_field_class
, out_field_class
);
182 field_class_integer_set_props(in_field_class
, out_field_class
);
184 BT_COMP_LOGD("Copied content of signed integer field class: "
185 "in-fc-addr=%p, out-fc-addr=%p",
186 in_field_class
, out_field_class
);
191 int field_class_unsigned_enumeration_copy(
192 struct trace_ir_metadata_maps
*md_maps
,
193 const bt_field_class
*in_field_class
,
194 bt_field_class
*out_field_class
)
196 uint64_t i
, enum_mapping_count
;
199 BT_COMP_LOGD("Copying content of unsigned enumeration field class: "
200 "in-fc-addr=%p, out-fc-addr=%p",
201 in_field_class
, out_field_class
);
203 /* Copy properties of the inner integer. */
204 field_class_integer_set_props(in_field_class
, out_field_class
);
206 /* Copy all enumeration entries. */
207 enum_mapping_count
= bt_field_class_enumeration_get_mapping_count(in_field_class
);
208 for (i
= 0; i
< enum_mapping_count
; i
++) {
210 const bt_field_class_unsigned_enumeration_mapping
*u_mapping
;
211 const bt_field_class_enumeration_mapping
*mapping
;
212 uint64_t range_index
, range_count
;
214 /* Get the ranges and the range count. */
215 u_mapping
= bt_field_class_unsigned_enumeration_borrow_mapping_by_index_const(
217 mapping
= bt_field_class_unsigned_enumeration_mapping_as_mapping_const(
220 bt_field_class_enumeration_mapping_get_range_count(
222 label
= bt_field_class_enumeration_mapping_get_label(
226 * Iterate over all the ranges to add them to copied field
229 for (range_index
= 0; range_index
< range_count
; range_index
++) {
230 uint64_t lower
, upper
;
231 bt_field_class_status status
;
232 bt_field_class_unsigned_enumeration_mapping_get_range_by_index(
233 u_mapping
, range_index
, &lower
, &upper
);
235 BT_COMP_LOGD("Copying range in enumeration field class: "
236 "label=%s, lower=%"PRId64
", upper=%"PRId64
,
237 label
, lower
, upper
);
239 /* Add the label and its range to the copy field class. */
240 status
= bt_field_class_unsigned_enumeration_map_range(
241 out_field_class
, label
, lower
, upper
);
243 if (status
!= BT_FIELD_CLASS_STATUS_OK
) {
244 BT_COMP_LOGE_STR("Failed to add range to unsigned "
246 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_field_class
);
253 BT_COMP_LOGD("Copied content of unsigned enumeration field class: "
254 "in-fc-addr=%p, out-fc-addr=%p",
255 in_field_class
, out_field_class
);
262 int field_class_signed_enumeration_copy(
263 struct trace_ir_metadata_maps
*md_maps
,
264 const bt_field_class
*in_field_class
,
265 bt_field_class
*out_field_class
)
267 uint64_t i
, enum_mapping_count
;
270 BT_COMP_LOGD("Copying content of signed enumeration field class: "
271 "in-fc-addr=%p, out-fc-addr=%p",
272 in_field_class
, out_field_class
);
274 /* Copy properties of the inner integer. */
275 field_class_integer_set_props(in_field_class
, out_field_class
);
277 /* Copy all enumeration entries. */
279 bt_field_class_enumeration_get_mapping_count(in_field_class
);
280 for (i
= 0; i
< enum_mapping_count
; i
++) {
282 const bt_field_class_signed_enumeration_mapping
*i_mapping
;
283 const bt_field_class_enumeration_mapping
*mapping
;
284 uint64_t range_index
, range_count
;
286 /* Get the ranges and the range count. */
287 i_mapping
= bt_field_class_signed_enumeration_borrow_mapping_by_index_const(
289 mapping
= bt_field_class_signed_enumeration_mapping_as_mapping_const(
292 bt_field_class_enumeration_mapping_get_range_count(
294 label
= bt_field_class_enumeration_mapping_get_label(
298 * Iterate over all the ranges to add them to copied field
301 for (range_index
= 0; range_index
< range_count
; range_index
++) {
302 int64_t lower
, upper
;
303 bt_field_class_status status
;
304 bt_field_class_signed_enumeration_mapping_get_range_by_index(
305 i_mapping
, range_index
, &lower
, &upper
);
307 BT_COMP_LOGD("Copying range in enumeration field class: "
308 "label=%s, lower=%"PRId64
", upper=%"PRId64
,
309 label
, lower
, upper
);
311 /* Add the label and its range to the copy field class. */
312 status
= bt_field_class_signed_enumeration_map_range(
313 out_field_class
, label
, lower
, upper
);
314 if (status
!= BT_FIELD_CLASS_STATUS_OK
) {
315 BT_COMP_LOGE_STR("Failed to add range to signed "
317 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_field_class
);
324 BT_COMP_LOGD("Copied content of signed enumeration field class: "
325 "in-fc-addr=%p, out-fc-addr=%p",
326 in_field_class
, out_field_class
);
333 int field_class_real_copy(
334 struct trace_ir_metadata_maps
*md_maps
,
335 const bt_field_class
*in_field_class
,
336 bt_field_class
*out_field_class
)
338 BT_COMP_LOGD("Copying content of real field class: "
339 "in-fc-addr=%p, out-fc-addr=%p",
340 in_field_class
, out_field_class
);
342 bt_field_class_real_set_is_single_precision(out_field_class
,
343 bt_field_class_real_is_single_precision(in_field_class
));
345 BT_COMP_LOGD("Copied content real field class: in-fc-addr=%p, "
346 "out-fc-addr=%p", in_field_class
, out_field_class
);
352 int field_class_structure_copy(
353 struct trace_ir_metadata_maps
*md_maps
,
354 const bt_field_class
*in_field_class
,
355 bt_field_class
*out_field_class
)
357 uint64_t i
, struct_member_count
;
358 bt_field_class_status status
;
361 BT_COMP_LOGD("Copying content of structure field class: "
362 "in-fc-addr=%p, out-fc-addr=%p",
363 in_field_class
, out_field_class
);
364 /* Get the number of member in that struct. */
365 struct_member_count
=
366 bt_field_class_structure_get_member_count(in_field_class
);
368 /* Iterate over all the members of the struct. */
369 for (i
= 0; i
< struct_member_count
; i
++) {
370 const bt_field_class_structure_member
*member
;
371 const char *member_name
;
372 const bt_field_class
*member_fc
;
373 bt_field_class
*out_member_field_class
;
375 member
= bt_field_class_structure_borrow_member_by_index_const(
377 member_fc
= bt_field_class_structure_member_borrow_field_class_const(
379 member_name
= bt_field_class_structure_member_get_name(member
);
380 BT_COMP_LOGD("Copying structure field class's field: "
381 "index=%" PRId64
", "
382 "member-fc-addr=%p, field-name=\"%s\"",
383 i
, member_fc
, member_name
);
385 out_member_field_class
= create_field_class_copy(md_maps
,
387 if (!out_member_field_class
) {
388 BT_COMP_LOGE("Cannot copy structure field class's field: "
389 "index=%" PRId64
", "
390 "field-fc-addr=%p, field-name=\"%s\"",
391 i
, member_fc
, member_name
);
395 ret
= copy_field_class_content(md_maps
, member_fc
,
396 out_member_field_class
);
401 status
= bt_field_class_structure_append_member(out_field_class
,
402 member_name
, out_member_field_class
);
403 if (status
!= BT_FIELD_CLASS_STATUS_OK
) {
404 BT_COMP_LOGE("Cannot append structure field class's field: "
405 "index=%" PRId64
", "
406 "field-fc-addr=%p, field-name=\"%s\"",
407 i
, member_fc
, member_name
);
408 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_member_field_class
);
414 BT_COMP_LOGD("Copied structure field class: original-fc-addr=%p, copy-fc-addr=%p",
415 in_field_class
, out_field_class
);
422 int field_class_variant_copy(
423 struct trace_ir_metadata_maps
*md_maps
,
424 const bt_field_class
*in_field_class
,
425 bt_field_class
*out_field_class
)
427 bt_field_class
*out_tag_field_class
= NULL
;
428 uint64_t i
, variant_option_count
;
429 const bt_field_path
*tag_fp
;
430 const bt_field_class
*tag_fc
;
433 BT_COMP_LOGD("Copying content of variant field class: "
434 "in-fc-addr=%p, out-fc-addr=%p",
435 in_field_class
, out_field_class
);
437 tag_fp
= bt_field_class_variant_borrow_selector_field_path_const(
440 tag_fc
= resolve_field_path_to_field_class(tag_fp
,
443 out_tag_field_class
= g_hash_table_lookup(
444 md_maps
->field_class_map
, tag_fc
);
445 if (!out_tag_field_class
) {
446 BT_COMP_LOGE_STR("Cannot find the tag field class.");
450 bt_field_class_variant_set_selector_field_class(out_field_class
,
451 out_tag_field_class
);
454 variant_option_count
=
455 bt_field_class_variant_get_option_count(in_field_class
);
456 for (i
= 0; i
< variant_option_count
; i
++) {
457 const bt_field_class
*option_fc
;
458 const char *option_name
;
459 bt_field_class
*out_option_field_class
;
460 bt_field_class_status status
;
461 const bt_field_class_variant_option
*option
;
463 option
= bt_field_class_variant_borrow_option_by_index_const(
465 option_fc
= bt_field_class_variant_option_borrow_field_class_const(
467 option_name
= bt_field_class_variant_option_get_name(option
);
468 out_option_field_class
= create_field_class_copy_internal(
470 if (!out_option_field_class
) {
471 BT_COMP_LOGE_STR("Cannot copy field class.");
475 ret
= copy_field_class_content_internal(md_maps
, option_fc
,
476 out_option_field_class
);
478 BT_COMP_LOGE_STR("Error copying content of option variant "
483 status
= bt_field_class_variant_append_option(
484 out_field_class
, option_name
,
485 out_option_field_class
);
486 if (status
!= BT_FIELD_CLASS_STATUS_OK
) {
487 BT_COMP_LOGE_STR("Cannot append option to variant field class'");
488 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_tag_field_class
);
494 BT_COMP_LOGD("Copied content of variant field class: in-fc-addr=%p, "
495 "out-fc-addr=%p", in_field_class
, out_field_class
);
502 int field_class_static_array_copy(
503 struct trace_ir_metadata_maps
*md_maps
,
504 const bt_field_class
*in_field_class
,
505 bt_field_class
*out_field_class
)
507 BT_COMP_LOGD("Copying content of static array field class: in-fc-addr=%p, "
508 "out-fc-addr=%p", in_field_class
, out_field_class
);
510 * There is no content to copy. Keep this function call anyway for
513 BT_COMP_LOGD("Copied content of static array field class: in-fc-addr=%p, "
514 "out-fc-addr=%p", in_field_class
, out_field_class
);
520 int field_class_dynamic_array_copy(
521 struct trace_ir_metadata_maps
*md_maps
,
522 const bt_field_class
*in_field_class
,
523 bt_field_class
*out_field_class
)
525 const bt_field_class
*len_fc
;
526 const bt_field_path
*len_fp
;
527 bt_field_class_status status
;
528 bt_field_class
*out_len_field_class
;
531 BT_COMP_LOGD("Copying content of dynamic array field class: "
532 "in-fc-addr=%p, out-fc-addr=%p",
533 in_field_class
, out_field_class
);
535 len_fp
= bt_field_class_dynamic_array_borrow_length_field_path_const(
539 BT_COMP_LOGD("Copying dynamic array length field class using "
540 "field path: in-len-fp=%p", len_fp
);
541 len_fc
= resolve_field_path_to_field_class(
543 out_len_field_class
= g_hash_table_lookup(
544 md_maps
->field_class_map
, len_fc
);
545 if (!out_len_field_class
) {
546 BT_COMP_LOGE_STR("Cannot find the output matching length"
552 status
= bt_field_class_dynamic_array_set_length_field_class(
553 out_field_class
, out_len_field_class
);
554 if (status
!= BT_FIELD_CLASS_STATUS_OK
) {
555 BT_COMP_LOGE_STR("Cannot set dynamic array field class' "
556 "length field class.");
557 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_len_field_class
);
563 BT_COMP_LOGD("Copied dynamic array field class: in-fc-addr=%p, "
564 "out-fc-addr=%p", in_field_class
, out_field_class
);
571 int field_class_string_copy(struct trace_ir_metadata_maps
*md_maps
,
572 const bt_field_class
*in_field_class
,
573 bt_field_class
*out_field_class
)
575 BT_COMP_LOGD("Copying content of string field class: in-fc-addr=%p, "
576 "out-fc-addr=%p", in_field_class
, out_field_class
);
578 * There is no content to copy. Keep this function call anyway for
581 BT_COMP_LOGD("Copied content of string field class: in-fc-addr=%p, "
582 "out-fc-addr=%p", in_field_class
, out_field_class
);
588 bt_field_class
*copy_field_class_array_element(struct trace_ir_metadata_maps
*md_maps
,
589 const bt_field_class
*in_elem_fc
)
592 bt_field_class
*out_elem_fc
=
593 create_field_class_copy_internal(md_maps
, in_elem_fc
);
595 BT_COMP_LOGE("Error creating output elem field class "
596 "from input elem field class for static array: "
597 "in-fc-addr=%p", in_elem_fc
);
601 ret
= copy_field_class_content_internal(md_maps
, in_elem_fc
, out_elem_fc
);
603 BT_COMP_LOGE("Error creating output elem field class "
604 "from input elem field class for static array: "
605 "in-fc-addr=%p", in_elem_fc
);
606 BT_FIELD_CLASS_PUT_REF_AND_RESET(out_elem_fc
);
615 bt_field_class
*create_field_class_copy_internal(struct trace_ir_metadata_maps
*md_maps
,
616 const bt_field_class
*in_field_class
)
618 bt_field_class
*out_field_class
= NULL
;
620 BT_COMP_LOGD("Creating bare field class based on field class: in-fc-addr=%p",
623 switch(bt_field_class_get_type(in_field_class
)) {
624 case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER
:
625 out_field_class
= bt_field_class_unsigned_integer_create(
626 md_maps
->output_trace_class
);
628 case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER
:
629 out_field_class
= bt_field_class_signed_integer_create(
630 md_maps
->output_trace_class
);
632 case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION
:
633 out_field_class
= bt_field_class_unsigned_enumeration_create(
634 md_maps
->output_trace_class
);
636 case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION
:
637 out_field_class
= bt_field_class_signed_enumeration_create(
638 md_maps
->output_trace_class
);
640 case BT_FIELD_CLASS_TYPE_REAL
:
641 out_field_class
= bt_field_class_real_create(
642 md_maps
->output_trace_class
);
644 case BT_FIELD_CLASS_TYPE_STRING
:
645 out_field_class
= bt_field_class_string_create(
646 md_maps
->output_trace_class
);
648 case BT_FIELD_CLASS_TYPE_STRUCTURE
:
649 out_field_class
= bt_field_class_structure_create(
650 md_maps
->output_trace_class
);
652 case BT_FIELD_CLASS_TYPE_STATIC_ARRAY
:
654 const bt_field_class
*in_elem_fc
=
655 bt_field_class_array_borrow_element_field_class_const(
658 bt_field_class_static_array_get_length(in_field_class
);
660 bt_field_class
*out_elem_fc
= copy_field_class_array_element(
661 md_maps
, in_elem_fc
);
663 out_field_class
= NULL
;
667 out_field_class
= bt_field_class_static_array_create(
668 md_maps
->output_trace_class
,
669 out_elem_fc
, array_len
);
672 case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY
:
674 const bt_field_class
*in_elem_fc
=
675 bt_field_class_array_borrow_element_field_class_const(
678 bt_field_class
*out_elem_fc
= copy_field_class_array_element(
679 md_maps
, in_elem_fc
);
681 out_field_class
= NULL
;
685 out_field_class
= bt_field_class_dynamic_array_create(
686 md_maps
->output_trace_class
,
690 case BT_FIELD_CLASS_TYPE_VARIANT
:
691 out_field_class
= bt_field_class_variant_create(
692 md_maps
->output_trace_class
);
699 * Add mapping from in_field_class to out_field_class. This simplifies
700 * the resolution of field paths in variant and dynamic array field
703 g_hash_table_insert(md_maps
->field_class_map
,
704 (gpointer
) in_field_class
, out_field_class
);
708 BT_COMP_LOGD("Created bare field class based on field class: in-fc-addr=%p, "
709 "out-fc-addr=%p", in_field_class
, out_field_class
);
711 BT_COMP_LOGE("Error creating output field class from input field "
712 "class: in-fc-addr=%p", in_field_class
);
715 return out_field_class
;
719 int copy_field_class_content_internal(
720 struct trace_ir_metadata_maps
*md_maps
,
721 const bt_field_class
*in_field_class
,
722 bt_field_class
*out_field_class
)
725 switch(bt_field_class_get_type(in_field_class
)) {
726 case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER
:
727 ret
= field_class_unsigned_integer_copy(md_maps
,
728 in_field_class
, out_field_class
);
730 case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER
:
731 ret
= field_class_signed_integer_copy(md_maps
,
732 in_field_class
, out_field_class
);
734 case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION
:
735 ret
= field_class_unsigned_enumeration_copy(md_maps
,
736 in_field_class
, out_field_class
);
738 case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION
:
739 ret
= field_class_signed_enumeration_copy(md_maps
,
740 in_field_class
, out_field_class
);
742 case BT_FIELD_CLASS_TYPE_REAL
:
743 ret
= field_class_real_copy(md_maps
,
744 in_field_class
, out_field_class
);
746 case BT_FIELD_CLASS_TYPE_STRING
:
747 ret
= field_class_string_copy(md_maps
,
748 in_field_class
, out_field_class
);
750 case BT_FIELD_CLASS_TYPE_STRUCTURE
:
751 ret
= field_class_structure_copy(md_maps
,
752 in_field_class
, out_field_class
);
754 case BT_FIELD_CLASS_TYPE_STATIC_ARRAY
:
755 ret
= field_class_static_array_copy(md_maps
,
756 in_field_class
, out_field_class
);
758 case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY
:
759 ret
= field_class_dynamic_array_copy(md_maps
,
760 in_field_class
, out_field_class
);
762 case BT_FIELD_CLASS_TYPE_VARIANT
:
763 ret
= field_class_variant_copy(md_maps
,
764 in_field_class
, out_field_class
);