bt_field_class_*_create(): accept mandatory trace class
[babeltrace.git] / plugins / ctf / common / metadata / ctf-meta-translate.c
1 /*
2 * Copyright 2018 - Philippe Proulx <pproulx@efficios.com>
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 */
14
15 #define BT_LOG_TAG "PLUGIN-CTF-METADATA-META-TRANSLATE"
16 #include "logging.h"
17
18 #include <babeltrace/babeltrace.h>
19 #include <babeltrace/babeltrace-internal.h>
20 #include <babeltrace/assert-internal.h>
21 #include <glib.h>
22 #include <stdint.h>
23 #include <string.h>
24 #include <inttypes.h>
25
26 #include "ctf-meta-visitors.h"
27
28 static inline
29 bt_field_class *ctf_field_class_to_ir(bt_trace_class *ir_tc,
30 struct ctf_field_class *fc,
31 struct ctf_trace_class *tc,
32 struct ctf_stream_class *sc,
33 struct ctf_event_class *ec);
34
35 static inline
36 void ctf_field_class_int_set_props(struct ctf_field_class_int *fc,
37 bt_field_class *ir_fc)
38 {
39 bt_field_class_integer_set_field_value_range(ir_fc,
40 fc->base.size);
41 bt_field_class_integer_set_preferred_display_base(ir_fc,
42 fc->disp_base);
43 }
44
45 static inline
46 bt_field_class *ctf_field_class_int_to_ir(bt_trace_class *ir_tc,
47 struct ctf_field_class_int *fc)
48 {
49 bt_field_class *ir_fc;
50
51 if (fc->is_signed) {
52 ir_fc = bt_field_class_signed_integer_create(ir_tc);
53 } else {
54 ir_fc = bt_field_class_unsigned_integer_create(ir_tc);
55 }
56
57 BT_ASSERT(ir_fc);
58 ctf_field_class_int_set_props(fc, ir_fc);
59 return ir_fc;
60 }
61
62 static inline
63 bt_field_class *ctf_field_class_enum_to_ir(bt_trace_class *ir_tc,
64 struct ctf_field_class_enum *fc)
65 {
66 int ret;
67 bt_field_class *ir_fc;
68 uint64_t i;
69
70 if (fc->base.is_signed) {
71 ir_fc = bt_field_class_signed_enumeration_create(ir_tc);
72 } else {
73 ir_fc = bt_field_class_unsigned_enumeration_create(ir_tc);
74 }
75
76 BT_ASSERT(ir_fc);
77 ctf_field_class_int_set_props((void *) fc, ir_fc);
78
79 for (i = 0; i < fc->mappings->len; i++) {
80 struct ctf_field_class_enum_mapping *mapping =
81 ctf_field_class_enum_borrow_mapping_by_index(fc, i);
82
83 if (fc->base.is_signed) {
84 ret = bt_field_class_signed_enumeration_map_range(
85 ir_fc, mapping->label->str,
86 mapping->range.lower.i, mapping->range.upper.i);
87 } else {
88 ret = bt_field_class_unsigned_enumeration_map_range(
89 ir_fc, mapping->label->str,
90 mapping->range.lower.u, mapping->range.upper.u);
91 }
92
93 BT_ASSERT(ret == 0);
94 }
95
96 return ir_fc;
97 }
98
99 static inline
100 bt_field_class *ctf_field_class_float_to_ir(bt_trace_class *ir_tc,
101 struct ctf_field_class_float *fc)
102 {
103 bt_field_class *ir_fc;
104
105 ir_fc = bt_field_class_real_create(ir_tc);
106 BT_ASSERT(ir_fc);
107
108 if (fc->base.size == 32) {
109 bt_field_class_real_set_is_single_precision(ir_fc,
110 BT_TRUE);
111 }
112
113 return ir_fc;
114 }
115
116 static inline
117 bt_field_class *ctf_field_class_string_to_ir(bt_trace_class *ir_tc,
118 struct ctf_field_class_string *fc)
119 {
120 bt_field_class *ir_fc = bt_field_class_string_create(ir_tc);
121
122 BT_ASSERT(ir_fc);
123 return ir_fc;
124 }
125
126 static inline
127 bt_field_class *ctf_field_class_struct_to_ir(bt_trace_class *ir_tc,
128 struct ctf_field_class_struct *fc,
129 struct ctf_trace_class *tc,
130 struct ctf_stream_class *sc,
131 struct ctf_event_class *ec)
132 {
133 int ret;
134 bt_field_class *ir_fc = bt_field_class_structure_create(ir_tc);
135 uint64_t i;
136
137 BT_ASSERT(ir_fc);
138
139 for (i = 0; i < fc->members->len; i++) {
140 struct ctf_named_field_class *named_fc =
141 ctf_field_class_struct_borrow_member_by_index(fc, i);
142 bt_field_class *member_ir_fc;
143
144 if (!named_fc->fc->in_ir) {
145 continue;
146 }
147
148 member_ir_fc = ctf_field_class_to_ir(ir_tc, named_fc->fc,
149 tc, sc, ec);
150 BT_ASSERT(member_ir_fc);
151 ret = bt_field_class_structure_append_member(
152 ir_fc, named_fc->name->str, member_ir_fc);
153 BT_ASSERT(ret == 0);
154 bt_field_class_put_ref(member_ir_fc);
155 }
156
157 return ir_fc;
158 }
159
160 static inline
161 bt_field_class *borrow_ir_ft_from_field_path(struct ctf_field_path *field_path,
162 struct ctf_trace_class *tc,
163 struct ctf_stream_class *sc,
164 struct ctf_event_class *ec)
165 {
166 bt_field_class *ir_fc = NULL;
167 struct ctf_field_class *fc = ctf_field_path_borrow_field_class(
168 field_path, tc, sc, ec);
169
170 BT_ASSERT(fc);
171
172 if (fc->in_ir) {
173 ir_fc = fc->ir_fc;
174 }
175
176 return ir_fc;
177 }
178
179 static inline
180 bt_field_class *ctf_field_class_variant_to_ir(bt_trace_class *ir_tc,
181 struct ctf_field_class_variant *fc,
182 struct ctf_trace_class *tc,
183 struct ctf_stream_class *sc,
184 struct ctf_event_class *ec)
185 {
186 int ret;
187 bt_field_class *ir_fc = bt_field_class_variant_create(ir_tc);
188 uint64_t i;
189
190 BT_ASSERT(ir_fc);
191 ret = bt_field_class_variant_set_selector_field_class(
192 ir_fc, borrow_ir_ft_from_field_path(&fc->tag_path, tc, sc, ec));
193 BT_ASSERT(ret == 0);
194
195 for (i = 0; i < fc->options->len; i++) {
196 struct ctf_named_field_class *named_fc =
197 ctf_field_class_variant_borrow_option_by_index(fc, i);
198 bt_field_class *option_ir_fc;
199
200 BT_ASSERT(named_fc->fc->in_ir);
201 option_ir_fc = ctf_field_class_to_ir(ir_tc, named_fc->fc,
202 tc, sc, ec);
203 BT_ASSERT(option_ir_fc);
204 ret = bt_field_class_variant_append_option(
205 ir_fc, named_fc->name->str, option_ir_fc);
206 BT_ASSERT(ret == 0);
207 bt_field_class_put_ref(option_ir_fc);
208 }
209
210 return ir_fc;
211 }
212
213 static inline
214 bt_field_class *ctf_field_class_array_to_ir(bt_trace_class *ir_tc,
215 struct ctf_field_class_array *fc,
216 struct ctf_trace_class *tc,
217 struct ctf_stream_class *sc,
218 struct ctf_event_class *ec)
219 {
220 bt_field_class *ir_fc;
221 bt_field_class *elem_ir_fc;
222
223 if (fc->base.is_text) {
224 ir_fc = bt_field_class_string_create(ir_tc);
225 BT_ASSERT(ir_fc);
226 goto end;
227 }
228
229 elem_ir_fc = ctf_field_class_to_ir(ir_tc, fc->base.elem_fc, tc, sc, ec);
230 BT_ASSERT(elem_ir_fc);
231 ir_fc = bt_field_class_static_array_create(ir_tc, elem_ir_fc,
232 fc->length);
233 BT_ASSERT(ir_fc);
234 bt_field_class_put_ref(elem_ir_fc);
235
236 end:
237 return ir_fc;
238 }
239
240 static inline
241 bt_field_class *ctf_field_class_sequence_to_ir(bt_trace_class *ir_tc,
242 struct ctf_field_class_sequence *fc,
243 struct ctf_trace_class *tc,
244 struct ctf_stream_class *sc,
245 struct ctf_event_class *ec)
246 {
247 int ret;
248 bt_field_class *ir_fc;
249 bt_field_class *elem_ir_fc;
250
251 if (fc->base.is_text) {
252 ir_fc = bt_field_class_string_create(ir_tc);
253 BT_ASSERT(ir_fc);
254 goto end;
255 }
256
257 elem_ir_fc = ctf_field_class_to_ir(ir_tc, fc->base.elem_fc, tc, sc, ec);
258 BT_ASSERT(elem_ir_fc);
259 ir_fc = bt_field_class_dynamic_array_create(ir_tc, elem_ir_fc);
260 BT_ASSERT(ir_fc);
261 bt_field_class_put_ref(elem_ir_fc);
262 BT_ASSERT(ir_fc);
263 ret = bt_field_class_dynamic_array_set_length_field_class(
264 ir_fc,
265 borrow_ir_ft_from_field_path(&fc->length_path, tc, sc, ec));
266 BT_ASSERT(ret == 0);
267
268 end:
269 return ir_fc;
270 }
271
272 static inline
273 bt_field_class *ctf_field_class_to_ir(bt_trace_class *ir_tc,
274 struct ctf_field_class *fc,
275 struct ctf_trace_class *tc,
276 struct ctf_stream_class *sc,
277 struct ctf_event_class *ec)
278 {
279 bt_field_class *ir_fc = NULL;
280
281 BT_ASSERT(fc);
282 BT_ASSERT(fc->in_ir);
283
284 switch (fc->type) {
285 case CTF_FIELD_CLASS_TYPE_INT:
286 ir_fc = ctf_field_class_int_to_ir(ir_tc, (void *) fc);
287 break;
288 case CTF_FIELD_CLASS_TYPE_ENUM:
289 ir_fc = ctf_field_class_enum_to_ir(ir_tc, (void *) fc);
290 break;
291 case CTF_FIELD_CLASS_TYPE_FLOAT:
292 ir_fc = ctf_field_class_float_to_ir(ir_tc, (void *) fc);
293 break;
294 case CTF_FIELD_CLASS_TYPE_STRING:
295 ir_fc = ctf_field_class_string_to_ir(ir_tc, (void *) fc);
296 break;
297 case CTF_FIELD_CLASS_TYPE_STRUCT:
298 ir_fc = ctf_field_class_struct_to_ir(ir_tc, (void *) fc,
299 tc, sc, ec);
300 break;
301 case CTF_FIELD_CLASS_TYPE_ARRAY:
302 ir_fc = ctf_field_class_array_to_ir(ir_tc, (void *) fc,
303 tc, sc, ec);
304 break;
305 case CTF_FIELD_CLASS_TYPE_SEQUENCE:
306 ir_fc = ctf_field_class_sequence_to_ir(ir_tc, (void *) fc,
307 tc, sc, ec);
308 break;
309 case CTF_FIELD_CLASS_TYPE_VARIANT:
310 ir_fc = ctf_field_class_variant_to_ir(ir_tc, (void *) fc,
311 tc, sc, ec);
312 break;
313 default:
314 abort();
315 }
316
317 fc->ir_fc = ir_fc;
318 return ir_fc;
319 }
320
321 static inline
322 bool ctf_field_class_struct_has_immediate_member_in_ir(
323 struct ctf_field_class_struct *fc)
324 {
325 uint64_t i;
326 bool has_immediate_member_in_ir = false;
327
328 for (i = 0; i < fc->members->len; i++) {
329 struct ctf_named_field_class *named_fc =
330 ctf_field_class_struct_borrow_member_by_index(fc, i);
331
332 if (named_fc->fc->in_ir) {
333 has_immediate_member_in_ir = true;
334 goto end;
335 }
336 }
337
338 end:
339 return has_immediate_member_in_ir;
340 }
341
342 static inline
343 bt_field_class *scope_ctf_field_class_to_ir(bt_trace_class *ir_tc,
344 struct ctf_field_class *fc,
345 struct ctf_trace_class *tc,
346 struct ctf_stream_class *sc,
347 struct ctf_event_class *ec)
348 {
349 bt_field_class *ir_fc = NULL;
350
351 if (!fc) {
352 goto end;
353 }
354
355 BT_ASSERT(fc->type == CTF_FIELD_CLASS_TYPE_STRUCT);
356
357 if (!ctf_field_class_struct_has_immediate_member_in_ir((void *) fc)) {
358 /*
359 * Nothing for IR in this scope: typical for packet
360 * header, packet context, and event header.
361 */
362 goto end;
363 }
364
365 ir_fc = ctf_field_class_to_ir(ir_tc, fc, tc, sc, ec);
366
367 end:
368 return ir_fc;
369 }
370
371 static inline
372 struct ctf_field_class_int *borrow_named_int_field_class(
373 struct ctf_field_class_struct *struct_fc, const char *name)
374 {
375 struct ctf_named_field_class *named_fc = NULL;
376 struct ctf_field_class_int *int_fc = NULL;
377
378 if (!struct_fc) {
379 goto end;
380 }
381
382 named_fc = ctf_field_class_struct_borrow_member_by_name(struct_fc, name);
383 if (!named_fc) {
384 goto end;
385 }
386
387 if (named_fc->fc->type != CTF_FIELD_CLASS_TYPE_INT &&
388 named_fc->fc->type != CTF_FIELD_CLASS_TYPE_ENUM) {
389 goto end;
390 }
391
392 int_fc = (void *) named_fc->fc;
393
394 end:
395 return int_fc;
396 }
397
398 static inline
399 bt_event_class *ctf_event_class_to_ir(struct ctf_event_class *ec,
400 bt_stream_class *ir_sc, struct ctf_trace_class *tc,
401 struct ctf_stream_class *sc)
402 {
403 int ret;
404 bt_event_class *ir_ec = NULL;
405 bt_trace_class *ir_tc = bt_stream_class_borrow_trace_class(ir_sc);
406
407 if (ec->is_translated) {
408 ir_ec = bt_stream_class_borrow_event_class_by_id(
409 ir_sc, ec->id);
410 BT_ASSERT(ir_ec);
411 goto end;
412 }
413
414 ir_ec = bt_event_class_create_with_id(ir_sc, ec->id);
415 BT_ASSERT(ir_ec);
416 bt_event_class_put_ref(ir_ec);
417
418 if (ec->spec_context_fc) {
419 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
420 ec->spec_context_fc, tc, sc, ec);
421
422 if (ir_fc) {
423 ret = bt_event_class_set_specific_context_field_class(
424 ir_ec, ir_fc);
425 BT_ASSERT(ret == 0);
426 bt_field_class_put_ref(ir_fc);
427 }
428 }
429
430 if (ec->payload_fc) {
431 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
432 ec->payload_fc, tc, sc, ec);
433
434 if (ir_fc) {
435 ret = bt_event_class_set_payload_field_class(ir_ec,
436 ir_fc);
437 BT_ASSERT(ret == 0);
438 bt_field_class_put_ref(ir_fc);
439 }
440 }
441
442 if (ec->name->len > 0) {
443 ret = bt_event_class_set_name(ir_ec, ec->name->str);
444 BT_ASSERT(ret == 0);
445 }
446
447 if (ec->emf_uri->len > 0) {
448 ret = bt_event_class_set_emf_uri(ir_ec, ec->emf_uri->str);
449 BT_ASSERT(ret == 0);
450 }
451
452 if (ec->log_level != -1) {
453 bt_event_class_set_log_level(ir_ec, ec->log_level);
454 }
455
456 ec->is_translated = true;
457 ec->ir_ec = ir_ec;
458
459 end:
460 return ir_ec;
461 }
462
463
464 static inline
465 bt_stream_class *ctf_stream_class_to_ir(struct ctf_stream_class *sc,
466 bt_trace_class *ir_tc, struct ctf_trace_class *tc)
467 {
468 int ret;
469 bt_stream_class *ir_sc = NULL;
470 struct ctf_field_class_int *int_fc;
471
472 if (sc->is_translated) {
473 ir_sc = bt_trace_class_borrow_stream_class_by_id(ir_tc, sc->id);
474 BT_ASSERT(ir_sc);
475 goto end;
476 }
477
478 ir_sc = bt_stream_class_create_with_id(ir_tc, sc->id);
479 BT_ASSERT(ir_sc);
480 bt_stream_class_put_ref(ir_sc);
481
482 if (sc->packet_context_fc) {
483 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
484 sc->packet_context_fc, tc, sc, NULL);
485
486 if (ir_fc) {
487 ret = bt_stream_class_set_packet_context_field_class(
488 ir_sc, ir_fc);
489 BT_ASSERT(ret == 0);
490 bt_field_class_put_ref(ir_fc);
491 }
492 }
493
494 if (sc->event_header_fc) {
495 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
496 sc->event_header_fc, tc, sc, NULL);
497
498 if (ir_fc) {
499 ret = bt_stream_class_set_event_header_field_class(
500 ir_sc, ir_fc);
501 BT_ASSERT(ret == 0);
502 bt_field_class_put_ref(ir_fc);
503 }
504 }
505
506 if (sc->event_common_context_fc) {
507 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
508 sc->event_common_context_fc, tc, sc, NULL);
509
510 if (ir_fc) {
511 ret = bt_stream_class_set_event_common_context_field_class(
512 ir_sc, ir_fc);
513 BT_ASSERT(ret == 0);
514 bt_field_class_put_ref(ir_fc);
515 }
516 }
517
518 bt_stream_class_set_assigns_automatic_event_class_id(ir_sc,
519 BT_FALSE);
520 bt_stream_class_set_assigns_automatic_stream_id(ir_sc, BT_FALSE);
521
522 if (sc->default_clock_class) {
523 BT_ASSERT(sc->default_clock_class->ir_cc);
524 ret = bt_stream_class_set_default_clock_class(ir_sc,
525 sc->default_clock_class->ir_cc);
526 BT_ASSERT(ret == 0);
527 }
528
529 int_fc = borrow_named_int_field_class((void *) sc->packet_context_fc,
530 "events_discarded");
531 if (int_fc) {
532 if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_DISC_EV_REC_COUNTER_SNAPSHOT) {
533 bt_stream_class_set_packets_have_discarded_event_counter_snapshot(
534 ir_sc, BT_TRUE);
535 }
536 }
537
538 int_fc = borrow_named_int_field_class((void *) sc->packet_context_fc,
539 "packet_seq_num");
540 if (int_fc) {
541 if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_COUNTER_SNAPSHOT) {
542 bt_stream_class_set_packets_have_packet_counter_snapshot(
543 ir_sc, BT_TRUE);
544 }
545 }
546
547 int_fc = borrow_named_int_field_class((void *) sc->packet_context_fc,
548 "timestamp_begin");
549 if (int_fc) {
550 if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_BEGINNING_TIME) {
551 bt_stream_class_set_packets_have_default_beginning_clock_snapshot(
552 ir_sc, BT_TRUE);
553 }
554 }
555
556 int_fc = borrow_named_int_field_class((void *) sc->packet_context_fc,
557 "timestamp_end");
558 if (int_fc) {
559 if (int_fc->meaning == CTF_FIELD_CLASS_MEANING_PACKET_END_TIME) {
560 bt_stream_class_set_packets_have_default_end_clock_snapshot(
561 ir_sc, BT_TRUE);
562 }
563 }
564
565 sc->is_translated = true;
566 sc->ir_sc = ir_sc;
567
568 end:
569 return ir_sc;
570 }
571
572 static inline
573 void ctf_clock_class_to_ir(bt_clock_class *ir_cc, struct ctf_clock_class *cc)
574 {
575 int ret;
576
577 if (strlen(cc->name->str) > 0) {
578 ret = bt_clock_class_set_name(ir_cc, cc->name->str);
579 BT_ASSERT(ret == 0);
580 }
581
582 if (strlen(cc->description->str) > 0) {
583 ret = bt_clock_class_set_description(ir_cc, cc->description->str);
584 BT_ASSERT(ret == 0);
585 }
586
587 bt_clock_class_set_frequency(ir_cc, cc->frequency);
588 bt_clock_class_set_precision(ir_cc, cc->precision);
589 bt_clock_class_set_offset(ir_cc, cc->offset_seconds, cc->offset_cycles);
590
591 if (cc->has_uuid) {
592 bt_clock_class_set_uuid(ir_cc, cc->uuid);
593 }
594
595 bt_clock_class_set_is_absolute(ir_cc, cc->is_absolute);
596 }
597
598 static inline
599 int ctf_trace_class_to_ir(bt_trace_class *ir_tc, struct ctf_trace_class *tc)
600 {
601 int ret = 0;
602 uint64_t i;
603
604 if (tc->is_translated) {
605 goto end;
606 }
607
608 if (tc->packet_header_fc) {
609 bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
610 tc->packet_header_fc, tc, NULL, NULL);
611
612 if (ir_fc) {
613 ret = bt_trace_class_set_packet_header_field_class(
614 ir_tc, ir_fc);
615 BT_ASSERT(ret == 0);
616 bt_field_class_put_ref(ir_fc);
617 }
618 }
619
620 if (tc->is_uuid_set) {
621 bt_trace_class_set_uuid(ir_tc, tc->uuid);
622 }
623
624 for (i = 0; i < tc->env_entries->len; i++) {
625 struct ctf_trace_class_env_entry *env_entry =
626 ctf_trace_class_borrow_env_entry_by_index(tc, i);
627
628 switch (env_entry->type) {
629 case CTF_TRACE_CLASS_ENV_ENTRY_TYPE_INT:
630 ret = bt_trace_class_set_environment_entry_integer(
631 ir_tc, env_entry->name->str,
632 env_entry->value.i);
633 break;
634 case CTF_TRACE_CLASS_ENV_ENTRY_TYPE_STR:
635 ret = bt_trace_class_set_environment_entry_string(
636 ir_tc, env_entry->name->str,
637 env_entry->value.str->str);
638 break;
639 default:
640 abort();
641 }
642
643 if (ret) {
644 goto end;
645 }
646 }
647
648 for (i = 0; i < tc->clock_classes->len; i++) {
649 struct ctf_clock_class *cc = tc->clock_classes->pdata[i];
650
651 cc->ir_cc = bt_clock_class_create(ir_tc);
652 ctf_clock_class_to_ir(cc->ir_cc, cc);
653 }
654
655 bt_trace_class_set_assigns_automatic_stream_class_id(ir_tc,
656 BT_FALSE);
657 tc->is_translated = true;
658 tc->ir_tc = ir_tc;
659
660 end:
661 return ret;
662 }
663
664 BT_HIDDEN
665 int ctf_trace_class_translate(bt_trace_class *ir_tc,
666 struct ctf_trace_class *tc)
667 {
668 int ret = 0;
669 uint64_t i;
670
671 ret = ctf_trace_class_to_ir(ir_tc, tc);
672 if (ret) {
673 goto end;
674 }
675
676 for (i = 0; i < tc->stream_classes->len; i++) {
677 uint64_t j;
678 struct ctf_stream_class *sc = tc->stream_classes->pdata[i];
679 bt_stream_class *ir_sc;
680
681 ir_sc = ctf_stream_class_to_ir(sc, ir_tc, tc);
682 if (!ir_sc) {
683 ret = -1;
684 goto end;
685 }
686
687 for (j = 0; j < sc->event_classes->len; j++) {
688 struct ctf_event_class *ec = sc->event_classes->pdata[j];
689 bt_event_class *ir_ec;
690
691 ir_ec = ctf_event_class_to_ir(ec, ir_sc, tc, sc);
692 if (!ir_ec) {
693 ret = -1;
694 goto end;
695 }
696 }
697 }
698
699 end:
700 return ret;
701 }
This page took 0.045696 seconds and 4 git commands to generate.