Visibility hidden by default
[babeltrace.git] / src / lib / trace-ir / event-class.h
CommitLineData
272df73e 1/*
0235b0db
MJ
2 * SPDX-License-Identifier: MIT
3 *
e2f7325d 4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
272df73e 5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
272df73e
PP
6 */
7
0235b0db
MJ
8#ifndef BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
9#define BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H
10
d98421f2 11#include "lib/assert-cond.h"
3fadfbc0
MJ
12#include <babeltrace2/trace-ir/field-class.h>
13#include <babeltrace2/trace-ir/field.h>
91d81473 14#include "common/macros.h"
3fadfbc0 15#include <babeltrace2/value.h>
3fadfbc0
MJ
16#include <babeltrace2/trace-ir/stream-class.h>
17#include <babeltrace2/trace-ir/stream.h>
18#include <babeltrace2/trace-ir/event-class.h>
578e048b
MJ
19#include "lib/object.h"
20#include "common/assert.h"
21#include "lib/object-pool.h"
22#include "lib/property.h"
272df73e 23#include <glib.h>
44c440bc 24#include <stdbool.h>
272df73e 25
578e048b
MJ
26#include "trace.h"
27
cb6f1f7d 28struct bt_event_class {
272df73e 29 struct bt_object base;
5cd6d0e5
PP
30 struct bt_field_class *specific_context_fc;
31 struct bt_field_class *payload_fc;
272df73e 32
c6962c96
PP
33 /* Owned by this */
34 struct bt_value *user_attributes;
35
44c440bc
PP
36 struct {
37 GString *str;
5990dd44 38
44c440bc
PP
39 /* NULL or `str->str` above */
40 const char *value;
41 } name;
42
43 uint64_t id;
44 struct bt_property_uint log_level;
45
46 struct {
47 GString *str;
48
49 /* NULL or `str->str` above */
50 const char *value;
51 } emf_uri;
312c056a
PP
52
53 /* Pool of `struct bt_event *` */
54 struct bt_object_pool event_pool;
44c440bc
PP
55
56 bool frozen;
3dca2276
PP
57};
58
40f4ba76 59void _bt_event_class_freeze(const struct bt_event_class *event_class);
272df73e 60
44c440bc
PP
61#ifdef BT_DEV_MODE
62# define bt_event_class_freeze _bt_event_class_freeze
63#else
64# define bt_event_class_freeze(_ec)
65#endif
3dca2276 66
44c440bc
PP
67static inline
68struct bt_stream_class *bt_event_class_borrow_stream_class_inline(
40f4ba76 69 const struct bt_event_class *event_class)
44c440bc 70{
98b15851 71 BT_ASSERT_DBG(event_class);
44c440bc
PP
72 return (void *) bt_object_borrow_parent(&event_class->base);
73}
3dca2276 74
56e18c4c 75#endif /* BABELTRACE_TRACE_IR_EVENT_CLASS_INTERNAL_H */
This page took 0.097657 seconds and 4 git commands to generate.