X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fstate.c;h=a753b80240a9f94ada179f2b76f32ff9910a11d4;hb=a5dcde2f975b43a9c6069c4a346528588bf1f8c8;hp=4176313c82391c008ede664a67c4f92886266af1;hpb=49bf71b500f112cc90b790eb3975cceac351d021;p=lttv.git diff --git a/ltt/branches/poly/lttv/state.c b/ltt/branches/poly/lttv/state.c index 4176313c..a753b802 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; } @@ -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) {