&g_array_index(ts->parent.tracefiles, LttvTracefileContext*,
process->cpu);
int cleanup_empty = 0;
+ LttTime nested_delta = ltt_time_zero;
+ /* FIXME : ok, this is a hack. The time is infinite here :( */
+ LttTime save_time = (*tfs)->parent.parent.timestamp;
+ LttTime start, end;
+ ltt_trace_time_span_get(ts->parent.t, &start, &end);
+ (*tfs)->parent.parent.timestamp = end;
do {
if(ltt_time_compare(process->state->cum_cpu_time, ltt_time_zero) != 0) {
process->current_function,
process->state->t, process->state->n, &((*tfs)->current_events_tree),
&((*tfs)->current_event_types_tree));
- /* FIXME : ok, this is a hack. The time is infinite here :( */
- LttTime save_time = (*tfs)->parent.parent.timestamp;
- LttTime start, end;
- ltt_trace_time_span_get(ts->parent.t, &start, &end);
- (*tfs)->parent.parent.timestamp = end;
mode_end(*tfs);
- (*tfs)->parent.parent.timestamp = save_time;
+ nested_delta = process->state->cum_cpu_time;
}
cleanup_empty = lttv_state_pop_state_cleanup(process,
(LttvTracefileState *)*tfs);
+ process->state->cum_cpu_time = ltt_time_add(process->state->cum_cpu_time,
+ nested_delta);
+
} while(cleanup_empty != 1);
+
+ (*tfs)->parent.parent.timestamp = save_time;
}
/* For each process in the state, for each of their stacked states,
{
LttvTraceState *ts = (LttvTraceState *)tcs;
-#if 0
/* Does not work correctly FIXME. */
g_hash_table_foreach(ts->processes, lttv_stats_cleanup_process_state,
tcs);
-#endif //0
}
void