* http://www.efficios.com/ctf
*/
-/* For bt_bool, bt_field_class */
+/* For bt_bool, bt_field_class, bt_trace_class */
#include <babeltrace/types.h>
/*
extern "C" {
#endif
-extern bt_field_class *bt_field_class_unsigned_integer_create(void);
+extern bt_field_class *bt_field_class_unsigned_integer_create(
+ bt_trace_class *trace_class);
-extern bt_field_class *bt_field_class_signed_integer_create(void);
+extern bt_field_class *bt_field_class_signed_integer_create(
+ bt_trace_class *trace_class);
extern void bt_field_class_integer_set_field_value_range(
bt_field_class *field_class, uint64_t size);
bt_field_class *field_class,
bt_field_class_integer_preferred_display_base base);
-extern bt_field_class *bt_field_class_real_create(void);
+extern bt_field_class *bt_field_class_real_create(bt_trace_class *trace_class);
extern void bt_field_class_real_set_is_single_precision(
bt_field_class *field_class,
bt_bool is_single_precision);
-extern bt_field_class *bt_field_class_unsigned_enumeration_create(void);
+extern bt_field_class *bt_field_class_unsigned_enumeration_create(
+ bt_trace_class *trace_class);
-extern bt_field_class *bt_field_class_signed_enumeration_create(void);
+extern bt_field_class *bt_field_class_signed_enumeration_create(
+ bt_trace_class *trace_class);
extern bt_field_class_status bt_field_class_unsigned_enumeration_map_range(
bt_field_class *field_class, const char *label,
bt_field_class *field_class, const char *label,
int64_t range_lower, int64_t range_upper);
-extern bt_field_class *bt_field_class_string_create(void);
+extern bt_field_class *bt_field_class_string_create(
+ bt_trace_class *trace_class);
-extern bt_field_class *bt_field_class_structure_create(void);
+extern bt_field_class *bt_field_class_structure_create(
+ bt_trace_class *trace_class);
extern bt_field_class_status bt_field_class_structure_append_member(
bt_field_class *struct_field_class,
const char *name, bt_field_class *field_class);
extern bt_field_class *bt_field_class_static_array_create(
+ bt_trace_class *trace_class,
bt_field_class *elem_field_class, uint64_t length);
extern bt_field_class *bt_field_class_dynamic_array_create(
+ bt_trace_class *trace_class,
bt_field_class *elem_field_class);
extern bt_field_class_status
bt_field_class *field_class,
bt_field_class *length_field_class);
-extern bt_field_class *bt_field_class_variant_create(void);
+extern bt_field_class *bt_field_class_variant_create(
+ bt_trace_class *trace_class);
extern bt_field_class_status
bt_field_class_variant_set_selector_field_class(bt_field_class *field_class,
}
static inline
-struct bt_field_class *create_integer_field_class(enum bt_field_class_type type)
+struct bt_field_class *create_integer_field_class(bt_trace_class *trace_class,
+ enum bt_field_class_type type)
{
struct bt_field_class_integer *int_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD("Creating default integer field class object: type=%s",
bt_common_field_class_type_string(type));
int_fc = g_new0(struct bt_field_class_integer, 1);
return (void *) int_fc;
}
-struct bt_field_class *
-bt_field_class_unsigned_integer_create(void)
+struct bt_field_class *bt_field_class_unsigned_integer_create(
+ bt_trace_class *trace_class)
{
- return create_integer_field_class(
+ return create_integer_field_class(trace_class,
BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER);
}
-struct bt_field_class *bt_field_class_signed_integer_create(void)
+struct bt_field_class *bt_field_class_signed_integer_create(
+ bt_trace_class *trace_class)
{
- return create_integer_field_class(
+ return create_integer_field_class(trace_class,
BT_FIELD_CLASS_TYPE_SIGNED_INTEGER);
}
static
struct bt_field_class *create_enumeration_field_class(
- enum bt_field_class_type type)
+ bt_trace_class *trace_class, enum bt_field_class_type type)
{
struct bt_field_class_enumeration *enum_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD("Creating default enumeration field class object: type=%s",
bt_common_field_class_type_string(type));
enum_fc = g_new0(struct bt_field_class_enumeration, 1);
return (void *) enum_fc;
}
-struct bt_field_class *bt_field_class_unsigned_enumeration_create(void)
+struct bt_field_class *bt_field_class_unsigned_enumeration_create(
+ bt_trace_class *trace_class)
{
- return create_enumeration_field_class(
+ return create_enumeration_field_class(trace_class,
BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION);
}
-struct bt_field_class *bt_field_class_signed_enumeration_create(void)
+struct bt_field_class *bt_field_class_signed_enumeration_create(
+ bt_trace_class *trace_class)
{
- return create_enumeration_field_class(
+ return create_enumeration_field_class(trace_class,
BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION);
}
g_free(obj);
}
-struct bt_field_class *bt_field_class_real_create(void)
+struct bt_field_class *bt_field_class_real_create(bt_trace_class *trace_class)
{
struct bt_field_class_real *real_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD_STR("Creating default real field class object.");
real_fc = g_new0(struct bt_field_class_real, 1);
if (!real_fc) {
g_free(obj);
}
-struct bt_field_class *bt_field_class_structure_create(void)
+struct bt_field_class *bt_field_class_structure_create(
+ bt_trace_class *trace_class)
{
int ret;
struct bt_field_class_structure *struct_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD_STR("Creating default structure field class object.");
struct_fc = g_new0(struct bt_field_class_structure, 1);
if (!struct_fc) {
g_free(fc);
}
-struct bt_field_class *bt_field_class_variant_create(void)
+struct bt_field_class *bt_field_class_variant_create(
+ bt_trace_class *trace_class)
{
int ret;
struct bt_field_class_variant *var_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD_STR("Creating default variant field class object.");
var_fc = g_new0(struct bt_field_class_variant, 1);
if (!var_fc) {
}
struct bt_field_class *
-bt_field_class_static_array_create(struct bt_field_class *element_fc,
- uint64_t length)
+bt_field_class_static_array_create(bt_trace_class *trace_class,
+ struct bt_field_class *element_fc, uint64_t length)
{
struct bt_field_class_static_array *array_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_ASSERT_PRE_NON_NULL(element_fc, "Element field class");
BT_LOGD_STR("Creating default static array field class object.");
array_fc = g_new0(struct bt_field_class_static_array, 1);
}
struct bt_field_class *bt_field_class_dynamic_array_create(
+ bt_trace_class *trace_class,
struct bt_field_class *element_fc)
{
struct bt_field_class_dynamic_array *array_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_ASSERT_PRE_NON_NULL(element_fc, "Element field class");
BT_LOGD_STR("Creating default dynamic array field class object.");
array_fc = g_new0(struct bt_field_class_dynamic_array, 1);
g_free(obj);
}
-struct bt_field_class *bt_field_class_string_create(void)
+struct bt_field_class *bt_field_class_string_create(bt_trace_class *trace_class)
{
struct bt_field_class_string *string_fc = NULL;
+ BT_ASSERT_PRE_NON_NULL(trace_class, "Trace class");
BT_LOGD_STR("Creating default string field class object.");
string_fc = g_new0(struct bt_field_class_string, 1);
if (!string_fc) {
#include "ctf-meta-visitors.h"
static inline
-bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
+bt_field_class *ctf_field_class_to_ir(bt_trace_class *ir_tc,
+ struct ctf_field_class *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec);
}
static inline
-bt_field_class *ctf_field_class_int_to_ir(
+bt_field_class *ctf_field_class_int_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_int *fc)
{
bt_field_class *ir_fc;
if (fc->is_signed) {
- ir_fc = bt_field_class_signed_integer_create();
+ ir_fc = bt_field_class_signed_integer_create(ir_tc);
} else {
- ir_fc = bt_field_class_unsigned_integer_create();
+ ir_fc = bt_field_class_unsigned_integer_create(ir_tc);
}
BT_ASSERT(ir_fc);
}
static inline
-bt_field_class *ctf_field_class_enum_to_ir(
+bt_field_class *ctf_field_class_enum_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_enum *fc)
{
int ret;
uint64_t i;
if (fc->base.is_signed) {
- ir_fc = bt_field_class_signed_enumeration_create();
+ ir_fc = bt_field_class_signed_enumeration_create(ir_tc);
} else {
- ir_fc = bt_field_class_unsigned_enumeration_create();
+ ir_fc = bt_field_class_unsigned_enumeration_create(ir_tc);
}
BT_ASSERT(ir_fc);
}
static inline
-bt_field_class *ctf_field_class_float_to_ir(
+bt_field_class *ctf_field_class_float_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_float *fc)
{
bt_field_class *ir_fc;
- ir_fc = bt_field_class_real_create();
+ ir_fc = bt_field_class_real_create(ir_tc);
BT_ASSERT(ir_fc);
if (fc->base.size == 32) {
}
static inline
-bt_field_class *ctf_field_class_string_to_ir(
+bt_field_class *ctf_field_class_string_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_string *fc)
{
- bt_field_class *ir_fc =
- bt_field_class_string_create();
+ bt_field_class *ir_fc = bt_field_class_string_create(ir_tc);
BT_ASSERT(ir_fc);
return ir_fc;
}
static inline
-bt_field_class *ctf_field_class_struct_to_ir(
+bt_field_class *ctf_field_class_struct_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_struct *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
int ret;
- bt_field_class *ir_fc =
- bt_field_class_structure_create();
+ bt_field_class *ir_fc = bt_field_class_structure_create(ir_tc);
uint64_t i;
BT_ASSERT(ir_fc);
continue;
}
- member_ir_fc = ctf_field_class_to_ir(named_fc->fc, tc, sc, ec);
+ member_ir_fc = ctf_field_class_to_ir(ir_tc, named_fc->fc,
+ tc, sc, ec);
BT_ASSERT(member_ir_fc);
ret = bt_field_class_structure_append_member(
ir_fc, named_fc->name->str, member_ir_fc);
}
static inline
-bt_field_class *borrow_ir_ft_from_field_path(
- struct ctf_field_path *field_path,
+bt_field_class *borrow_ir_ft_from_field_path(struct ctf_field_path *field_path,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
}
static inline
-bt_field_class *ctf_field_class_variant_to_ir(
+bt_field_class *ctf_field_class_variant_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_variant *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
{
int ret;
- bt_field_class *ir_fc =
- bt_field_class_variant_create();
+ bt_field_class *ir_fc = bt_field_class_variant_create(ir_tc);
uint64_t i;
BT_ASSERT(ir_fc);
bt_field_class *option_ir_fc;
BT_ASSERT(named_fc->fc->in_ir);
- option_ir_fc = ctf_field_class_to_ir(named_fc->fc, tc, sc, ec);
+ option_ir_fc = ctf_field_class_to_ir(ir_tc, named_fc->fc,
+ tc, sc, ec);
BT_ASSERT(option_ir_fc);
ret = bt_field_class_variant_append_option(
ir_fc, named_fc->name->str, option_ir_fc);
}
static inline
-bt_field_class *ctf_field_class_array_to_ir(
+bt_field_class *ctf_field_class_array_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_array *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
bt_field_class *elem_ir_fc;
if (fc->base.is_text) {
- ir_fc = bt_field_class_string_create();
+ ir_fc = bt_field_class_string_create(ir_tc);
BT_ASSERT(ir_fc);
goto end;
}
- elem_ir_fc = ctf_field_class_to_ir(fc->base.elem_fc, tc, sc, ec);
+ elem_ir_fc = ctf_field_class_to_ir(ir_tc, fc->base.elem_fc, tc, sc, ec);
BT_ASSERT(elem_ir_fc);
- ir_fc = bt_field_class_static_array_create(elem_ir_fc,
+ ir_fc = bt_field_class_static_array_create(ir_tc, elem_ir_fc,
fc->length);
BT_ASSERT(ir_fc);
bt_field_class_put_ref(elem_ir_fc);
}
static inline
-bt_field_class *ctf_field_class_sequence_to_ir(
+bt_field_class *ctf_field_class_sequence_to_ir(bt_trace_class *ir_tc,
struct ctf_field_class_sequence *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
bt_field_class *elem_ir_fc;
if (fc->base.is_text) {
- ir_fc = bt_field_class_string_create();
+ ir_fc = bt_field_class_string_create(ir_tc);
BT_ASSERT(ir_fc);
goto end;
}
- elem_ir_fc = ctf_field_class_to_ir(fc->base.elem_fc, tc, sc, ec);
+ elem_ir_fc = ctf_field_class_to_ir(ir_tc, fc->base.elem_fc, tc, sc, ec);
BT_ASSERT(elem_ir_fc);
- ir_fc = bt_field_class_dynamic_array_create(elem_ir_fc);
+ ir_fc = bt_field_class_dynamic_array_create(ir_tc, elem_ir_fc);
BT_ASSERT(ir_fc);
bt_field_class_put_ref(elem_ir_fc);
BT_ASSERT(ir_fc);
}
static inline
-bt_field_class *ctf_field_class_to_ir(struct ctf_field_class *fc,
+bt_field_class *ctf_field_class_to_ir(bt_trace_class *ir_tc,
+ struct ctf_field_class *fc,
struct ctf_trace_class *tc,
struct ctf_stream_class *sc,
struct ctf_event_class *ec)
switch (fc->type) {
case CTF_FIELD_CLASS_TYPE_INT:
- ir_fc = ctf_field_class_int_to_ir((void *) fc);
+ ir_fc = ctf_field_class_int_to_ir(ir_tc, (void *) fc);
break;
case CTF_FIELD_CLASS_TYPE_ENUM:
- ir_fc = ctf_field_class_enum_to_ir((void *) fc);
+ ir_fc = ctf_field_class_enum_to_ir(ir_tc, (void *) fc);
break;
case CTF_FIELD_CLASS_TYPE_FLOAT:
- ir_fc = ctf_field_class_float_to_ir((void *) fc);
+ ir_fc = ctf_field_class_float_to_ir(ir_tc, (void *) fc);
break;
case CTF_FIELD_CLASS_TYPE_STRING:
- ir_fc = ctf_field_class_string_to_ir((void *) fc);
+ ir_fc = ctf_field_class_string_to_ir(ir_tc, (void *) fc);
break;
case CTF_FIELD_CLASS_TYPE_STRUCT:
- ir_fc = ctf_field_class_struct_to_ir((void *) fc, tc, sc, ec);
+ ir_fc = ctf_field_class_struct_to_ir(ir_tc, (void *) fc,
+ tc, sc, ec);
break;
case CTF_FIELD_CLASS_TYPE_ARRAY:
- ir_fc = ctf_field_class_array_to_ir((void *) fc, tc, sc, ec);
+ ir_fc = ctf_field_class_array_to_ir(ir_tc, (void *) fc,
+ tc, sc, ec);
break;
case CTF_FIELD_CLASS_TYPE_SEQUENCE:
- ir_fc = ctf_field_class_sequence_to_ir((void *) fc, tc, sc, ec);
+ ir_fc = ctf_field_class_sequence_to_ir(ir_tc, (void *) fc,
+ tc, sc, ec);
break;
case CTF_FIELD_CLASS_TYPE_VARIANT:
- ir_fc = ctf_field_class_variant_to_ir((void *) fc, tc, sc, ec);
+ ir_fc = ctf_field_class_variant_to_ir(ir_tc, (void *) fc,
+ tc, sc, ec);
break;
default:
abort();
}
static inline
-bt_field_class *scope_ctf_field_class_to_ir(struct ctf_field_class *fc,
- struct ctf_trace_class *tc,
- struct ctf_stream_class *sc,
- struct ctf_event_class *ec)
+bt_field_class *scope_ctf_field_class_to_ir(bt_trace_class *ir_tc,
+ struct ctf_field_class *fc,
+ struct ctf_trace_class *tc,
+ struct ctf_stream_class *sc,
+ struct ctf_event_class *ec)
{
bt_field_class *ir_fc = NULL;
goto end;
}
- ir_fc = ctf_field_class_to_ir(fc, tc, sc, ec);
+ ir_fc = ctf_field_class_to_ir(ir_tc, fc, tc, sc, ec);
end:
return ir_fc;
{
int ret;
bt_event_class *ir_ec = NULL;
+ bt_trace_class *ir_tc = bt_stream_class_borrow_trace_class(ir_sc);
if (ec->is_translated) {
ir_ec = bt_stream_class_borrow_event_class_by_id(
bt_event_class_put_ref(ir_ec);
if (ec->spec_context_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
ec->spec_context_fc, tc, sc, ec);
if (ir_fc) {
}
if (ec->payload_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
ec->payload_fc, tc, sc, ec);
if (ir_fc) {
bt_stream_class_put_ref(ir_sc);
if (sc->packet_context_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
sc->packet_context_fc, tc, sc, NULL);
if (ir_fc) {
}
if (sc->event_header_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
sc->event_header_fc, tc, sc, NULL);
if (ir_fc) {
}
if (sc->event_common_context_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
sc->event_common_context_fc, tc, sc, NULL);
if (ir_fc) {
}
if (tc->packet_header_fc) {
- bt_field_class *ir_fc = scope_ctf_field_class_to_ir(
+ bt_field_class *ir_fc = scope_ctf_field_class_to_ir(ir_tc,
tc->packet_header_fc, tc, NULL, NULL);
if (ir_fc) {
};
static
-bt_field_class *create_event_payload_fc(void)
+bt_field_class *create_event_payload_fc(bt_trace_class *trace_class)
{
bt_field_class *root_fc = NULL;
bt_field_class *fc = NULL;
int ret;
- root_fc = bt_field_class_structure_create();
+ root_fc = bt_field_class_structure_create(trace_class);
if (!root_fc) {
BT_LOGE_STR("Cannot create an empty structure field class object.");
goto error;
}
- fc = bt_field_class_string_create();
+ fc = bt_field_class_string_create(trace_class);
if (!fc) {
BT_LOGE_STR("Cannot create a string field class object.");
goto error;
goto error;
}
- fc = create_event_payload_fc();
+ fc = create_event_payload_fc(dmesg_comp->trace_class);
if (!fc) {
BT_LOGE_STR("Cannot create event payload field class.");
goto error;
* - uint16_t payload_16;
* - uint32_t payload_32;
*/
-static bt_field_class *create_integer_struct(void)
+static bt_field_class *create_integer_struct(bt_trace_class *trace_class)
{
int ret;
bt_field_class *structure = NULL;
bt_field_class *ui8 = NULL, *ui16 = NULL, *ui32 = NULL;
- structure = bt_field_class_structure_create();
+ structure = bt_field_class_structure_create(trace_class);
BT_ASSERT(structure);
- ui8 = bt_field_class_unsigned_integer_create();
+ ui8 = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(ui8);
bt_field_class_integer_set_field_value_range(ui8, 8);
ret = bt_field_class_structure_append_member(structure,
"payload_8", ui8);
BT_ASSERT(ret == 0);
- ui16 = bt_field_class_unsigned_integer_create();
+ ui16 = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(ui16);
bt_field_class_integer_set_field_value_range(ui16, 16);
ret = bt_field_class_structure_append_member(structure,
"payload_16", ui16);
BT_ASSERT(ret == 0);
- ui32 = bt_field_class_unsigned_integer_create();
+ ui32 = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(ui32);
bt_field_class_integer_set_field_value_range(ui32, 32);
ret = bt_field_class_structure_append_member(structure,
BT_ASSERT(event);
ret = bt_event_class_set_name(event, name);
BT_ASSERT(ret == 0);
- payload = create_integer_struct();
+ payload = create_integer_struct(bt_stream_class_borrow_trace_class(sc));
BT_ASSERT(payload);
ret = bt_event_class_set_payload_field_class(event, payload);
BT_ASSERT(ret == 0);
* - uint16_t payload_16;
* - uint32_t payload_32;
*/
-static bt_event_class *create_complex_event(
- bt_stream_class *sc,
+static bt_event_class *create_complex_event(bt_stream_class *sc,
const char *name)
{
int ret;
bt_event_class *event = NULL;
bt_field_class *inner = NULL, *outer = NULL;
+ bt_trace_class *trace_class = bt_stream_class_borrow_trace_class(sc);
BT_ASSERT(name);
event = bt_event_class_create(sc);
BT_ASSERT(event);
ret = bt_event_class_set_name(event, name);
BT_ASSERT(ret == 0);
- outer = create_integer_struct();
+ outer = create_integer_struct(trace_class);
BT_ASSERT(outer);
- inner = create_integer_struct();
+ inner = create_integer_struct(trace_class);
BT_ASSERT(inner);
ret = bt_field_class_structure_append_member(outer,
"payload_struct", inner);
static void set_stream_class_field_classes(
bt_stream_class *stream_class)
{
+ bt_trace_class *trace_class =
+ bt_stream_class_borrow_trace_class(stream_class);
bt_field_class *packet_context_type;
bt_field_class *event_header_type;
bt_field_class *fc;
int ret;
- packet_context_type = bt_field_class_structure_create();
+ packet_context_type = bt_field_class_structure_create(trace_class);
BT_ASSERT(packet_context_type);
- fc = bt_field_class_unsigned_integer_create();
+ fc = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(fc);
bt_field_class_integer_set_field_value_range(fc, 32);
ret = bt_field_class_structure_append_member(packet_context_type,
"packet_size", fc);
BT_ASSERT(ret == 0);
bt_field_class_put_ref(fc);
- fc = bt_field_class_unsigned_integer_create();
+ fc = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(fc);
bt_field_class_integer_set_field_value_range(fc, 32);
ret = bt_field_class_structure_append_member(packet_context_type,
"content_size", fc);
BT_ASSERT(ret == 0);
bt_field_class_put_ref(fc);
- event_header_type = bt_field_class_structure_create();
+ event_header_type = bt_field_class_structure_create(trace_class);
BT_ASSERT(event_header_type);
- fc = bt_field_class_unsigned_integer_create();
+ fc = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(fc);
bt_field_class_integer_set_field_value_range(fc, 32);
ret = bt_field_class_structure_append_member(event_header_type,
bt_field_class *fc;
int ret;
- packet_header_type = bt_field_class_structure_create();
+ packet_header_type = bt_field_class_structure_create(trace_class);
BT_ASSERT(packet_header_type);
- fc = bt_field_class_unsigned_integer_create();
+ fc = bt_field_class_unsigned_integer_create(trace_class);
BT_ASSERT(fc);
bt_field_class_integer_set_field_value_range(fc, 32);
ret = bt_field_class_structure_append_member(packet_header_type,