X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fstats.c;h=eaa2041ceb5485cf969581f14161584d5578d971;hb=49bf71b500f112cc90b790eb3975cceac351d021;hp=311658c1141443ee5823016940e956a42e2ce393;hpb=f7afe191fd58f0bf4bab9c9514c261535b99d32b;p=lttv.git diff --git a/ltt/branches/poly/lttv/stats.c b/ltt/branches/poly/lttv/stats.c index 311658c1..eaa2041c 100644 --- a/ltt/branches/poly/lttv/stats.c +++ b/ltt/branches/poly/lttv/stats.c @@ -327,9 +327,9 @@ static void mode_change(LttvTracefileStats *tfcs) lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME, LTTV_TIME, &cpu_time); - TimeSub(delta, tfcs->parent.parent.timestamp, + delta = ltt_time_sub(tfcs->parent.parent.timestamp, tfcs->parent.process->state->change); - TimeAdd(*(cpu_time.v_time), *(cpu_time.v_time), delta); + *(cpu_time.v_time) = ltt_time_add(*(cpu_time.v_time), delta); } @@ -341,15 +341,15 @@ static void mode_end(LttvTracefileStats *tfcs) lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_ELAPSED_TIME, LTTV_TIME, &elapsed_time); - TimeSub(delta, tfcs->parent.parent.timestamp, + delta = ltt_time_sub(tfcs->parent.parent.timestamp, tfcs->parent.process->state->entry); - TimeAdd(*(elapsed_time.v_time), *(elapsed_time.v_time), delta); + *(elapsed_time.v_time) = ltt_time_add(*(elapsed_time.v_time), delta); lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME, LTTV_TIME, &cpu_time); - TimeSub(delta, tfcs->parent.parent.timestamp, + delta = ltt_time_sub(tfcs->parent.parent.timestamp, tfcs->parent.process->state->change); - TimeAdd(*(cpu_time.v_time), *(cpu_time.v_time), delta); + *(cpu_time.v_time) = ltt_time_add(*(cpu_time.v_time), delta); }