struct side_callbacks *callbacks;
};
-struct side_arg_dynamic_vec_vla {
- const struct side_arg_dynamic_vec *sav;
- uint32_t len;
-};
-
struct side_arg_dynamic_vec {
uint32_t dynamic_type; /* enum side_dynamic_type */
- uint32_t nr_attr;
- const struct side_attr *attr;
union {
- uint8_t side_bool;
-
- uint8_t side_u8;
- uint16_t side_u16;
- uint32_t side_u32;
- uint64_t side_u64;
- int8_t side_s8;
- int16_t side_s16;
- int32_t side_s32;
- int64_t side_s64;
- uint8_t side_blob;
+ struct {
+ const struct side_attr *attr;
+ uint32_t nr_attr;
+ union {
+ uint8_t side_bool;
+
+ uint8_t side_u8;
+ uint16_t side_u16;
+ uint32_t side_u32;
+ uint64_t side_u64;
+ int8_t side_s8;
+ int16_t side_s16;
+ int32_t side_s32;
+ int64_t side_s64;
+ uint8_t side_blob;
#if __HAVE_FLOAT16
- _Float16 side_float_binary16;
+ _Float16 side_float_binary16;
#endif
#if __HAVE_FLOAT32
- _Float32 side_float_binary32;
+ _Float32 side_float_binary32;
#endif
#if __HAVE_FLOAT64
- _Float64 side_float_binary64;
+ _Float64 side_float_binary64;
#endif
#if __HAVE_FLOAT128
- _Float128 side_float_binary128;
+ _Float128 side_float_binary128;
#endif
- const char *string;
+ const char *string;
+ } u;
+ } side_basic;
const struct side_arg_dynamic_event_struct *side_dynamic_struct;
struct {
void *app_ctx;
side_dynamic_struct_visitor visitor;
+ const struct side_attr *attr;
+ uint32_t nr_attr;
} side_dynamic_struct_visitor;
const struct side_arg_dynamic_vec_vla *side_dynamic_vla;
struct {
void *app_ctx;
side_dynamic_vla_visitor visitor;
+ const struct side_attr *attr;
+ uint32_t nr_attr;
} side_dynamic_vla_visitor;
} u;
};
+struct side_arg_dynamic_vec_vla {
+ const struct side_arg_dynamic_vec *sav;
+ const struct side_attr *attr;
+ uint32_t len;
+ uint32_t nr_attr;
+};
+
struct side_arg_dynamic_event_field {
const char *field_name;
const struct side_arg_dynamic_vec elem;
struct side_arg_dynamic_event_struct {
const struct side_arg_dynamic_event_field *fields;
+ const struct side_attr *attr;
uint32_t len;
+ uint32_t nr_attr;
};
struct side_arg_vec {
#define side_arg_dynamic_null(_attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_NULL, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
+ .u = { \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ }, \
+ }, \
}
#define side_arg_dynamic_bool(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_BOOL, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_bool = !!(_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_bool = !!(_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_u8(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_U8, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_u8 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_u8 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_u16(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_U16, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_u16 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_u16 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_u32(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_U32, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_u32 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_u32 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_u64(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_U64, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_u64 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_u64 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_s8(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_S8, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_s8 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_s8 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_s16(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_S16, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_s16 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_s16 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_s32(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_S32, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_s32 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_s32 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_s64(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_S64, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_s64 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_s64 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_blob(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_BLOB, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_blob = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_blob = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_float_binary16(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_FLOAT_BINARY16, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_float_binary16 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_float_binary16 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_float_binary32(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_FLOAT_BINARY32, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_float_binary32 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_float_binary32 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_float_binary64(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_FLOAT_BINARY64, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_float_binary64 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_float_binary64 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_float_binary128(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_FLOAT_BINARY128, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .side_float_binary128 = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .side_float_binary128 = (_val), \
+ }, \
+ }, \
}, \
}
#define side_arg_dynamic_string(_val, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_STRING, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
- .string = (_val), \
+ .side_basic = { \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .u = { \
+ .string = (_val), \
+ }, \
+ }, \
}, \
}
-#define side_arg_dynamic_vla(_vla, _attr) \
+#define side_arg_dynamic_vla(_vla) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_VLA, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
.side_dynamic_vla = (_vla), \
}, \
#define side_arg_dynamic_vla_visitor(_dynamic_vla_visitor, _ctx, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_VLA_VISITOR, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
.side_dynamic_vla_visitor = { \
.app_ctx = _ctx, \
.visitor = _dynamic_vla_visitor, \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}, \
}, \
}
-#define side_arg_dynamic_struct(_struct, _attr) \
+#define side_arg_dynamic_struct(_struct) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_STRUCT, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
.side_dynamic_struct = (_struct), \
}, \
#define side_arg_dynamic_struct_visitor(_dynamic_struct_visitor, _ctx, _attr) \
{ \
.dynamic_type = SIDE_DYNAMIC_TYPE_STRUCT_VISITOR, \
- .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
- .attr = _attr, \
.u = { \
.side_dynamic_struct_visitor = { \
.app_ctx = _ctx, \
.visitor = _dynamic_struct_visitor, \
+ .attr = _attr, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}, \
}, \
}
-#define side_arg_dynamic_define_vec(_identifier, _sav) \
+#define side_arg_dynamic_define_vec(_identifier, _sav, _attr) \
const struct side_arg_dynamic_vec _identifier##_vec[] = { _sav }; \
const struct side_arg_dynamic_vec_vla _identifier = { \
.sav = _identifier##_vec, \
+ .attr = _attr, \
.len = SIDE_ARRAY_SIZE(_identifier##_vec), \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}
-#define side_arg_dynamic_define_struct(_identifier, _struct_fields) \
+#define side_arg_dynamic_define_struct(_identifier, _struct_fields, _attr) \
const struct side_arg_dynamic_event_field _identifier##_fields[] = { _struct_fields }; \
const struct side_arg_dynamic_event_struct _identifier = { \
.fields = _identifier##_fields, \
+ .attr = _attr, \
.len = SIDE_ARRAY_SIZE(_identifier##_fields), \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}
#define side_arg_define_vec(_identifier, _sav) \
side_event_cond(_desc) \
side_event_call(_desc, SIDE_PARAM(_sav))
-#define side_event_call_variadic(_desc, _sav, _var_fields) \
+#define side_event_call_variadic(_desc, _sav, _var_fields, _attr) \
{ \
const struct side_arg_vec side_sav[] = { _sav }; \
const struct side_arg_vec_description sav_desc = { \
const struct side_arg_dynamic_event_field side_fields[] = { _var_fields }; \
const struct side_arg_dynamic_event_struct var_struct = { \
.fields = side_fields, \
+ .attr = _attr, \
.len = SIDE_ARRAY_SIZE(side_fields), \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}; \
side_call_variadic(&(_desc), &sav_desc, &var_struct); \
}
-#define side_event_variadic(_desc, _sav, _var) \
+#define side_event_variadic(_desc, _sav, _var, _attr) \
side_event_cond(_desc) \
- side_event_call_variadic(_desc, SIDE_PARAM(_sav), SIDE_PARAM(_var))
+ side_event_call_variadic(_desc, SIDE_PARAM(_sav), SIDE_PARAM(_var), SIDE_PARAM(_attr))
#define side_define_enum(_identifier, _mappings, _attr) \
const struct side_enum_mappings _identifier = { \
side_arg_dynamic_u32(1, side_attr_list()),
side_arg_dynamic_u32(2, side_attr_list()),
side_arg_dynamic_u32(3, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_vla_enabled = 1;
side_event(my_provider_event_dynamic_vla,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla))));
}
static side_define_event(my_provider_event_dynamic_null,
side_arg_dynamic_field("a", side_arg_dynamic_u32(43, side_attr_list())),
side_arg_dynamic_field("b", side_arg_dynamic_string("zzz", side_attr_list())),
side_arg_dynamic_field("c", side_arg_dynamic_null(side_attr_list())),
- )
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_struct_enabled = 1;
side_event(my_provider_event_dynamic_struct,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct))));
}
static side_define_event(my_provider_event_dynamic_nested_struct,
side_arg_list(
side_arg_dynamic_field("a", side_arg_dynamic_u32(43, side_attr_list())),
side_arg_dynamic_field("b", side_arg_dynamic_u8(55, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_struct(nested2,
side_arg_list(
side_arg_dynamic_field("aa", side_arg_dynamic_u64(128, side_attr_list())),
side_arg_dynamic_field("bb", side_arg_dynamic_u16(1, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_struct(mystruct,
side_arg_list(
- side_arg_dynamic_field("nested", side_arg_dynamic_struct(&nested, side_attr_list())),
- side_arg_dynamic_field("nested2", side_arg_dynamic_struct(&nested2, side_attr_list())),
- )
+ side_arg_dynamic_field("nested", side_arg_dynamic_struct(&nested)),
+ side_arg_dynamic_field("nested2", side_arg_dynamic_struct(&nested2)),
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_nested_struct_enabled = 1;
side_event(my_provider_event_dynamic_nested_struct,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct))));
}
static side_define_event(my_provider_event_dynamic_vla_struct,
side_arg_list(
side_arg_dynamic_field("a", side_arg_dynamic_u32(43, side_attr_list())),
side_arg_dynamic_field("b", side_arg_dynamic_u8(55, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_vec(myvla,
side_arg_list(
- side_arg_dynamic_struct(&nested, side_attr_list()),
- side_arg_dynamic_struct(&nested, side_attr_list()),
- side_arg_dynamic_struct(&nested, side_attr_list()),
- side_arg_dynamic_struct(&nested, side_attr_list()),
- )
+ side_arg_dynamic_struct(&nested),
+ side_arg_dynamic_struct(&nested),
+ side_arg_dynamic_struct(&nested),
+ side_arg_dynamic_struct(&nested),
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_vla_struct_enabled = 1;
side_event(my_provider_event_dynamic_vla_struct,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla))));
}
static side_define_event(my_provider_event_dynamic_struct_vla,
side_arg_dynamic_u32(1, side_attr_list()),
side_arg_dynamic_u32(2, side_attr_list()),
side_arg_dynamic_u32(3, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_vec(myvla2,
side_arg_list(
side_arg_dynamic_u32(4, side_attr_list()),
side_arg_dynamic_u64(5, side_attr_list()),
side_arg_dynamic_u32(6, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_struct(mystruct,
side_arg_list(
- side_arg_dynamic_field("a", side_arg_dynamic_vla(&myvla, side_attr_list())),
- side_arg_dynamic_field("b", side_arg_dynamic_vla(&myvla2, side_attr_list())),
- )
+ side_arg_dynamic_field("a", side_arg_dynamic_vla(&myvla)),
+ side_arg_dynamic_field("b", side_arg_dynamic_vla(&myvla2)),
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_struct_vla_enabled = 1;
side_event(my_provider_event_dynamic_struct_vla,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_struct(&mystruct))));
}
static side_define_event(my_provider_event_dynamic_nested_vla,
side_arg_dynamic_u32(1, side_attr_list()),
side_arg_dynamic_u16(2, side_attr_list()),
side_arg_dynamic_u32(3, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_vec(nestedvla2,
side_arg_list(
side_arg_dynamic_u8(4, side_attr_list()),
side_arg_dynamic_u32(5, side_attr_list()),
side_arg_dynamic_u32(6, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
side_arg_dynamic_define_vec(myvla,
side_arg_list(
- side_arg_dynamic_vla(&nestedvla, side_attr_list()),
- side_arg_dynamic_vla(&nestedvla2, side_attr_list()),
- )
+ side_arg_dynamic_vla(&nestedvla),
+ side_arg_dynamic_vla(&nestedvla2),
+ ),
+ side_attr_list()
);
my_provider_event_dynamic_nested_vla_enabled = 1;
side_event(my_provider_event_dynamic_nested_vla,
- side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla, side_attr_list()))));
+ side_arg_list(side_arg_dynamic(side_arg_dynamic_vla(&myvla))));
}
static side_define_event_variadic(my_provider_event_variadic,
side_arg_list(
side_arg_dynamic_field("a", side_arg_dynamic_u32(55, side_attr_list())),
side_arg_dynamic_field("b", side_arg_dynamic_s8(-4, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
}
side_arg_list(
side_arg_dynamic_field("a", side_arg_dynamic_u32(55, side_attr_list())),
side_arg_dynamic_field("b", side_arg_dynamic_s8(-4, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
}
side_arg_dynamic_field("b_true", side_arg_dynamic_bool(-4, side_attr_list())),
side_arg_dynamic_field("c_false", side_arg_dynamic_bool(0, side_attr_list())),
side_arg_dynamic_field("d_true", side_arg_dynamic_bool(256, side_attr_list())),
- )
+ ),
+ side_attr_list()
);
}
for (i = 0; i < length; i++) {
const struct side_arg_dynamic_vec elem = {
.dynamic_type = SIDE_DYNAMIC_TYPE_U32,
- .nr_attr = 0,
- .attr = NULL,
.u = {
- .side_u32 = ctx->ptr[i],
+ .side_basic = {
+ .attr = NULL,
+ .nr_attr = 0,
+ .u = {
+ .side_u32 = ctx->ptr[i],
+ },
+ },
},
};
if (tracer_ctx->write_elem(tracer_ctx, &elem) != SIDE_VISITOR_STATUS_OK)
.field_name = ctx->ptr[i].name,
.elem = {
.dynamic_type = SIDE_DYNAMIC_TYPE_U32,
- .nr_attr = 0,
- .attr = NULL,
.u = {
- .side_u32 = ctx->ptr[i].value,
+ .side_basic = {
+ .nr_attr = 0,
+ .attr = NULL,
+ .u = {
+ .side_u32 = ctx->ptr[i].value,
+ },
+ },
},
},
};
)
)
),
- )
+ ),
+ side_attr_list()
);
}
),
side_arg_dynamic_u32(2, side_attr_list()),
side_arg_dynamic_u32(3, side_attr_list()),
+ ),
+ side_attr_list(
+ side_attr("X", side_attr_u8(1)),
+ side_attr("Y", side_attr_u8(2)),
)
);
my_provider_event_variadic_vla_attr_enabled = 1;
side_event_variadic(my_provider_event_variadic_vla_attr,
side_arg_list(),
side_arg_list(
- side_arg_dynamic_field("a",
- side_arg_dynamic_vla(&myvla,
- side_attr_list(
- side_attr("X", side_attr_u8(1)),
- side_attr("Y", side_attr_u8(2)),
- )
- )
- ),
- )
+ side_arg_dynamic_field("a", side_arg_dynamic_vla(&myvla)),
+ ),
+ side_attr_list()
);
}
)
),
side_arg_dynamic_field("b", side_arg_dynamic_u8(55, side_attr_list())),
+ ),
+ side_attr_list(
+ side_attr("X", side_attr_u8(1)),
+ side_attr("Y", side_attr_u8(2)),
)
);
side_event_call_variadic(my_provider_event_variadic_struct_attr,
side_arg_list(),
side_arg_list(
- side_arg_dynamic_field("a",
- side_arg_dynamic_struct(&mystruct,
- side_attr_list(
- side_attr("X", side_attr_u8(1)),
- side_attr("Y", side_attr_u8(2)),
- )
- )
- ),
- )
+ side_arg_dynamic_field("a", side_arg_dynamic_struct(&mystruct)),
+ ),
+ side_attr_list()
);
}
}
side_arg_dynamic_float_binary128(4.4, side_attr_list())
),
#endif
- )
+ ),
+ side_attr_list()
);
}
side_arg_list(
side_arg_dynamic_blob(0x22, side_attr_list()),
side_arg_dynamic_blob(0x33, side_attr_list()),
- )
+ ),
+ side_attr_list()
);
side_event_call_variadic(my_provider_event_blob,
side_arg_list(
side_arg_dynamic_field("varblobfield",
side_arg_dynamic_blob(0x55, side_attr_list())
),
- side_arg_dynamic_field("varblobvla",
- side_arg_dynamic_vla(&myvla, side_attr_list())
- ),
- )
+ side_arg_dynamic_field("varblobvla", side_arg_dynamic_vla(&myvla)),
+ ),
+ side_attr_list()
);
}
}
uint32_t len = dynamic_struct->len;
int i;
+ print_attributes("attr:: ", dynamic_struct->attr, dynamic_struct->nr_attr);
+ printf("%s", dynamic_struct->nr_attr ? ", " : "");
printf("fields:: ");
printf("[ ");
for (i = 0; i < len; i++) {
};
void *app_ctx = item->u.side_dynamic_struct_visitor.app_ctx;
+ print_attributes("attr:: ", item->u.side_dynamic_struct_visitor.attr, item->u.side_dynamic_struct_visitor.nr_attr);
+ printf("%s", item->u.side_dynamic_struct_visitor.nr_attr ? ", " : "");
printf("fields:: ");
printf("[ ");
status = item->u.side_dynamic_struct_visitor.visitor(&tracer_ctx, app_ctx);
uint32_t side_sav_len = vla->len;
int i;
+ print_attributes("attr:: ", vla->attr, vla->nr_attr);
+ printf("%s", vla->nr_attr ? ", " : "");
printf("elements:: ");
printf("[ ");
for (i = 0; i < side_sav_len; i++) {
};
void *app_ctx = item->u.side_dynamic_vla_visitor.app_ctx;
+ print_attributes("attr:: ", item->u.side_dynamic_vla_visitor.attr, item->u.side_dynamic_vla_visitor.nr_attr);
+ printf("%s", item->u.side_dynamic_vla_visitor.nr_attr ? ", " : "");
printf("elements:: ");
printf("[ ");
status = item->u.side_dynamic_vla_visitor.visitor(&tracer_ctx, app_ctx);
void tracer_print_dynamic(const struct side_arg_dynamic_vec *item)
{
printf("{ ");
- print_attributes("attr:: ", item->attr, item->nr_attr);
- printf("%s", item->nr_attr ? ", " : "");
switch (item->dynamic_type) {
case SIDE_DYNAMIC_TYPE_NULL:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
printf("<NULL TYPE>");
break;
case SIDE_DYNAMIC_TYPE_BOOL:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%s", item->u.side_bool ? "true" : "false");
+ printf("%s", item->u.side_basic.u.side_bool ? "true" : "false");
break;
case SIDE_DYNAMIC_TYPE_U8:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRIu8, item->u.side_u8);
+ printf("%" PRIu8, item->u.side_basic.u.side_u8);
break;
case SIDE_DYNAMIC_TYPE_U16:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRIu16, item->u.side_u16);
+ printf("%" PRIu16, item->u.side_basic.u.side_u16);
break;
case SIDE_DYNAMIC_TYPE_U32:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRIu32, item->u.side_u32);
+ printf("%" PRIu32, item->u.side_basic.u.side_u32);
break;
case SIDE_DYNAMIC_TYPE_U64:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRIu64, item->u.side_u64);
+ printf("%" PRIu64, item->u.side_basic.u.side_u64);
break;
case SIDE_DYNAMIC_TYPE_S8:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRId8, item->u.side_s8);
+ printf("%" PRId8, item->u.side_basic.u.side_s8);
break;
case SIDE_DYNAMIC_TYPE_S16:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRId16, item->u.side_s16);
+ printf("%" PRId16, item->u.side_basic.u.side_s16);
break;
case SIDE_DYNAMIC_TYPE_S32:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRId32, item->u.side_s32);
+ printf("%" PRId32, item->u.side_basic.u.side_s32);
break;
case SIDE_DYNAMIC_TYPE_S64:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("%" PRId64, item->u.side_s64);
+ printf("%" PRId64, item->u.side_basic.u.side_s64);
break;
case SIDE_DYNAMIC_TYPE_BLOB:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("0x%" PRIx8, item->u.side_blob);
+ printf("0x%" PRIx8, item->u.side_basic.u.side_blob);
break;
case SIDE_DYNAMIC_TYPE_FLOAT_BINARY16:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
#if __HAVE_FLOAT16
- printf("%g", (double) item->u.side_float_binary16);
+ printf("%g", (double) item->u.side_basic.u.side_float_binary16);
break;
#else
printf("ERROR: Unsupported binary16 float type\n");
abort();
#endif
case SIDE_DYNAMIC_TYPE_FLOAT_BINARY32:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
#if __HAVE_FLOAT32
- printf("%g", (double) item->u.side_float_binary32);
+ printf("%g", (double) item->u.side_basic.u.side_float_binary32);
break;
#else
printf("ERROR: Unsupported binary32 float type\n");
abort();
#endif
case SIDE_DYNAMIC_TYPE_FLOAT_BINARY64:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
#if __HAVE_FLOAT64
- printf("%g", (double) item->u.side_float_binary64);
+ printf("%g", (double) item->u.side_basic.u.side_float_binary64);
break;
#else
printf("ERROR: Unsupported binary64 float type\n");
abort();
#endif
case SIDE_DYNAMIC_TYPE_FLOAT_BINARY128:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
#if __HAVE_FLOAT128
- printf("%Lg", (long double) item->u.side_float_binary128);
+ printf("%Lg", (long double) item->u.side_basic.u.side_float_binary128);
break;
#else
printf("ERROR: Unsupported binary128 float type\n");
abort();
#endif
case SIDE_DYNAMIC_TYPE_STRING:
+ print_attributes("attr:: ", item->u.side_basic.attr, item->u.side_basic.nr_attr);
+ printf("%s", item->u.side_basic.nr_attr ? ", " : "");
printf("value:: ");
- printf("\"%s\"", item->u.string);
+ printf("\"%s\"", item->u.side_basic.u.string);
break;
case SIDE_DYNAMIC_TYPE_STRUCT:
tracer_print_dynamic_struct(item->u.side_dynamic_struct);