.gitignore: add some more IDE / tools related file
[babeltrace.git] / src / lib / trace-ir / trace.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 */
7
8#ifndef BABELTRACE_LIB_TRACE_IR_TRACE_H
9#define BABELTRACE_LIB_TRACE_IR_TRACE_H
10
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>
17#include <glib.h>
18#include <stdbool.h>
19#include <sys/types.h>
20#include "common/uuid.h"
21
22#include "stream-class.h"
23#include "trace-class.h"
24
25struct bt_trace {
26 struct bt_object base;
27
28 /* Owned by this */
29 struct bt_value *user_attributes;
30
31 /* Owned by this */
32 struct bt_trace_class *class;
33
34 gchar *name;
35
36 struct {
37 bt_uuid_t uuid;
38
39 /* NULL or `uuid` above */
40 bt_uuid value;
41 } uuid;
42
43 struct bt_value *environment;
44
45 /* Array of `struct bt_stream *` */
46 GPtrArray *streams;
47
48 /*
49 * Stream class (weak, owned by owned trace class) to number of
50 * instantiated streams, used to automatically assign stream IDs
51 * per stream class within this trace.
52 */
53 GHashTable *stream_classes_stream_count;
54
55 GArray *destruction_listeners;
56 bool frozen;
57};
58
59void _bt_trace_freeze(const struct bt_trace *trace);
60
61#ifdef BT_DEV_MODE
62# define bt_trace_freeze _bt_trace_freeze
63#else
64# define bt_trace_freeze(_trace)
65#endif
66
67void bt_trace_add_stream(struct bt_trace *trace, struct bt_stream *stream);
68
69uint64_t bt_trace_get_automatic_stream_id(const struct bt_trace *trace,
70 const struct bt_stream_class *stream_class);
71
72#endif /* BABELTRACE_LIB_TRACE_IR_TRACE_H */
This page took 0.023669 seconds and 5 git commands to generate.