2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_GRAPH_COMPONENT_H
8 #define BABELTRACE2_GRAPH_COMPONENT_H
10 #ifndef __BT_IN_BABELTRACE_H
11 # error "Please include <babeltrace2/babeltrace.h> instead."
14 #include <babeltrace2/graph/component-class.h>
15 #include <babeltrace2/types.h>
16 #include <babeltrace2/logging.h>
23 @defgroup api-comp Components
27 Source, filter, and sink components: nodes in a trace processing
30 A <strong><em>component</em></strong> is a node within a trace
33 @image html component.png
35 A component is \bt_comp_cls instance. Borrow the class of a
36 component with bt_component_borrow_class_const(),
37 bt_component_source_borrow_class_const(),
38 bt_component_filter_borrow_class_const(), and
39 bt_component_sink_borrow_class_const().
41 A component is a \ref api-fund-shared-object "shared object": get a new
42 reference with bt_component_get_ref() and put an existing reference with
43 bt_component_put_ref().
45 The common C type of a port is #bt_component.
47 There are three types of components, which come from the three types
51 <dt>\anchor api-comp-src Source component</dt>
53 A source component's \bt_msg_iter emits fresh \bt_p_msg.
55 A source component's specific type is #bt_component_source and its
56 class's type enumerator is #BT_COMPONENT_CLASS_TYPE_SOURCE.
58 \ref api-fund-c-typing "Upcast" the #bt_component_source type to the
59 #bt_component type with bt_component_source_as_component_const().
61 Get a new source component reference with
62 bt_component_source_get_ref() and put an existing one with
63 bt_component_source_put_ref().
65 A source component has \bt_p_oport only.
67 Get the number of output ports a source component has with
68 bt_component_source_get_output_port_count().
70 Borrow a source component's output port by index with
71 bt_component_source_borrow_output_port_by_index_const() or by name
72 with bt_component_source_borrow_output_port_by_name_const().
75 <dt>\anchor api-comp-flt Filter component</dt>
77 A filter component's message iterator emits fresh and transformed
78 messages. It can also discard existing messages.
80 A filter component's specific type is #bt_component_filter and its
81 class's type enumerator is #BT_COMPONENT_CLASS_TYPE_FILTER.
83 \ref api-fund-c-typing "Upcast" the #bt_component_filter type to the
84 #bt_component type with bt_component_filter_as_component_const().
86 Get a new filter component reference with
87 bt_component_filter_get_ref() and put an existing one with
88 bt_component_filter_put_ref().
90 A filter component has \bt_p_iport and \bt_p_oport.
92 Get the number of output ports a filter component has with
93 bt_component_filter_get_output_port_count().
95 Borrow a filter component's output port by index with
96 bt_component_filter_borrow_output_port_by_index_const() or by name
97 with bt_component_filter_borrow_output_port_by_name_const().
99 Get the number of input ports a filter component has with
100 bt_component_filter_get_input_port_count().
102 Borrow a filter component's input port by index with
103 bt_component_filter_borrow_input_port_by_index_const() or by name
104 with bt_component_filter_borrow_input_port_by_name_const().
107 <dt>\anchor api-comp-sink Sink component</dt>
109 A sink component consumes messages from a source or filter message
112 A filter component's specific type is #bt_component_sink and its
113 class's type enumerator is #BT_COMPONENT_CLASS_TYPE_SINK.
115 \ref api-fund-c-typing "Upcast" the #bt_component_sink type to the
116 #bt_component type with bt_component_sink_as_component_const().
118 Get a new sink component reference with bt_component_sink_get_ref()
119 and put an existing one with bt_component_sink_put_ref().
121 A sink component has \bt_p_iport only.
123 Get the number of input ports a sink component has with
124 bt_component_sink_get_input_port_count().
126 Borrow a sink component's input port by index with
127 bt_component_sink_borrow_input_port_by_index_const() or by name
128 with bt_component_sink_borrow_input_port_by_name_const().
132 Get a component's class type enumerator with
133 bt_component_get_class_type(). You can also use the
134 bt_component_is_source(), bt_component_is_filter(), and
135 bt_component_is_sink() helper functions.
137 You cannot directly create a component: there are no
138 <code>bt_component_*_create()</code> functions. A trace processing
139 \bt_graph creates a component from a \bt_comp_cls when you call one of
140 the <code>bt_graph_add_*_component*()</code> functions. Those functions
141 also return a borrowed reference of the created component through their
142 \bt_p{component} parameter.
146 A component has the following common properties:
150 \anchor api-comp-prop-name
154 Name of the component.
156 Each component has a unique name within a given trace processing
159 A component's name is set when you
160 \ref api-graph-lc-add "add it to a graph" with one of the
161 <code>bt_graph_add_*_component*()</code> functions (\bt_p{name}
162 parameter); you cannot change it afterwards.
164 Get a component's name with bt_component_get_name().
168 \anchor api-comp-prop-log-lvl
172 Logging level of the component (and its message iterators, if any).
174 A component's logging level is set when you
175 \ref api-graph-lc-add "add it to a trace processing graph" with one
176 of the <code>bt_graph_add_*_component*()</code> functions
177 (\bt_p{logging_level} parameter); as of
178 \bt_name_version_min_maj, you cannot change it afterwards.
180 Get a component's logging level with
181 bt_component_get_logging_level().
192 @typedef struct bt_component bt_component;
197 @typedef struct bt_component_source bt_component_source;
202 @typedef struct bt_component_filter bt_component_filter;
207 @typedef struct bt_component_sink bt_component_sink;
216 @name Class type query
222 Returns the type enumerator of the \ref api-comp-cls "class" of
223 the component \bt_p{component}.
226 Component of which to get the class's type enumerator.
229 Type enumerator of the class of \bt_p{component}.
231 @bt_pre_not_null{component}
233 @sa bt_component_is_source() —
234 Returns whether or not a component is a \bt_src_comp.
235 @sa bt_component_is_filter() —
236 Returns whether or not a component is a \bt_flt_comp.
237 @sa bt_component_is_sink() —
238 Returns whether or not a component is a \bt_sink_comp.
240 extern bt_component_class_type
bt_component_get_class_type(
241 const bt_component
*component
);
245 Returns whether or not the component \bt_p{component} is a
252 #BT_TRUE if \bt_p{component} is a source component.
254 @bt_pre_not_null{component}
256 @sa bt_component_get_class_type() —
257 Returns the type enumerator of a component's class.
260 bt_bool
bt_component_is_source(const bt_component
*component
)
262 return bt_component_get_class_type(component
) ==
263 BT_COMPONENT_CLASS_TYPE_SOURCE
;
268 Returns whether or not the component \bt_p{component} is a
275 #BT_TRUE if \bt_p{component} is a filter component.
277 @bt_pre_not_null{component}
279 @sa bt_component_get_class_type() —
280 Returns the type enumerator of a component's class.
283 bt_bool
bt_component_is_filter(const bt_component
*component
)
285 return bt_component_get_class_type(component
) ==
286 BT_COMPONENT_CLASS_TYPE_FILTER
;
291 Returns whether or not the component \bt_p{component} is a
298 #BT_TRUE if \bt_p{component} is a sink component.
300 @bt_pre_not_null{component}
302 @sa bt_component_get_class_type() —
303 Returns the type enumerator of a component's class.
306 bt_bool
bt_component_is_sink(const bt_component
*component
)
308 return bt_component_get_class_type(component
) ==
309 BT_COMPONENT_CLASS_TYPE_SINK
;
315 @name Common class access
321 Borrows the \ref api-comp-cls "class" of the component
325 Component of which to borrow the class.
328 \em Borrowed reference of the class of \bt_p{component}.
330 @bt_pre_not_null{component}
332 extern const bt_component_class
*bt_component_borrow_class_const(
333 const bt_component
*component
);
338 @name Common properties
344 Returns the name of the component \bt_p{component}.
346 See the \ref api-comp-prop-name "name" property.
349 Component of which to get the name.
353 Name of \bt_p{component}.
355 The returned pointer remains valid as long as \bt_p{component}
359 @bt_pre_not_null{component}
361 extern const char *bt_component_get_name(const bt_component
*component
);
365 Returns the logging level of the component \bt_p{component} and its
366 \bt_p_msg_iter, if any.
368 See the \ref api-comp-prop-log-lvl "logging level" property.
371 Component of which to get the logging level.
374 Logging level of \bt_p{component}.
376 @bt_pre_not_null{component}
378 extern bt_logging_level
bt_component_get_logging_level(
379 const bt_component
*component
);
384 @name Common reference count
390 Increments the \ref api-fund-shared-object "reference count" of
391 the component \bt_p{component}.
395 Component of which to increment the reference count.
400 @sa bt_component_put_ref() —
401 Decrements the reference count of a component.
403 extern void bt_component_get_ref(const bt_component
*component
);
407 Decrements the \ref api-fund-shared-object "reference count" of
408 the component \bt_p{component}.
412 Component of which to decrement the reference count.
417 @sa bt_component_get_ref() —
418 Increments the reference count of a component.
420 extern void bt_component_put_ref(const bt_component
*component
);
424 Decrements the reference count of the component
425 \bt_p{_component}, and then sets \bt_p{_component} to \c NULL.
429 Component of which to decrement the reference count.
434 @bt_pre_assign_expr{_component}
436 #define BT_COMPONENT_PUT_REF_AND_RESET(_component) \
438 bt_component_put_ref(_component); \
439 (_component) = NULL; \
444 Decrements the reference count of the component \bt_p{_dst}, sets
445 \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
447 This macro effectively moves a component reference from the expression
448 \bt_p{_src} to the expression \bt_p{_dst}, putting the existing
449 \bt_p{_dst} reference.
453 Destination expression.
464 @bt_pre_assign_expr{_dst}
465 @bt_pre_assign_expr{_src}
467 #define BT_COMPONENT_MOVE_REF(_dst, _src) \
469 bt_component_put_ref(_dst); \
477 @name Source component class access
483 Borrows the \ref api-comp-cls "class" of the \bt_src_comp
487 Source component of which to borrow the class.
490 \em Borrowed reference of the class of \bt_p{component}.
492 @bt_pre_not_null{component}
494 extern const bt_component_class_source
*
495 bt_component_source_borrow_class_const(
496 const bt_component_source
*component
);
501 @name Source component upcast
507 \ref api-fund-c-typing "Upcasts" the \bt_src_comp \bt_p{component}
508 to the common #bt_component type.
512 Source component to upcast.
518 \bt_p{component} as a common component.
521 const bt_component
*bt_component_source_as_component_const(
522 const bt_component_source
*component
)
524 return __BT_UPCAST_CONST(bt_component
, component
);
530 @name Source component port access
536 Returns the number of \bt_p_oport that the \bt_src_comp
537 \bt_p{component} has.
540 Source component of which to get the number of output ports.
543 Number of output ports that \bt_p{component} has.
545 @bt_pre_not_null{component}
547 extern uint64_t bt_component_source_get_output_port_count(
548 const bt_component_source
*component
);
552 Borrows the \bt_oport at index \bt_p{index} from the
553 \bt_src_comp \bt_p{component}.
556 Source component from which to borrow the output port at index
559 Index of the output port to borrow from \bt_p{component}.
563 \em Borrowed reference of the output port of
564 \bt_p{component} at index \bt_p{index}.
566 The returned pointer remains valid as long as \bt_p{component}
570 @bt_pre_not_null{component}
572 \bt_p{index} is less than the number of output ports
573 \bt_p{component} has (as returned by
574 bt_component_source_get_output_port_count()).
576 @sa bt_component_source_get_output_port_count() —
577 Returns the number of output ports that a source component has.
579 extern const bt_port_output
*
580 bt_component_source_borrow_output_port_by_index_const(
581 const bt_component_source
*component
, uint64_t index
);
585 Borrows the \bt_oport named \bt_p{name} from the \bt_src_comp
588 If \bt_p{component} has no output port named \bt_p{name}, this function
592 Source component from which to borrow the output port
595 Name of the output port to borrow from \bt_p{component}.
599 \em Borrowed reference of the output port of
600 \bt_p{component} named \bt_p{name}, or \c NULL if none.
602 The returned pointer remains valid as long as \bt_p{component}
606 @bt_pre_not_null{component}
607 @bt_pre_not_null{name}
609 extern const bt_port_output
*
610 bt_component_source_borrow_output_port_by_name_const(
611 const bt_component_source
*component
, const char *name
);
616 @name Source component reference count
622 Increments the \ref api-fund-shared-object "reference count" of
623 the \bt_src_comp \bt_p{component}.
627 Source component of which to increment the reference count.
632 @sa bt_component_source_put_ref() —
633 Decrements the reference count of a source component.
635 extern void bt_component_source_get_ref(
636 const bt_component_source
*component
);
640 Decrements the \ref api-fund-shared-object "reference count" of
641 the \bt_src_comp \bt_p{component}.
645 Source component of which to decrement the reference count.
650 @sa bt_component_source_get_ref() —
651 Increments the reference count of a source component.
653 extern void bt_component_source_put_ref(
654 const bt_component_source
*component
);
658 Decrements the reference count of the \bt_src_comp
659 \bt_p{_component}, and then sets \bt_p{_component} to \c NULL.
663 Source component of which to decrement the reference count.
668 @bt_pre_assign_expr{_component}
670 #define BT_COMPONENT_SOURCE_PUT_REF_AND_RESET(_component) \
672 bt_component_source_put_ref(_component); \
673 (_component) = NULL; \
678 Decrements the reference count of the \bt_src_comp \bt_p{_dst}, sets
679 \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
681 This macro effectively moves a source component reference from the
682 expression \bt_p{_src} to the expression \bt_p{_dst}, putting the
683 existing \bt_p{_dst} reference.
687 Destination expression.
698 @bt_pre_assign_expr{_dst}
699 @bt_pre_assign_expr{_src}
701 #define BT_COMPONENT_SOURCE_MOVE_REF(_dst, _src) \
703 bt_component_source_put_ref(_dst); \
711 @name Filter component class access
717 Borrows the \ref api-comp-cls "class" of the \bt_flt_comp
721 Filter component of which to borrow the class.
724 \em Borrowed reference of the class of \bt_p{component}.
726 @bt_pre_not_null{component}
728 extern const bt_component_class_filter
*
729 bt_component_filter_borrow_class_const(
730 const bt_component_filter
*component
);
735 @name Filter component upcast
741 \ref api-fund-c-typing "Upcasts" the \bt_flt_comp \bt_p{component}
742 to the common #bt_component type.
746 Filter component to upcast.
752 \bt_p{component} as a common component.
755 const bt_component
*bt_component_filter_as_component_const(
756 const bt_component_filter
*component
)
758 return __BT_UPCAST_CONST(bt_component
, component
);
764 @name Filter component port access
770 Returns the number of \bt_p_iport that the \bt_flt_comp
771 \bt_p{component} has.
774 Filter component of which to get the number of input ports.
777 Number of input ports that \bt_p{component} has.
779 @bt_pre_not_null{component}
781 extern uint64_t bt_component_filter_get_input_port_count(
782 const bt_component_filter
*component
);
786 Borrows the \bt_iport at index \bt_p{index} from the
787 \bt_flt_comp \bt_p{component}.
790 Filter component from which to borrow the input port at index
793 Index of the input port to borrow from \bt_p{component}.
797 \em Borrowed reference of the input port of
798 \bt_p{component} at index \bt_p{index}.
800 The returned pointer remains valid as long as \bt_p{component}
804 @bt_pre_not_null{component}
806 \bt_p{index} is less than the number of input ports
807 \bt_p{component} has (as returned by
808 bt_component_filter_get_input_port_count()).
810 @sa bt_component_filter_get_input_port_count() —
811 Returns the number of input ports that a filter component has.
813 extern const bt_port_input
*
814 bt_component_filter_borrow_input_port_by_index_const(
815 const bt_component_filter
*component
, uint64_t index
);
819 Borrows the \bt_iport named \bt_p{name} from the \bt_flt_comp
822 If \bt_p{component} has no input port named \bt_p{name}, this function
826 Filter component from which to borrow the input port
829 Name of the input port to borrow from \bt_p{component}.
833 \em Borrowed reference of the input port of
834 \bt_p{component} named \bt_p{name}, or \c NULL if none.
836 The returned pointer remains valid as long as \bt_p{component}
840 @bt_pre_not_null{component}
841 @bt_pre_not_null{name}
843 extern const bt_port_input
*
844 bt_component_filter_borrow_input_port_by_name_const(
845 const bt_component_filter
*component
, const char *name
);
849 Returns the number of \bt_p_oport that the \bt_flt_comp
850 \bt_p{component} has.
853 Filter component of which to get the number of output ports.
856 Number of output ports that \bt_p{component} has.
858 @bt_pre_not_null{component}
860 extern uint64_t bt_component_filter_get_output_port_count(
861 const bt_component_filter
*component
);
865 Borrows the \bt_oport at index \bt_p{index} from the
866 \bt_flt_comp \bt_p{component}.
869 Filter component from which to borrow the output port at index
872 Index of the output port to borrow from \bt_p{component}.
876 \em Borrowed reference of the output port of
877 \bt_p{component} at index \bt_p{index}.
879 The returned pointer remains valid as long as \bt_p{component}
883 @bt_pre_not_null{component}
885 \bt_p{index} is less than the number of output ports
886 \bt_p{component} has (as returned by
887 bt_component_filter_get_output_port_count()).
889 @sa bt_component_filter_get_output_port_count() —
890 Returns the number of output ports that a filter component has.
892 extern const bt_port_output
*
893 bt_component_filter_borrow_output_port_by_index_const(
894 const bt_component_filter
*component
, uint64_t index
);
898 Borrows the \bt_oport named \bt_p{name} from the \bt_flt_comp
901 If \bt_p{component} has no output port named \bt_p{name}, this function
905 Filter component from which to borrow the output port
908 Name of the output port to borrow from \bt_p{component}.
912 \em Borrowed reference of the output port of
913 \bt_p{component} named \bt_p{name}, or \c NULL if none.
915 The returned pointer remains valid as long as \bt_p{component}
919 @bt_pre_not_null{component}
920 @bt_pre_not_null{name}
922 extern const bt_port_output
*
923 bt_component_filter_borrow_output_port_by_name_const(
924 const bt_component_filter
*component
, const char *name
);
929 @name Filter component reference count
935 Increments the \ref api-fund-shared-object "reference count" of
936 the \bt_flt_comp \bt_p{component}.
940 Filter component of which to increment the reference count.
945 @sa bt_component_filter_put_ref() —
946 Decrements the reference count of a filter component.
948 extern void bt_component_filter_get_ref(
949 const bt_component_filter
*component
);
953 Decrements the \ref api-fund-shared-object "reference count" of
954 the \bt_flt_comp \bt_p{component}.
958 Filter component of which to decrement the reference count.
963 @sa bt_component_filter_get_ref() —
964 Increments the reference count of a filter component.
966 extern void bt_component_filter_put_ref(
967 const bt_component_filter
*component
);
971 Decrements the reference count of the \bt_flt_comp
972 \bt_p{_component}, and then sets \bt_p{_component} to \c NULL.
976 Filter component of which to decrement the reference count.
981 @bt_pre_assign_expr{_component}
983 #define BT_COMPONENT_FILTER_PUT_REF_AND_RESET(_component) \
985 bt_component_filter_put_ref(_component); \
986 (_component) = NULL; \
991 Decrements the reference count of the \bt_flt_comp \bt_p{_dst}, sets
992 \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
994 This macro effectively moves a filter component reference from the
995 expression \bt_p{_src} to the expression \bt_p{_dst}, putting the
996 existing \bt_p{_dst} reference.
1000 Destination expression.
1002 Can contain \c NULL.
1008 Can contain \c NULL.
1011 @bt_pre_assign_expr{_dst}
1012 @bt_pre_assign_expr{_src}
1014 #define BT_COMPONENT_FILTER_MOVE_REF(_dst, _src) \
1016 bt_component_filter_put_ref(_dst); \
1024 @name Sink component class access
1030 Borrows the \ref api-comp-cls "class" of the \bt_sink_comp
1033 @param[in] component
1034 Sink component of which to borrow the class.
1037 \em Borrowed reference of the class of \bt_p{component}.
1039 @bt_pre_not_null{component}
1041 extern const bt_component_class_sink
*
1042 bt_component_sink_borrow_class_const(
1043 const bt_component_sink
*component
);
1048 @name Sink component upcast
1054 \ref api-fund-c-typing "Upcasts" the \bt_sink_comp \bt_p{component}
1055 to the common #bt_component type.
1057 @param[in] component
1059 Sink component to upcast.
1065 \bt_p{component} as a common component.
1068 const bt_component
*bt_component_sink_as_component_const(
1069 const bt_component_sink
*component
)
1071 return __BT_UPCAST_CONST(bt_component
, component
);
1077 @name Sink component port access
1083 Returns the number of \bt_p_iport that the \bt_sink_comp
1084 \bt_p{component} has.
1086 @param[in] component
1087 Sink component of which to get the number of input ports.
1090 Number of input ports that \bt_p{component} has.
1092 @bt_pre_not_null{component}
1094 extern uint64_t bt_component_sink_get_input_port_count(
1095 const bt_component_sink
*component
);
1099 Borrows the \bt_iport at index \bt_p{index} from the
1100 \bt_sink_comp \bt_p{component}.
1102 @param[in] component
1103 Sink component from which to borrow the input port at index
1106 Index of the input port to borrow from \bt_p{component}.
1110 \em Borrowed reference of the input port of
1111 \bt_p{component} at index \bt_p{index}.
1113 The returned pointer remains valid as long as \bt_p{component}
1117 @bt_pre_not_null{component}
1119 \bt_p{index} is less than the number of input ports
1120 \bt_p{component} has (as returned by
1121 bt_component_sink_get_input_port_count()).
1123 @sa bt_component_sink_get_input_port_count() —
1124 Returns the number of input ports that a sink component has.
1126 extern const bt_port_input
*
1127 bt_component_sink_borrow_input_port_by_index_const(
1128 const bt_component_sink
*component
, uint64_t index
);
1132 Borrows the \bt_oport named \bt_p{name} from the \bt_sink_comp
1135 If \bt_p{component} has no output port named \bt_p{name}, this function
1138 @param[in] component
1139 Sink component from which to borrow the output port
1142 Name of the output port to borrow from \bt_p{component}.
1146 \em Borrowed reference of the output port of
1147 \bt_p{component} named \bt_p{name}, or \c NULL if none.
1149 The returned pointer remains valid as long as \bt_p{component}
1153 @bt_pre_not_null{component}
1154 @bt_pre_not_null{name}
1156 extern const bt_port_input
*
1157 bt_component_sink_borrow_input_port_by_name_const(
1158 const bt_component_sink
*component
, const char *name
);
1163 @name Sink component reference count
1169 Increments the \ref api-fund-shared-object "reference count" of
1170 the \bt_sink_comp \bt_p{component}.
1172 @param[in] component
1174 Sink component of which to increment the reference count.
1179 @sa bt_component_sink_put_ref() —
1180 Decrements the reference count of a sink component.
1182 extern void bt_component_sink_get_ref(
1183 const bt_component_sink
*component
);
1187 Decrements the \ref api-fund-shared-object "reference count" of
1188 the \bt_sink_comp \bt_p{component}.
1190 @param[in] component
1192 Sink component of which to decrement the reference count.
1197 @sa bt_component_sink_get_ref() —
1198 Increments the reference count of a sink component.
1200 extern void bt_component_sink_put_ref(
1201 const bt_component_sink
*component
);
1205 Decrements the reference count of the \bt_sink_comp
1206 \bt_p{_component}, and then sets \bt_p{_component} to \c NULL.
1210 Sink component of which to decrement the reference count.
1212 Can contain \c NULL.
1215 @bt_pre_assign_expr{_component}
1217 #define BT_COMPONENT_SINK_PUT_REF_AND_RESET(_component) \
1219 bt_component_sink_put_ref(_component); \
1220 (_component) = NULL; \
1225 Decrements the reference count of the \bt_sink_comp \bt_p{_dst},
1226 sets \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to
1229 This macro effectively moves a sink component reference from the
1230 expression \bt_p{_src} to the expression \bt_p{_dst}, putting the
1231 existing \bt_p{_dst} reference.
1235 Destination expression.
1237 Can contain \c NULL.
1243 Can contain \c NULL.
1246 @bt_pre_assign_expr{_dst}
1247 @bt_pre_assign_expr{_src}
1249 #define BT_COMPONENT_SINK_MOVE_REF(_dst, _src) \
1251 bt_component_sink_put_ref(_dst); \
1264 #endif /* BABELTRACE2_GRAPH_COMPONENT_H */