X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Fctf-meta-translate.c;h=c9a720309cf64e51ef9218bd3c09ef87deb9a247;hb=335a2da576e59d32c17de2ece1e7e339c50e9c25;hp=e05fdba824b6ed2985991309adb7382f81af19d0;hpb=350ad6c1c5f45a4e90c33e3c1354125c209bbf02;p=babeltrace.git diff --git a/src/plugins/ctf/common/metadata/ctf-meta-translate.c b/src/plugins/ctf/common/metadata/ctf-meta-translate.c index e05fdba8..c9a72030 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-translate.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-translate.c @@ -12,9 +12,6 @@ * all copies or substantial portions of the Software. */ -#define BT_LOG_TAG "PLUGIN/CTF/META/TRANSLATE" -#include "logging.h" - #include #include "common/macros.h" #include "common/assert.h" @@ -26,7 +23,7 @@ #include "ctf-meta-visitors.h" struct ctx { - bt_self_component_source *self_comp; + bt_self_component *self_comp; bt_trace_class *ir_tc; bt_stream_class *ir_sc; struct ctf_trace_class *tc; @@ -543,40 +540,10 @@ int ctf_trace_class_to_ir(struct ctx *ctx) goto end; } - if (ctx->tc->is_uuid_set) { - bt_trace_class_set_uuid(ctx->ir_tc, ctx->tc->uuid); - } - - for (i = 0; i < ctx->tc->env_entries->len; i++) { - struct ctf_trace_class_env_entry *env_entry = - ctf_trace_class_borrow_env_entry_by_index(ctx->tc, i); - - switch (env_entry->type) { - case CTF_TRACE_CLASS_ENV_ENTRY_TYPE_INT: - ret = bt_trace_class_set_environment_entry_integer( - ctx->ir_tc, env_entry->name->str, - env_entry->value.i); - break; - case CTF_TRACE_CLASS_ENV_ENTRY_TYPE_STR: - ret = bt_trace_class_set_environment_entry_string( - ctx->ir_tc, env_entry->name->str, - env_entry->value.str->str); - break; - default: - abort(); - } - - if (ret) { - goto end; - } - } - for (i = 0; i < ctx->tc->clock_classes->len; i++) { struct ctf_clock_class *cc = ctx->tc->clock_classes->pdata[i]; - cc->ir_cc = bt_clock_class_create( - bt_self_component_source_as_self_component( - ctx->self_comp)); + cc->ir_cc = bt_clock_class_create(ctx->self_comp); ctf_clock_class_to_ir(cc->ir_cc, cc); } @@ -590,7 +557,7 @@ end: } BT_HIDDEN -int ctf_trace_class_translate(bt_self_component_source *self_comp, +int ctf_trace_class_translate(bt_self_component *self_comp, bt_trace_class *ir_tc, struct ctf_trace_class *tc) { int ret = 0;