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_TRACE_IR_TRACE_INTERNAL_H
9 #define BABELTRACE_TRACE_IR_TRACE_INTERNAL_H
11 #include "lib/assert-pre.h"
12 #include <babeltrace2/trace-ir/trace.h>
13 #include <babeltrace2/trace-ir/field-class.h>
14 #include <babeltrace2/trace-ir/field.h>
15 #include "lib/object.h"
16 #include "lib/object-pool.h"
17 #include "common/macros.h"
18 #include <babeltrace2/value.h>
19 #include <babeltrace2/types.h>
22 #include <sys/types.h>
23 #include "common/uuid.h"
25 #include "attributes.h"
26 #include "clock-class.h"
27 #include "stream-class.h"
28 #include "trace-class.h"
31 struct bt_object base
;
34 struct bt_value
*user_attributes
;
37 struct bt_trace_class
*class;
42 /* NULL or `str->str` above */
49 /* NULL or `uuid` above */
53 struct bt_value
*environment
;
55 /* Array of `struct bt_stream *` */
59 * Stream class (weak, owned by owned trace class) to number of
60 * instantiated streams, used to automatically assign stream IDs
61 * per stream class within this trace.
63 GHashTable
*stream_classes_stream_count
;
65 GArray
*destruction_listeners
;
70 void _bt_trace_freeze(const struct bt_trace
*trace
);
73 # define bt_trace_freeze _bt_trace_freeze
75 # define bt_trace_freeze(_trace)
79 void bt_trace_add_stream(struct bt_trace
*trace
, struct bt_stream
*stream
);
82 uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace
*trace
,
83 const struct bt_stream_class
*stream_class
);
85 #endif /* BABELTRACE_TRACE_IR_TRACE_INTERNAL_H */