2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_TRACE_IR_EVENT_CLASS_H
8 #define BABELTRACE2_TRACE_IR_EVENT_CLASS_H
10 #ifndef __BT_IN_BABELTRACE_H
11 # error "Please include <babeltrace2/babeltrace.h> instead."
16 #include <babeltrace2/types.h>
23 @defgroup api-tir-ev-cls Event class
29 An <strong><em>event class</em></strong> is the class of \bt_p_ev,
30 which \bt_p_ev_msg contain:
32 @image html trace-structure.png
34 In the illustration above, notice that:
36 - A \bt_stream is a conceptual \ref api-msg-seq "sequence of messages",
37 some of which are \bt_p_ev_msg.
38 - An event message contains an \bt_ev.
39 - An event is an instance of an event class.
40 - The \ref api-tir-ev-prop-payload "payload field" of an event is an
41 instance of the \ref api-tir-ev-cls-prop-p-fc "payload field class"
42 which an event class contains.
44 An event class is a \ref api-tir "trace IR" metadata object.
46 An event class is a \ref api-fund-shared-object "shared object": get a
47 new reference with bt_event_class_get_ref() and put an existing
48 reference with bt_event_class_put_ref().
50 Some library functions \ref api-fund-freezing "freeze" event classes on
51 success. The documentation of those functions indicate this
54 The type of an event class is #bt_event_class.
56 A \bt_stream_cls contains event classes. All the event classes of a
57 given stream class have unique
58 \ref api-tir-ev-cls-prop-id "numeric IDs". Borrow the stream class
59 which contains an event class with bt_event_class_borrow_stream_class()
60 or bt_event_class_borrow_stream_class_const().
62 To create a default event class:
66 If bt_stream_class_assigns_automatic_event_class_id() returns
67 #BT_TRUE (the default) for the stream class to use
69 <dd>Use bt_event_class_create().</dd>
72 If bt_stream_class_assigns_automatic_event_class_id() returns
73 #BT_FALSE for the stream class to use
75 <dd>Use bt_event_class_create_with_id().</dd>
80 An event class has the following properties:
83 <dt>\anchor api-tir-ev-cls-prop-id Numeric ID</dt>
85 Numeric ID, unique amongst the numeric IDs of the event class's
86 \bt_stream_cls's event classes.
88 Depending on whether or not the event class's stream class
89 automatically assigns event class IDs
90 (see bt_stream_class_assigns_automatic_event_class_id()),
91 set the event class's numeric ID on creation with
92 bt_event_class_create() or
93 bt_event_class_create_with_id().
95 You cannot change the numeric ID once the event class is created.
97 Get an event class's numeric ID with bt_event_class_get_id().
100 <dt>\anchor api-tir-ev-cls-prop-name \bt_dt_opt Name</dt>
102 Name of the event class.
104 Use bt_event_class_set_name() and bt_event_class_get_name().
107 <dt>\anchor api-tir-ev-cls-prop-log-lvl \bt_dt_opt Log level</dt>
109 Log level of the event class.
111 The event class's log level corresponds to the log level of the
112 tracer's original instrumentation point.
114 Use bt_event_class_set_log_level() and
115 bt_event_class_get_log_level().
119 \anchor api-tir-ev-cls-prop-emf-uri
120 \bt_dt_opt Eclipse Modeling Framework (EMF) URI
123 EMF URI of the event class.
125 Use bt_event_class_set_emf_uri() and
126 bt_event_class_get_emf_uri().
130 \anchor api-tir-ev-cls-prop-p-fc
131 \bt_dt_opt Payload field class
134 Payload \bt_fc of the event class.
136 The payload of an event class instance (\bt_ev) contains the
139 Use bt_event_class_set_payload_field_class()
140 bt_event_class_borrow_payload_field_class(),
141 and bt_event_class_borrow_payload_field_class_const().
145 \anchor api-tir-ev-cls-prop-sc-fc
146 \bt_dt_opt Specific context field class
149 Specific context \bt_fc of the event class.
151 The specific context of an event class instance (\bt_ev) contains
152 any contextual data of which the layout is specific to the
153 event's class and which does not belong to the payload.
155 Use bt_event_class_set_specific_context_field_class()
156 bt_event_class_borrow_specific_context_field_class(),
157 and bt_event_class_borrow_specific_context_field_class_const().
161 \anchor api-tir-ev-cls-prop-user-attrs
162 \bt_dt_opt User attributes
165 User attributes of the event class.
167 User attributes are custom attributes attached to an event class.
169 Use bt_event_class_set_user_attributes(),
170 bt_event_class_borrow_user_attributes(), and
171 bt_event_class_borrow_user_attributes_const().
182 @typedef struct bt_event_class bt_event_class;
197 Creates a default event class and adds it to the \bt_stream_cls
202 Only use this function if
205 bt_stream_class_assigns_automatic_event_class_id(stream_class)
210 Otherwise, use bt_event_class_create_with_id().
213 On success, the returned event class has the following property values:
220 <td>\ref api-tir-ev-cls-prop-id "Numeric ID"
221 <td>Automatically assigned by \bt_p{stream_class}
223 <td>\ref api-tir-ev-cls-prop-name "Name"
226 <td>\ref api-tir-ev-cls-prop-log-lvl "Log level"
229 <td>\ref api-tir-ev-cls-prop-emf-uri "EMF URI"
232 <td>\ref api-tir-ev-cls-prop-p-fc "Payload field class"
235 <td>\ref api-tir-ev-cls-prop-sc-fc "Specific context field class"
238 <td>\ref api-tir-ev-cls-prop-user-attrs "User attributes"
239 <td>Empty \bt_map_val
242 @param[in] stream_class
243 Stream class to add the created event class to.
246 New event class reference, or \c NULL on memory error.
248 @bt_pre_not_null{stream_class}
250 <code>bt_stream_class_assigns_automatic_event_class_id(stream_class)</code>
253 @bt_post_success_frozen{stream_class}
255 @sa bt_event_class_create_with_id() —
256 Creates an event class with a specific numeric ID and adds it to a
259 extern bt_event_class
*bt_event_class_create(
260 bt_stream_class
*stream_class
);
264 Creates a default event class with the numeric ID \bt_p{id} and adds
265 it to the \bt_stream_cls \bt_p{stream_class}.
269 Only use this function if
272 bt_stream_class_assigns_automatic_event_class_id(stream_class)
277 Otherwise, use bt_event_class_create().
280 On success, the returned event class has the following property values:
287 <td>\ref api-tir-ev-cls-prop-id "Numeric ID"
290 <td>\ref api-tir-ev-cls-prop-name "Name"
293 <td>\ref api-tir-ev-cls-prop-log-lvl "Log level"
296 <td>\ref api-tir-ev-cls-prop-emf-uri "EMF URI"
299 <td>\ref api-tir-ev-cls-prop-p-fc "Payload field class"
302 <td>\ref api-tir-ev-cls-prop-sc-fc "Specific context field class"
305 <td>\ref api-tir-ev-cls-prop-user-attrs "User attributes"
306 <td>Empty \bt_map_val
309 @param[in] stream_class
310 Stream class to add the created event class to.
312 Numeric ID of the event class to create and add to
316 New event class reference, or \c NULL on memory error.
318 @bt_pre_not_null{stream_class}
320 <code>bt_stream_class_assigns_automatic_event_class_id(stream_class)</code>
323 \bt_p{stream_class} does not contain an event class with the numeric
326 @bt_post_success_frozen{stream_class}
328 @sa bt_event_class_create() —
329 Creates an event class with an automatic numeric ID and adds it to a
332 extern bt_event_class
*bt_event_class_create_with_id(
333 bt_stream_class
*stream_class
, uint64_t id
);
338 @name Stream class access
344 Borrows the \bt_stream_cls which contains the event class
347 @param[in] event_class
348 Event class from which to borrow the stream class which contains it.
351 Stream class which contains \bt_p{event_class}.
353 @bt_pre_not_null{event_class}
355 @sa bt_event_class_borrow_stream_class_const() —
356 \c const version of this function.
358 extern bt_stream_class
*bt_event_class_borrow_stream_class(
359 bt_event_class
*event_class
);
363 Borrows the \bt_stream_cls which contains the event class
364 \bt_p{event_class} (\c const version).
366 See bt_event_class_borrow_stream_class().
368 extern const bt_stream_class
*bt_event_class_borrow_stream_class_const(
369 const bt_event_class
*event_class
);
380 Returns the numeric ID of the event class \bt_p{event_class}.
382 See the \ref api-tir-ev-cls-prop-id "numeric ID" property.
384 @param[in] event_class
385 Event class of which to get the numeric ID.
388 Numeric ID of \bt_p{event_class}.
390 @bt_pre_not_null{event_class}
392 @sa bt_event_class_create_with_id() —
393 Creates an event class with a specific numeric ID and adds it to a
396 extern uint64_t bt_event_class_get_id(const bt_event_class
*event_class
);
400 Status codes for bt_event_class_set_name().
402 typedef enum bt_event_class_set_name_status
{
407 BT_EVENT_CLASS_SET_NAME_STATUS_OK
= __BT_FUNC_STATUS_OK
,
413 BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
414 } bt_event_class_set_name_status
;
418 Sets the name of the event class \bt_p{event_class} to
419 a copy of \bt_p{name}.
421 See the \ref api-tir-ev-cls-prop-name "name" property.
423 @param[in] event_class
424 Event class of which to set the name to \bt_p{name}.
426 New name of \bt_p{event_class} (copied).
428 @retval #BT_EVENT_CLASS_SET_NAME_STATUS_OK
430 @retval #BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR
433 @bt_pre_not_null{event_class}
434 @bt_pre_hot{event_class}
435 @bt_pre_not_null{name}
437 @sa bt_event_class_get_name() —
438 Returns the name of an event class.
440 extern bt_event_class_set_name_status
bt_event_class_set_name(
441 bt_event_class
*event_class
, const char *name
);
445 Returns the name of the event class \bt_p{event_class}.
447 See the \ref api-tir-ev-cls-prop-name "name" property.
449 If \bt_p{event_class} has no name, this function returns \c NULL.
451 @param[in] event_class
452 Event class of which to get the name.
456 Name of \bt_p{event_class}, or \c NULL if none.
458 The returned pointer remains valid as long as \bt_p{event_class}
462 @bt_pre_not_null{event_class}
464 @sa bt_event_class_set_name() —
465 Sets the name of an event class.
467 extern const char *bt_event_class_get_name(const bt_event_class
*event_class
);
471 Event class log level enumerators.
473 typedef enum bt_event_class_log_level
{
478 BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY
= 0,
482 Action must be taken immediately.
484 BT_EVENT_CLASS_LOG_LEVEL_ALERT
= 1,
490 BT_EVENT_CLASS_LOG_LEVEL_CRITICAL
= 2,
496 BT_EVENT_CLASS_LOG_LEVEL_ERROR
= 3,
502 BT_EVENT_CLASS_LOG_LEVEL_WARNING
= 4,
506 Normal, but significant, condition.
508 BT_EVENT_CLASS_LOG_LEVEL_NOTICE
= 5,
512 Informational message.
514 BT_EVENT_CLASS_LOG_LEVEL_INFO
= 6,
518 Debugging information with system-level scope
521 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM
= 7,
525 Debugging information with program-level scope
528 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM
= 8,
532 Debugging information with process-level scope
535 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS
= 9,
539 Debugging information with module (executable/library) scope
542 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE
= 10,
546 Debugging information with compilation unit scope
549 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT
= 11,
553 Debugging information with function-level scope.
555 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION
= 12,
559 Debugging information with function-level scope.
561 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE
= 13,
565 Debugging-level message.
567 BT_EVENT_CLASS_LOG_LEVEL_DEBUG
= 14,
568 } bt_event_class_log_level
;
572 Sets the log level of the event class \bt_p{event_class} to
575 See the \ref api-tir-ev-cls-prop-log-lvl "log level" property.
577 @param[in] event_class
578 Event class of which to set the log level to \bt_p{log_level}.
580 New log level of \bt_p{event_class}.
582 @bt_pre_not_null{event_class}
583 @bt_pre_hot{event_class}
585 @sa bt_event_class_get_log_level() —
586 Returns the log level of an event class.
588 extern void bt_event_class_set_log_level(bt_event_class
*event_class
,
589 bt_event_class_log_level log_level
);
593 Returns the log level of the event class \bt_p{event_class}.
595 See the \ref api-tir-ev-cls-prop-log-lvl "log level" property.
597 @param[in] event_class
598 Event class of which to get the log level.
599 @param[out] log_level
600 <strong>If this function returns
601 #BT_PROPERTY_AVAILABILITY_AVAILABLE</strong>, \bt_p{*log_level} is
602 the log level of \bt_p{event_class}.
604 @retval #BT_PROPERTY_AVAILABILITY_AVAILABLE
605 The log level of \bt_p{event_class} is available.
606 @retval #BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE
607 The log level of \bt_p{event_class} is not available.
609 @bt_pre_not_null{event_class}
610 @bt_pre_not_null{log_level}
612 @sa bt_event_class_set_log_level() —
613 Sets the log level of an event class.
615 extern bt_property_availability
bt_event_class_get_log_level(
616 const bt_event_class
*event_class
,
617 bt_event_class_log_level
*log_level
);
621 Status codes for bt_event_class_set_emf_uri().
623 typedef enum bt_event_class_set_emf_uri_status
{
628 BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK
= __BT_FUNC_STATUS_OK
,
634 BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
635 } bt_event_class_set_emf_uri_status
;
639 Sets the Eclipse Modeling Framework (EMF) URI of the event class
640 \bt_p{event_class} to a copy of \bt_p{emf_uri}.
642 See the \ref api-tir-ev-cls-prop-emf-uri "EMF URI" property.
644 @param[in] event_class
645 Event class of which to set the EMF URI to \bt_p{emf_uri}.
647 New EMF URI of \bt_p{event_class} (copied).
649 @retval #BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK
651 @retval #BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR
654 @bt_pre_not_null{event_class}
655 @bt_pre_hot{event_class}
656 @bt_pre_not_null{emf_uri}
658 @sa bt_event_class_get_emf_uri() —
659 Returns the EMF URI of an event class.
661 extern bt_event_class_set_emf_uri_status
bt_event_class_set_emf_uri(
662 bt_event_class
*event_class
, const char *emf_uri
);
666 Returns the Eclipse Modeling Framework (EMF) URI of the event
667 class \bt_p{event_class}.
669 See the \ref api-tir-ev-cls-prop-emf-uri "EMF URI" property.
671 If \bt_p{event_class} has no EMF URI, this function returns \c NULL.
673 @param[in] event_class
674 Event class of which to get the EMF URI.
678 EMF URI of \bt_p{event_class}, or \c NULL if none.
680 The returned pointer remains valid as long as \bt_p{event_class}
684 @bt_pre_not_null{event_class}
686 @sa bt_event_class_set_emf_uri() —
687 Sets the EMF URI of an event class.
689 extern const char *bt_event_class_get_emf_uri(
690 const bt_event_class
*event_class
);
694 Status codes for bt_event_class_set_payload_field_class() and
695 bt_event_class_set_specific_context_field_class().
697 typedef enum bt_event_class_set_field_class_status
{
702 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
= __BT_FUNC_STATUS_OK
,
708 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
709 } bt_event_class_set_field_class_status
;
713 Sets the payload \bt_fc of the event class
714 \bt_p{event_class} to \bt_p{field_class}.
716 See the \ref api-tir-ev-cls-prop-p-fc "payload field class" property.
718 @param[in] event_class
719 Event class of which to set the payload field class to
721 @param[in] field_class
722 New payload field class of \bt_p{event_class}.
724 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
726 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
729 @bt_pre_not_null{event_class}
730 @bt_pre_hot{event_class}
731 @bt_pre_not_null{field_class}
732 @bt_pre_is_struct_fc{field_class}
734 \bt_p{field_class}, or any of its contained field classes,
735 is not already part of a \bt_stream_cls or of an event class.
737 If any of the field classes recursively contained in
738 \bt_p{field_class} has a
739 \ref api-tir-fc-link "link to another field class", it must honor
740 the field class link rules.
742 @bt_post_success_frozen{field_class}
744 @sa bt_event_class_borrow_payload_field_class() —
745 Borrows the payload field class of an event class.
746 @sa bt_event_class_borrow_payload_field_class_const() —
747 Borrows the payload field class of an event class
750 extern bt_event_class_set_field_class_status
751 bt_event_class_set_payload_field_class(bt_event_class
*event_class
,
752 bt_field_class
*field_class
);
756 Borrows the payload \bt_fc from the event class \bt_p{event_class}.
758 See the \ref api-tir-ev-cls-prop-p-fc "payload field class" property.
760 If \bt_p{event_class} has no payload field class, this function
763 @param[in] event_class
764 Event class from which to borrow the payload field class.
767 \em Borrowed reference of the payload field class of
768 \bt_p{event_class}, or \c NULL if none.
770 @bt_pre_not_null{event_class}
772 @sa bt_event_class_set_payload_field_class() —
773 Sets the payload field class of an event class.
774 @sa bt_event_class_borrow_payload_field_class_const() —
775 \c const version of this function.
777 extern bt_field_class
*bt_event_class_borrow_payload_field_class(
778 bt_event_class
*event_class
);
782 Borrows the payload \bt_fc from the event class \bt_p{event_class}
785 See bt_event_class_borrow_payload_field_class().
787 extern const bt_field_class
*bt_event_class_borrow_payload_field_class_const(
788 const bt_event_class
*event_class
);
792 Sets the specific context \bt_fc of the event class
793 \bt_p{event_class} to \bt_p{field_class}.
795 See the \ref api-tir-ev-cls-prop-sc-fc "specific context field class"
798 @param[in] event_class
799 Event class of which to set the specific context field class to
801 @param[in] field_class
802 New specific context field class of \bt_p{event_class}.
804 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
806 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
809 @bt_pre_not_null{event_class}
810 @bt_pre_hot{event_class}
811 @bt_pre_not_null{field_class}
812 @bt_pre_is_struct_fc{field_class}
814 \bt_p{field_class}, or any of its contained field classes,
815 is not already part of a \bt_stream_cls or of an event class.
817 If any of the field classes recursively contained in
818 \bt_p{field_class} has a
819 \ref api-tir-fc-link "link to another field class", it must honor
820 the field class link rules.
822 @bt_post_success_frozen{field_class}
824 @sa bt_event_class_borrow_specific_context_field_class() —
825 Borrows the specific context field class of an event class.
826 @sa bt_event_class_borrow_specific_context_field_class_const() —
827 Borrows the specific context field class of an event class
830 extern bt_event_class_set_field_class_status
831 bt_event_class_set_specific_context_field_class(bt_event_class
*event_class
,
832 bt_field_class
*field_class
);
836 Borrows the specific context \bt_fc from the event class
839 See the \ref api-tir-ev-cls-prop-sc-fc "specific context field class"
842 If \bt_p{event_class} has no specific context field class, this function
845 @param[in] event_class
846 Event class from which to borrow the specific context field class.
849 \em Borrowed reference of the specific context field class of
850 \bt_p{event_class}, or \c NULL if none.
852 @bt_pre_not_null{event_class}
854 @sa bt_event_class_set_specific_context_field_class() —
855 Sets the specific context field class of an event class.
856 @sa bt_event_class_borrow_specific_context_field_class_const() —
857 \c const version of this function.
859 extern bt_field_class
*
860 bt_event_class_borrow_specific_context_field_class(bt_event_class
*event_class
);
864 Borrows the specific context \bt_fc from the event class
865 \bt_p{event_class} (\c const version).
867 See bt_event_class_borrow_specific_context_field_class().
869 extern const bt_field_class
*
870 bt_event_class_borrow_specific_context_field_class_const(
871 const bt_event_class
*event_class
);
875 Sets the user attributes of the event class \bt_p{event_class} to
876 \bt_p{user_attributes}.
878 See the \ref api-tir-ev-cls-prop-user-attrs "user attributes" property.
881 When you create a default event class with bt_event_class_create()
882 or bt_event_class_create_with_id(), the event class's initial user
883 attributes is an empty \bt_map_val. Therefore you can borrow it with
884 bt_event_class_borrow_user_attributes() and fill it directly instead
885 of setting a new one with this function.
887 @param[in] event_class
888 Event class of which to set the user attributes to
889 \bt_p{user_attributes}.
890 @param[in] user_attributes
891 New user attributes of \bt_p{event_class}.
893 @bt_pre_not_null{event_class}
894 @bt_pre_hot{event_class}
895 @bt_pre_not_null{user_attributes}
896 @bt_pre_is_map_val{user_attributes}
898 @sa bt_event_class_borrow_user_attributes() —
899 Borrows the user attributes of an event class.
901 extern void bt_event_class_set_user_attributes(
902 bt_event_class
*event_class
, const bt_value
*user_attributes
);
906 Borrows the user attributes of the event class \bt_p{event_class}.
908 See the \ref api-tir-ev-cls-prop-user-attrs "user attributes" property.
911 When you create a default event class with bt_event_class_create()
912 or bt_event_class_create_with_id(), the event class's initial user
913 attributes is an empty \bt_map_val.
915 @param[in] event_class
916 Event class from which to borrow the user attributes.
919 User attributes of \bt_p{event_class} (a \bt_map_val).
921 @bt_pre_not_null{event_class}
923 @sa bt_event_class_set_user_attributes() —
924 Sets the user attributes of an event class.
925 @sa bt_event_class_borrow_user_attributes_const() —
926 \c const version of this function.
928 extern bt_value
*bt_event_class_borrow_user_attributes(
929 bt_event_class
*event_class
);
933 Borrows the user attributes of the event class \bt_p{event_class}
936 See bt_event_class_borrow_user_attributes().
938 extern const bt_value
*bt_event_class_borrow_user_attributes_const(
939 const bt_event_class
*event_class
);
944 @name Reference count
950 Increments the \ref api-fund-shared-object "reference count" of
951 the event class \bt_p{event_class}.
953 @param[in] event_class
955 Event class of which to increment the reference count.
960 @sa bt_event_class_put_ref() —
961 Decrements the reference count of an event class.
963 extern void bt_event_class_get_ref(const bt_event_class
*event_class
);
967 Decrements the \ref api-fund-shared-object "reference count" of
968 the event class \bt_p{event_class}.
970 @param[in] event_class
972 Event class of which to decrement the reference count.
977 @sa bt_event_class_get_ref() —
978 Increments the reference count of an event class.
980 extern void bt_event_class_put_ref(const bt_event_class
*event_class
);
984 Decrements the reference count of the event class
985 \bt_p{_event_class}, and then sets \bt_p{_event_class} to \c NULL.
989 Event class of which to decrement the reference count.
994 @bt_pre_assign_expr{_event_class}
996 #define BT_EVENT_CLASS_PUT_REF_AND_RESET(_event_class) \
998 bt_event_class_put_ref(_event_class); \
999 (_event_class) = NULL; \
1004 Decrements the reference count of the event class \bt_p{_dst}, sets
1005 \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
1007 This macro effectively moves an event class reference from the expression
1008 \bt_p{_src} to the expression \bt_p{_dst}, putting the existing
1009 \bt_p{_dst} reference.
1013 Destination expression.
1015 Can contain \c NULL.
1021 Can contain \c NULL.
1024 @bt_pre_assign_expr{_dst}
1025 @bt_pre_assign_expr{_src}
1027 #define BT_EVENT_CLASS_MOVE_REF(_dst, _src) \
1029 bt_event_class_put_ref(_dst); \
1042 #endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */