2 * SPDX-License-Identifier: MIT
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 #ifndef BABELTRACE_LIB_TRACE_IR_TRACE_H
9 #define BABELTRACE_LIB_TRACE_IR_TRACE_H
11 #include <babeltrace2/trace-ir/trace.h>
12 #include <babeltrace2/trace-ir/field-class.h>
13 #include <babeltrace2/trace-ir/field.h>
14 #include "lib/object.h"
15 #include <babeltrace2/value.h>
16 #include <babeltrace2/types.h>
19 #include <sys/types.h>
20 #include "common/uuid.h"
22 #include "stream-class.h"
23 #include "trace-class.h"
26 struct bt_object base
;
29 struct bt_value
*user_attributes
;
32 struct bt_trace_class
*class;
38 /* Used for MIP == 0 */
42 /* NULL or `uuid` above */
46 /* Used for MIP >= 1 */
50 struct bt_value
*environment
;
52 /* Array of `struct bt_stream *` */
56 * Stream class (weak, owned by owned trace class) to number of
57 * instantiated streams, used to automatically assign stream IDs
58 * per stream class within this trace.
60 GHashTable
*stream_classes_stream_count
;
62 GArray
*destruction_listeners
;
66 void _bt_trace_freeze(const struct bt_trace
*trace
);
69 # define bt_trace_freeze _bt_trace_freeze
71 # define bt_trace_freeze(_trace)
74 void bt_trace_add_stream(struct bt_trace
*trace
, struct bt_stream
*stream
);
76 uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace
*trace
,
77 const struct bt_stream_class
*stream_class
);
79 #endif /* BABELTRACE_LIB_TRACE_IR_TRACE_H */