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 <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;
37 /* NULL or `str->str` above */
44 /* NULL or `uuid` above */
48 struct bt_value
*environment
;
50 /* Array of `struct bt_stream *` */
54 * Stream class (weak, owned by owned trace class) to number of
55 * instantiated streams, used to automatically assign stream IDs
56 * per stream class within this trace.
58 GHashTable
*stream_classes_stream_count
;
60 GArray
*destruction_listeners
;
64 void _bt_trace_freeze(const struct bt_trace
*trace
);
67 # define bt_trace_freeze _bt_trace_freeze
69 # define bt_trace_freeze(_trace)
72 void bt_trace_add_stream(struct bt_trace
*trace
, struct bt_stream
*stream
);
74 uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace
*trace
,
75 const struct bt_stream_class
*stream_class
);
77 #endif /* BABELTRACE_TRACE_IR_TRACE_INTERNAL_H */