X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Ftext%2FtextDump.c;h=2cd60264aa15d1c9263a018433dbee713507a875;hb=f204781b2f3a0170f46d7ca6cba369ca8b38af88;hp=dbb8ec0fbcf1d09c7e21f38b4cd2d4c4631199c6;hpb=8e680509351245867a89f5647c7b926af7652f17;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/text/textDump.c b/ltt/branches/poly/lttv/modules/text/textDump.c index dbb8ec0f..2cd60264 100644 --- a/ltt/branches/poly/lttv/modules/text/textDump.c +++ b/ltt/branches/poly/lttv/modules/text/textDump.c @@ -70,10 +70,15 @@ print_tree(FILE *fp, GString *indent, LttvAttribute *tree) LttvAttributeType type; + gboolean is_named; + nb = lttv_attribute_get_number(tree); for(i = 0 ; i < nb ; i++) { - type = lttv_attribute_get(tree, i, &name, &value); - fprintf(fp, "%s%s: ", indent->str, g_quark_to_string(name)); + type = lttv_attribute_get(tree, i, &name, &value, &is_named); + if(is_named) + fprintf(fp, "%s%s: ", indent->str, g_quark_to_string(name)); + else + fprintf(fp, "%s%lu: ", indent->str, name); switch(type) { case LTTV_INT: @@ -109,7 +114,7 @@ print_tree(FILE *fp, GString *indent, LttvAttribute *tree) fprintf(fp, "\n"); subtree = (LttvAttribute *)*(value.v_gobject); saved_length = indent->len; - g_string_append(indent, " "); + indent = g_string_append(indent, " "); print_tree(fp, indent, subtree); g_string_truncate(indent, saved_length); } @@ -154,7 +159,7 @@ print_stats(FILE *fp, LttvTracesetStats *tscs) start_time.tv_nsec); #endif //FIXME saved_length = indent->len; - g_string_append(indent, " "); + indent = g_string_append(indent, " "); print_tree(fp, indent, tcs->stats); g_string_truncate(indent, saved_length); } @@ -236,7 +241,7 @@ static int write_event_content(void *hook_data, void *call_data) LttvFilter *filter; - guint cpu = ltt_tracefile_num(tfs->parent.tf); + guint cpu = tfs->cpu; LttvTraceState *ts = (LttvTraceState*)tfc->t_context; LttvProcessState *process = ts->running_process[cpu];