projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.35
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
lttv
/
print.c
diff --git
a/ltt/branches/poly/lttv/lttv/print.c
b/ltt/branches/poly/lttv/lttv/print.c
index 085216f619f9bf3fb72b410523f529bd2afe556a..812ecef5409f652cf1c6b9ef1813070da11f16d2 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/print.c
+++ b/
ltt/branches/poly/lttv/lttv/print.c
@@
-49,8
+49,6
@@
void lttv_print_field(LttEvent *e, LttField *f, GString *s,
LttType *type;
LttType *type;
- LttField *element;
-
GQuark name;
int nb, i;
GQuark name;
int nb, i;
@@
-107,10
+105,9
@@
void lttv_print_field(LttEvent *e, LttField *f, GString *s,
case LTT_SEQUENCE:
g_string_append_printf(s, "{ ");
nb = ltt_event_field_element_number(e,f);
case LTT_SEQUENCE:
g_string_append_printf(s, "{ ");
nb = ltt_event_field_element_number(e,f);
- element = ltt_field_element(f);
for(i = 0 ; i < nb ; i++) {
for(i = 0 ; i < nb ; i++) {
- ltt_event_field_element_select(e,f,i);
- lttv_print_field(e,
element
, s, field_names);
+
LttField *child =
ltt_event_field_element_select(e,f,i);
+ lttv_print_field(e,
child
, s, field_names);
if(i != nb-1) g_string_append_printf(s, ", ");
}
g_string_append_printf(s, " }");
if(i != nb-1) g_string_append_printf(s, ", ");
}
g_string_append_printf(s, " }");
@@
-120,9
+117,10
@@
void lttv_print_field(LttEvent *e, LttField *f, GString *s,
g_string_append_printf(s, "{ ");
nb = ltt_type_member_number(type);
for(i = 0 ; i < nb ; i++) {
g_string_append_printf(s, "{ ");
nb = ltt_type_member_number(type);
for(i = 0 ; i < nb ; i++) {
+ LttField *element;
element = ltt_field_member(f,i);
if(field_names) {
element = ltt_field_member(f,i);
if(field_names) {
-
ltt_type_member_type(type, i, &name
);
+
name = ltt_field_name(element
);
g_string_append_printf(s, "%s = ", g_quark_to_string(name));
}
lttv_print_field(e, element, s, field_names);
g_string_append_printf(s, "%s = ", g_quark_to_string(name));
}
lttv_print_field(e, element, s, field_names);
@@
-135,9
+133,10
@@
void lttv_print_field(LttEvent *e, LttField *f, GString *s,
g_string_append_printf(s, "{ ");
nb = ltt_type_member_number(type);
for(i = 0 ; i < nb ; i++) {
g_string_append_printf(s, "{ ");
nb = ltt_type_member_number(type);
for(i = 0 ; i < nb ; i++) {
+ LttField *element;
element = ltt_field_member(f,i);
if(field_names) {
element = ltt_field_member(f,i);
if(field_names) {
-
ltt_type_member_type(type, i, &name
);
+
name = ltt_field_name(element
);
g_string_append_printf(s, "%s = ", g_quark_to_string(name));
}
lttv_print_field(e, element, s, field_names);
g_string_append_printf(s, "%s = ", g_quark_to_string(name));
}
lttv_print_field(e, element, s, field_names);
@@
-145,7
+144,8
@@
void lttv_print_field(LttEvent *e, LttField *f, GString *s,
}
g_string_append_printf(s, " }");
break;
}
g_string_append_printf(s, " }");
break;
-
+ case LTT_NONE:
+ break;
}
}
}
}
@@
-161,10
+161,12
@@
void lttv_event_to_string(LttEvent *e, GString *s,
LttTime time;
LttTime time;
- guint cpu =
ltt_tracefile_num(tfs->parent.tf)
;
+ guint cpu =
tfs->cpu
;
LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context;
LttvProcessState *process = ts->running_process[cpu];
LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context;
LttvProcessState *process = ts->running_process[cpu];
+ GQuark name;
+
guint i, num_fields;
g_string_set_size(s,0);
guint i, num_fields;
g_string_set_size(s,0);
@@
-181,17
+183,27
@@
void lttv_event_to_string(LttEvent *e, GString *s,
g_quark_to_string(ltt_tracefile_name(tfs->parent.tf)),
cpu);
/* Print the process id and the state/interrupt type of the process */
g_quark_to_string(ltt_tracefile_name(tfs->parent.tf)),
cpu);
/* Print the process id and the state/interrupt type of the process */
- g_string_append_printf(s,", %u, %u, %s", process->pid,
- process->ppid,
+ g_string_append_printf(s,", %u, %u,
0x%llX,
%s", process->pid,
+ process->ppid,
process->current_function,
g_quark_to_string(process->state->t));
}
event_type = ltt_event_eventtype(e);
num_fields = ltt_eventtype_num_fields(event_type);
g_quark_to_string(process->state->t));
}
event_type = ltt_event_eventtype(e);
num_fields = ltt_eventtype_num_fields(event_type);
+ if(num_fields == 0) return;
+ g_string_append_printf(s, " ");
+ g_string_append_printf(s, "{ ");
for(i=0; i<num_fields; i++) {
for(i=0; i<num_fields; i++) {
- field = ltt_event_field(event_type, i);
+ field = ltt_eventtype_field(event_type, i);
+ if(field_names) {
+ name = ltt_field_name(field);
+ if(name)
+ g_string_append_printf(s, "%s = ", g_quark_to_string(name));
+ }
lttv_print_field(e, field, s, field_names);
lttv_print_field(e, field, s, field_names);
+ if(i != num_fields-1) g_string_append_printf(s, ", ");
}
}
+ g_string_append_printf(s, " }");
}
static void init()
}
static void init()
This page took
0.023592 seconds
and
4
git commands to generate.