flt.lttng-utils.debug-info: add all SC and EC to output trace class ASAP
[babeltrace.git] / src / plugins / lttng-utils / debug-info / trace-ir-metadata-copy.c
1 /*
2 * Babeltrace - Trace IR metadata object copy
3 *
4 * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
5 * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
6 * Copyright (c) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
7 *
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:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
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
24 * SOFTWARE.
25 */
26
27 #define BT_COMP_LOG_SELF_COMP self_comp
28 #define BT_LOG_OUTPUT_LEVEL log_level
29 #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-META-COPY"
30 #include "logging/comp-logging.h"
31
32 #include <inttypes.h>
33 #include <stdint.h>
34
35 #include "common/assert.h"
36
37 #include "trace-ir-metadata-copy.h"
38 #include "trace-ir-metadata-field-class-copy.h"
39 #include "utils.h"
40
41 BT_HIDDEN
42 int copy_trace_class_content(struct trace_ir_maps *ir_maps,
43 const bt_trace_class *in_trace_class, bt_trace_class *out_trace_class,
44 bt_logging_level log_level, bt_self_component *self_comp)
45 {
46 uint64_t sc_number, sc_idx;
47 BT_COMP_LOGD("Copying content of trace class: in-tc-addr=%p, out-tc-addr=%p",
48 in_trace_class, out_trace_class);
49
50 /*
51 * Safe to use the same value object because it's frozen at this
52 * point.
53 */
54 bt_trace_class_set_user_attributes(out_trace_class,
55 bt_trace_class_borrow_user_attributes_const(in_trace_class));
56
57 /* Use the same stream class ids as in the origin trace class. */
58 bt_trace_class_set_assigns_automatic_stream_class_id(out_trace_class,
59 BT_FALSE);
60
61 /* Copy stream classes contained in the trace class. */
62 sc_number = bt_trace_class_get_stream_class_count(in_trace_class);
63 for (sc_idx = 0; sc_idx < sc_number; sc_idx++) {
64 bt_stream_class *out_stream_class;
65 const bt_stream_class *in_stream_class =
66 bt_trace_class_borrow_stream_class_by_index_const(
67 in_trace_class, sc_idx);
68
69 out_stream_class = trace_ir_mapping_borrow_mapped_stream_class(
70 ir_maps, in_stream_class);
71 if (!out_stream_class) {
72 /*
73 * We don't need the new stream_class yet. We simply
74 * want to create it and keep it in the map.
75 */
76 (void) trace_ir_mapping_create_new_mapped_stream_class(
77 ir_maps, in_stream_class);
78 }
79 }
80
81 BT_COMP_LOGD("Copied content of trace class: in-tc-addr=%p, out-tc-addr=%p",
82 in_trace_class, out_trace_class);
83 return 0;
84 }
85
86 static
87 int copy_clock_class_content(const bt_clock_class *in_clock_class,
88 bt_clock_class *out_clock_class, bt_logging_level log_level,
89 bt_self_component *self_comp)
90 {
91 const char *clock_class_name, *clock_class_description;
92 int64_t seconds;
93 uint64_t cycles;
94 bt_uuid in_uuid;
95 int ret = 0;
96
97 BT_COMP_LOGD("Copying content of clock class: in-cc-addr=%p, out-cc-addr=%p",
98 in_clock_class, out_clock_class);
99
100 clock_class_name = bt_clock_class_get_name(in_clock_class);
101
102 if (clock_class_name) {
103 if (bt_clock_class_set_name(out_clock_class, clock_class_name)
104 != BT_CLOCK_CLASS_SET_NAME_STATUS_OK) {
105 BT_COMP_LOGE("Error setting clock class' name cc-addr=%p, name=%p",
106 out_clock_class, clock_class_name);
107 out_clock_class = NULL;
108 ret = -1;
109 goto error;
110 }
111 }
112
113 /*
114 * Safe to use the same value object because it's frozen at this
115 * point.
116 */
117 bt_clock_class_set_user_attributes(out_clock_class,
118 bt_clock_class_borrow_user_attributes_const(in_clock_class));
119
120 clock_class_description = bt_clock_class_get_description(in_clock_class);
121
122 if (clock_class_description) {
123 if (bt_clock_class_set_description(out_clock_class,
124 clock_class_description) !=
125 BT_CLOCK_CLASS_SET_DESCRIPTION_STATUS_OK) {
126 BT_COMP_LOGE("Error setting clock class' description cc-addr=%p, "
127 "name=%p", out_clock_class, clock_class_description);
128 out_clock_class = NULL;
129 ret = -1;
130 goto error;
131 }
132 }
133
134 in_uuid = bt_clock_class_get_uuid(in_clock_class);
135 if (in_uuid) {
136 bt_clock_class_set_uuid(out_clock_class, in_uuid);
137 }
138
139 bt_clock_class_set_frequency(out_clock_class,
140 bt_clock_class_get_frequency(in_clock_class));
141 bt_clock_class_set_precision(out_clock_class,
142 bt_clock_class_get_precision(in_clock_class));
143 bt_clock_class_get_offset(in_clock_class, &seconds, &cycles);
144 bt_clock_class_set_offset(out_clock_class, seconds, cycles);
145 bt_clock_class_set_origin_is_unix_epoch(out_clock_class,
146 bt_clock_class_origin_is_unix_epoch(in_clock_class));
147
148 BT_COMP_LOGD("Copied content of clock class: in-cc-addr=%p, out-cc-addr=%p",
149 in_clock_class, out_clock_class);
150
151 error:
152 return ret;
153 }
154
155 static
156 bt_clock_class *borrow_mapped_clock_class(
157 struct trace_ir_metadata_maps *md_maps,
158 const bt_clock_class *in_clock_class)
159 {
160 BT_ASSERT_DBG(md_maps);
161 BT_ASSERT_DBG(in_clock_class);
162
163 return g_hash_table_lookup(md_maps->clock_class_map,
164 (gpointer) in_clock_class);
165 }
166
167 static
168 bt_clock_class *create_new_mapped_clock_class(bt_self_component *self_comp,
169 struct trace_ir_metadata_maps *md_maps,
170 const bt_clock_class *in_clock_class)
171 {
172 bt_clock_class *out_clock_class;
173 bt_logging_level log_level = md_maps->log_level;
174 int ret;
175
176 BT_COMP_LOGD("Creating new mapped clock class: in-cc-addr=%p",
177 in_clock_class);
178
179 BT_ASSERT(md_maps);
180 BT_ASSERT(in_clock_class);
181
182 BT_ASSERT(!borrow_mapped_clock_class(md_maps, in_clock_class));
183
184 out_clock_class = bt_clock_class_create(self_comp);
185 if (!out_clock_class) {
186 BT_COMP_LOGE_STR("Cannot create clock class");
187 goto end;
188 }
189 /* If not, create a new one and add it to the mapping. */
190 ret = copy_clock_class_content(in_clock_class, out_clock_class,
191 log_level, self_comp);
192 if (ret) {
193 BT_COMP_LOGE_STR("Cannot copy clock class");
194 goto end;
195 }
196
197 g_hash_table_insert(md_maps->clock_class_map,
198 (gpointer) in_clock_class, out_clock_class);
199
200 BT_COMP_LOGD("Created new mapped clock class: in-cc-addr=%p, out-cc-addr=%p",
201 in_clock_class, out_clock_class);
202 end:
203 return out_clock_class;
204 }
205
206 BT_HIDDEN
207 int copy_stream_class_content(struct trace_ir_maps *ir_maps,
208 const bt_stream_class *in_stream_class,
209 bt_stream_class *out_stream_class)
210 {
211 struct trace_ir_metadata_maps *md_maps;
212 const bt_clock_class *in_clock_class;
213 bt_clock_class *out_clock_class;
214 const bt_field_class *in_packet_context_fc, *in_common_context_fc;
215 bt_field_class *out_packet_context_fc, *out_common_context_fc;
216 const char *in_name;
217 uint64_t ec_number, ec_idx;
218 bt_logging_level log_level = ir_maps->log_level;
219 bt_self_component *self_comp = ir_maps->self_comp;
220 int ret = 0;
221
222 BT_COMP_LOGD("Copying content of stream class: in-sc-addr=%p, out-sc-addr=%p",
223 in_stream_class, out_stream_class);
224
225 md_maps = borrow_metadata_maps_from_input_stream_class(ir_maps, in_stream_class);
226 in_clock_class = bt_stream_class_borrow_default_clock_class_const(
227 in_stream_class);
228
229 if (in_clock_class) {
230 /* Copy the clock class. */
231 out_clock_class = borrow_mapped_clock_class(md_maps,
232 in_clock_class);
233 if (!out_clock_class) {
234 out_clock_class = create_new_mapped_clock_class(
235 ir_maps->self_comp, md_maps, in_clock_class);
236 }
237 bt_stream_class_set_default_clock_class(out_stream_class,
238 out_clock_class);
239 }
240
241 /*
242 * Safe to use the same value object because it's frozen at this
243 * point.
244 */
245 bt_stream_class_set_user_attributes(out_stream_class,
246 bt_stream_class_borrow_user_attributes_const(in_stream_class));
247
248 bt_stream_class_set_supports_packets(
249 out_stream_class,
250 bt_stream_class_supports_packets(in_stream_class),
251 bt_stream_class_packets_have_beginning_default_clock_snapshot(
252 in_stream_class),
253 bt_stream_class_packets_have_end_default_clock_snapshot(
254 in_stream_class));
255 bt_stream_class_set_supports_discarded_events(
256 out_stream_class,
257 bt_stream_class_supports_discarded_events(in_stream_class),
258 bt_stream_class_discarded_events_have_default_clock_snapshots(
259 in_stream_class));
260 bt_stream_class_set_supports_discarded_packets(
261 out_stream_class,
262 bt_stream_class_supports_discarded_packets(in_stream_class),
263 bt_stream_class_discarded_packets_have_default_clock_snapshots(
264 in_stream_class));
265
266 in_name = bt_stream_class_get_name(in_stream_class);
267 if (in_name) {
268 if (bt_stream_class_set_name(out_stream_class, in_name) !=
269 BT_STREAM_CLASS_SET_NAME_STATUS_OK) {
270 BT_COMP_LOGE("Error set stream class name: out-sc-addr=%p, "
271 "name=%s", out_stream_class, in_name);
272 ret = -1;
273 goto error;
274 }
275 }
276
277 bt_stream_class_set_assigns_automatic_stream_id(out_stream_class,
278 BT_FALSE);
279 bt_stream_class_set_assigns_automatic_event_class_id(out_stream_class,
280 BT_FALSE);
281
282 /*
283 * Add the input packet context field class to the context to
284 * resolution in the further steps.
285 */
286 in_packet_context_fc =
287 bt_stream_class_borrow_packet_context_field_class_const(
288 in_stream_class);
289 md_maps->fc_resolving_ctx->packet_context =
290 in_packet_context_fc;
291
292 if (in_packet_context_fc) {
293 /* Copy packet context. */
294 out_packet_context_fc = create_field_class_copy(md_maps,
295 in_packet_context_fc);
296
297 ret = copy_field_class_content(md_maps, in_packet_context_fc,
298 out_packet_context_fc);
299 if (ret) {
300 ret = -1;
301 goto error;
302 }
303
304 if (bt_stream_class_set_packet_context_field_class(
305 out_stream_class, out_packet_context_fc) !=
306 BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK) {
307 BT_COMP_LOGE("Error setting stream class' packet context "
308 "field class: sc-addr=%p, packet-fc-addr=%p",
309 out_stream_class, out_packet_context_fc);
310 ret = -1;
311 goto error;
312 }
313 }
314
315 /*
316 * Add the input common context field class to the context to
317 * resolution in the further steps.
318 */
319 in_common_context_fc =
320 bt_stream_class_borrow_event_common_context_field_class_const(
321 in_stream_class);
322 md_maps->fc_resolving_ctx->event_common_context = in_common_context_fc;
323
324 if (in_common_context_fc) {
325 /* Copy common context. */
326 /* TODO: I find it a bit awkward to have this special function
327 * here to add the debug-info field class. I would like to
328 * abstract that.*/
329 out_common_context_fc = create_field_class_copy(md_maps,
330 in_common_context_fc);
331
332 ret = copy_event_common_context_field_class_content(md_maps,
333 ir_maps->debug_info_field_class_name,
334 in_common_context_fc, out_common_context_fc);
335 if (ret) {
336 goto error;
337 }
338
339 if (bt_stream_class_set_event_common_context_field_class(
340 out_stream_class, out_common_context_fc) !=
341 BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK) {
342 BT_COMP_LOGE("Error setting stream class' packet context "
343 "field class: sc-addr=%p, packet-fc-addr=%p",
344 out_stream_class, out_common_context_fc);
345 ret = -1;
346 goto error;
347 }
348 }
349
350 /* Copy event classes contained in the stream class. */
351 ec_number = bt_stream_class_get_event_class_count(in_stream_class);
352 for (ec_idx = 0; ec_idx < ec_number; ec_idx++) {
353 bt_event_class *out_event_class;
354 const bt_event_class *in_event_class =
355 bt_stream_class_borrow_event_class_by_id_const(
356 in_stream_class, ec_idx);
357 out_event_class = trace_ir_mapping_borrow_mapped_event_class(
358 ir_maps, in_event_class);
359 if (!out_event_class) {
360 /*
361 * We don't need the new event_class yet. We simply
362 * want to create it and keep it in the map.
363 */
364 (void) trace_ir_mapping_create_new_mapped_event_class(
365 ir_maps, in_event_class);
366 }
367 }
368
369 BT_COMP_LOGD("Copied content of stream class: in-sc-addr=%p, out-sc-addr=%p",
370 in_stream_class, out_stream_class);
371 error:
372 return ret;
373 }
374
375 BT_HIDDEN
376 int copy_event_class_content(struct trace_ir_maps *ir_maps,
377 const bt_event_class *in_event_class,
378 bt_event_class *out_event_class)
379 {
380 struct trace_ir_metadata_maps *md_maps;
381 const char *in_event_class_name, *in_emf_uri;
382 bt_property_availability prop_avail;
383 bt_event_class_log_level ec_log_level;
384 bt_field_class *out_specific_context_fc, *out_payload_fc;
385 const bt_field_class *in_event_specific_context, *in_event_payload;
386 int ret = 0;
387 bt_logging_level log_level = ir_maps->log_level;
388 bt_self_component *self_comp = ir_maps->self_comp;
389
390 BT_COMP_LOGD("Copying content of event class: in-ec-addr=%p, out-ec-addr=%p",
391 in_event_class, out_event_class);
392
393 /* Copy event class name. */
394 in_event_class_name = bt_event_class_get_name(in_event_class);
395 if (in_event_class_name) {
396 if (bt_event_class_set_name(out_event_class,
397 in_event_class_name) !=
398 BT_EVENT_CLASS_SET_NAME_STATUS_OK) {
399 BT_COMP_LOGE("Error setting event class' name: ec-addr=%p, "
400 "name=%s", out_event_class, in_event_class_name);
401 ret = -1;
402 goto error;
403 }
404 }
405
406 /*
407 * Safe to use the same value object because it's frozen at this
408 * point.
409 */
410 bt_event_class_set_user_attributes(out_event_class,
411 bt_event_class_borrow_user_attributes_const(in_event_class));
412
413 /* Copy event class loglevel. */
414 prop_avail = bt_event_class_get_log_level(in_event_class,
415 &ec_log_level);
416 if (prop_avail == BT_PROPERTY_AVAILABILITY_AVAILABLE) {
417 bt_event_class_set_log_level(out_event_class, ec_log_level);
418 }
419
420 /* Copy event class emf uri. */
421 in_emf_uri = bt_event_class_get_emf_uri(in_event_class);
422 if (in_emf_uri) {
423 if (bt_event_class_set_emf_uri(out_event_class, in_emf_uri) !=
424 BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK) {
425 BT_COMP_LOGE("Error setting event class' emf uri: ec-addr=%p, "
426 "emf uri=%s", out_event_class, in_emf_uri);
427 ret = -1;
428 goto error;
429 }
430 }
431
432 md_maps = borrow_metadata_maps_from_input_event_class(ir_maps,
433 in_event_class);
434 /*
435 * Add the input event class' specific ctx to te
436 * context.
437 */
438 in_event_specific_context =
439 bt_event_class_borrow_specific_context_field_class_const(
440 in_event_class);
441
442 md_maps->fc_resolving_ctx->event_specific_context =
443 in_event_specific_context;
444
445 if (in_event_specific_context) {
446 /* Copy the specific context of this event class. */
447 out_specific_context_fc = create_field_class_copy(md_maps,
448 in_event_specific_context);
449
450 ret = copy_field_class_content(md_maps,
451 in_event_specific_context, out_specific_context_fc);
452 if (ret) {
453 goto error;
454 }
455 /*
456 * Add the output specific context to the output event
457 * class.
458 */
459 if (bt_event_class_set_specific_context_field_class(
460 out_event_class, out_specific_context_fc) !=
461 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK) {
462 BT_COMP_LOGE("Error setting event class' specific context "
463 "field class: ec-addr=%p, ctx-fc-addr=%p",
464 out_event_class, out_specific_context_fc);
465 ret = -1;
466 goto error;
467 }
468 }
469
470 /*
471 * Add the input event class' payload field class to
472 * the context.
473 */
474 in_event_payload = bt_event_class_borrow_payload_field_class_const(
475 in_event_class);
476
477 md_maps->fc_resolving_ctx->event_payload = in_event_payload;
478
479 if (in_event_payload) {
480 /* Copy the payload of this event class. */
481 out_payload_fc = create_field_class_copy(md_maps,
482 in_event_payload);
483 ret = copy_field_class_content(md_maps, in_event_payload,
484 out_payload_fc);
485 if (ret) {
486 goto error;
487 }
488
489 /* Add the output payload to the output event class. */
490 if (bt_event_class_set_payload_field_class(out_event_class,
491 out_payload_fc) != BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK) {
492 BT_COMP_LOGE("Error setting event class' payload "
493 "field class: ec-addr=%p, payload-fc-addr=%p",
494 out_event_class, out_payload_fc);
495 ret = -1;
496 goto error;
497 }
498 }
499
500 BT_COMP_LOGD("Copied content of event class: in-ec-addr=%p, out-ec-addr=%p",
501 in_event_class, out_event_class);
502 error:
503 return ret;
504 }
505
506 BT_HIDDEN
507 int copy_event_common_context_field_class_content(
508 struct trace_ir_metadata_maps *md_maps,
509 const char *debug_info_fc_name,
510 const bt_field_class *in_field_class,
511 bt_field_class *out_field_class)
512 {
513 bt_field_class *debug_field_class = NULL, *bin_field_class = NULL,
514 *func_field_class = NULL, *src_field_class = NULL;
515 bt_logging_level log_level = md_maps->log_level;
516 bt_self_component *self_comp = md_maps->self_comp;
517 int ret = 0;
518
519 BT_COMP_LOGD("Copying content of event common context field class: "
520 "in-fc-addr=%p, out-fc-addr=%p", in_field_class, out_field_class);
521
522 /* Copy the content of the input common context. */
523 ret = copy_field_class_content(md_maps, in_field_class, out_field_class);
524 if (ret) {
525 goto error;
526 }
527
528 /*
529 * If this event common context has the necessary fields to compute the
530 * debug information append the debug-info field class to the event
531 * common context.
532 */
533 if (is_event_common_ctx_dbg_info_compatible(in_field_class, debug_info_fc_name)) {
534 /*
535 * The struct field and 3 sub-fields are not stored in the
536 * field class map because they don't have input equivalent.
537 * We need to put our reference each of these field classes
538 * once they are added to their respective containing field
539 * classes.
540 */
541 debug_field_class = bt_field_class_structure_create(
542 md_maps->output_trace_class);
543 if (!debug_field_class) {
544 BT_COMP_LOGE_STR("Failed to create debug_info structure.");
545 ret = -1;
546 goto error;
547 }
548
549 bin_field_class = bt_field_class_string_create(
550 md_maps->output_trace_class);
551 if (!bin_field_class) {
552 BT_COMP_LOGE_STR("Failed to create string for field=bin.");
553 ret = -1;
554 goto error;
555 }
556
557 func_field_class = bt_field_class_string_create(
558 md_maps->output_trace_class);
559 if (!func_field_class) {
560 BT_COMP_LOGE_STR("Failed to create string for field=func.");
561 ret = -1;
562 goto error;
563 }
564
565 src_field_class = bt_field_class_string_create(
566 md_maps->output_trace_class);
567 if (!src_field_class) {
568 BT_COMP_LOGE_STR("Failed to create string for field=src.");
569 ret = -1;
570 goto error;
571 }
572
573 if (bt_field_class_structure_append_member(debug_field_class,
574 "bin", bin_field_class) !=
575 BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK) {
576 BT_COMP_LOGE_STR("Failed to add a field to debug_info "
577 "struct: field=bin.");
578 ret = -1;
579 goto error;
580 }
581 BT_FIELD_CLASS_PUT_REF_AND_RESET(bin_field_class);
582
583 if (bt_field_class_structure_append_member(debug_field_class,
584 "func", func_field_class) !=
585 BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK) {
586 BT_COMP_LOGE_STR("Failed to add a field to debug_info "
587 "struct: field=func.");
588 ret = -1;
589 goto error;
590 }
591 BT_FIELD_CLASS_PUT_REF_AND_RESET(func_field_class);
592
593 if (bt_field_class_structure_append_member(debug_field_class,
594 "src", src_field_class) !=
595 BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK) {
596 BT_COMP_LOGE_STR("Failed to add a field to debug_info "
597 "struct: field=src.");
598 ret = -1;
599 goto error;
600 }
601 BT_FIELD_CLASS_PUT_REF_AND_RESET(src_field_class);
602
603 /*Add the filled debug-info field class to the common context. */
604 if (bt_field_class_structure_append_member(out_field_class,
605 debug_info_fc_name, debug_field_class) !=
606 BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK) {
607 BT_COMP_LOGE_STR("Failed to add debug_info field to "
608 "event common context.");
609 ret = -1;
610 goto error;
611 }
612 BT_FIELD_CLASS_PUT_REF_AND_RESET(debug_field_class);
613 }
614 BT_COMP_LOGD("Copied content of event common context field class: "
615 "in-fc-addr=%p, out-fc-addr=%p", in_field_class, out_field_class);
616 goto end;
617
618 error:
619 if (debug_field_class) {
620 bt_field_class_put_ref(debug_field_class);
621 }
622 if (bin_field_class) {
623 bt_field_class_put_ref(bin_field_class);
624 }
625 if (func_field_class) {
626 bt_field_class_put_ref(func_field_class);
627 }
628 if (src_field_class) {
629 bt_field_class_put_ref(src_field_class);
630 }
631 end:
632 return ret;
633 }
634
635 BT_HIDDEN
636 bt_field_class *create_field_class_copy(struct trace_ir_metadata_maps *md_maps,
637 const bt_field_class *in_field_class)
638 {
639 return create_field_class_copy_internal(md_maps, in_field_class);
640 }
641
642 BT_HIDDEN
643 int copy_field_class_content(struct trace_ir_metadata_maps *md_maps,
644 const bt_field_class *in_field_class,
645 bt_field_class *out_field_class)
646 {
647 return copy_field_class_content_internal(md_maps, in_field_class,
648 out_field_class);
649 }
This page took 0.042698 seconds and 4 git commands to generate.