*/
struct ctx {
/* Trace IR trace class being filled (owned by this) */
- struct bt_trace_class *trace_class;
+ bt_trace_class *trace_class;
/* CTF meta trace being filled (owned by this) */
struct ctf_trace_class *ctf_tc;
scope = parent_scope;
}
- bt_object_put_ref(ctx->trace_class);
+ bt_trace_class_put_ref(ctx->trace_class);
if (ctx->ctf_tc) {
ctf_trace_class_destroy(ctx->ctf_tc);
int signedness = 0;
struct ctf_node *expression;
uint64_t alignment = 0, size = 0;
- struct bt_clock_class *mapped_clock_class = NULL;
+ bt_clock_class *mapped_clock_class = NULL;
enum ctf_encoding encoding = CTF_ENCODING_NONE;
enum bt_field_class_integer_preferred_display_base base =
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL;
(*integer_decl)->disp_base = base;
(*integer_decl)->encoding = encoding;
(*integer_decl)->mapped_clock_class = mapped_clock_class;
- bt_object_get_ref((*integer_decl)->mapped_clock_class);
+ bt_clock_class_get_ref((*integer_decl)->mapped_clock_class);
return 0;
error:
int auto_map_field_to_trace_clock_class(struct ctx *ctx,
struct ctf_field_class *fc)
{
- struct bt_clock_class *clock_class_to_map_to = NULL;
+ bt_clock_class *clock_class_to_map_to = NULL;
struct ctf_field_class_int *int_fc = (void *) fc;
int ret = 0;
uint64_t clock_class_count;
BT_ASSERT(ret == 0);
g_ptr_array_add(ctx->ctf_tc->clock_classes,
clock_class_to_map_to);
- bt_object_get_ref(clock_class_to_map_to);
+ bt_clock_class_get_ref(clock_class_to_map_to);
break;
case 1:
/*
* this one.
*/
clock_class_to_map_to = ctx->ctf_tc->clock_classes->pdata[0];
- bt_object_get_ref(clock_class_to_map_to);
+ bt_clock_class_get_ref(clock_class_to_map_to);
break;
default:
/*
BT_ASSERT(clock_class_to_map_to);
int_fc->mapped_clock_class = clock_class_to_map_to;
- bt_object_get_ref(int_fc->mapped_clock_class);
+ bt_clock_class_get_ref(int_fc->mapped_clock_class);
end:
- bt_object_put_ref(clock_class_to_map_to);
+ bt_clock_class_put_ref(clock_class_to_map_to);
return ret;
}
static
int visit_clock_decl_entry(struct ctx *ctx, struct ctf_node *entry_node,
- struct bt_clock_class *clock, int *set, int64_t *offset_seconds,
+ bt_clock_class *clock, int *set, int64_t *offset_seconds,
uint64_t *offset_cycles)
{
int ret = 0;
static
void apply_clock_class_offset(struct ctx *ctx,
- struct bt_clock_class *clock)
+ bt_clock_class *clock)
{
uint64_t freq;
int64_t offset_s_to_apply = ctx->decoder_config.clock_class_offset_s;
{
int ret = 0;
int set = 0;
- struct bt_clock_class *clock;
+ bt_clock_class *clock;
struct ctf_node *entry_node;
struct bt_list_head *decl_list = &clock_node->u.clock.declaration_list;
const char *clock_class_name;
/*
* Old versions of LTTng forgot to set its clock class
* as absolute, even if it is. This is important because
- * it's a condition to be able to sort notifications
+ * it's a condition to be able to sort messages
* from different sources.
*/
bt_clock_class_set_is_absolute(clock, BT_TRUE);
bt_clock_class_set_offset(clock, offset_seconds, offset_cycles);
apply_clock_class_offset(ctx, clock);
g_ptr_array_add(ctx->ctf_tc->clock_classes, clock);
- bt_object_get_ref(clock);
+ bt_clock_class_get_ref(clock);
end:
- BT_OBJECT_PUT_REF_AND_RESET(clock);
+ BT_CLOCK_CLASS_PUT_REF_AND_RESET(clock);
return ret;
}
}
BT_HIDDEN
-struct bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
+bt_trace_class *ctf_visitor_generate_ir_get_ir_trace_class(
struct ctf_visitor_generate_ir *visitor)
{
struct ctx *ctx = (void *) visitor;
BT_ASSERT(ctx);
BT_ASSERT(ctx->trace_class);
- bt_object_get_ref(ctx->trace_class);
+ bt_trace_class_get_ref(ctx->trace_class);
return ctx->trace_class;
}