X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fstate.c;h=1457bade9fe2f3c3f3aa5619a2291e35d4155072;hb=b6db18f8146b58641bfc639049bc53aaeb658bb9;hp=4176313c82391c008ede664a67c4f92886266af1;hpb=308711e5772586ce8ecc22ce04e571b175309b8e;p=lttv.git diff --git a/ltt/branches/poly/lttv/state.c b/ltt/branches/poly/lttv/state.c index 4176313c..1457bade 100644 --- a/ltt/branches/poly/lttv/state.c +++ b/ltt/branches/poly/lttv/state.c @@ -3,6 +3,7 @@ #include #include #include +#include LttvExecutionMode LTTV_STATE_MODE_UNKNOWN, @@ -257,7 +258,7 @@ static void state_save(LttvTraceState *self, LttvAttribute *container) LTTV_POINTER); if(tfcs->parent.e == NULL) *(value.v_pointer) = NULL; else { - ep = g_new(LttEventPosition, 1); + ep = ltt_event_position_new(); ltt_event_position(tfcs->parent.e, ep); *(value.v_pointer) = ep; } @@ -694,7 +695,7 @@ static gboolean schedchange(void *hook_data, void *call_data) else s->process->state->s = LTTV_STATE_WAIT; if(s->process->pid == 0) - s->process->pid == pid_out; + s->process->pid = pid_out; s->process->state->change = s->parent.timestamp; } @@ -861,7 +862,7 @@ static gboolean block_end(void *hook_data, void *call_data) LttvTraceState *tcs = (LttvTraceState *)(tfcs->parent.t_context); - LttEventPosition ep; + LttEventPosition *ep = ltt_event_position_new(); guint nb_block, nb_event; @@ -871,9 +872,9 @@ static gboolean block_end(void *hook_data, void *call_data) LttvAttributeValue value; - ltt_event_position(tfcs->parent.e, &ep); + ltt_event_position(tfcs->parent.e, ep); - ltt_event_position_get(&ep, &nb_block, &nb_event, &tf); + ltt_event_position_get(ep, &nb_block, &nb_event, &tf); tcs->nb_event += nb_event - tfcs->saved_position; tfcs->saved_position = 0; if(tcs->nb_event >= tcs->save_interval) {