guint i, nb_cpus;
LttvTracefileState *tfcs;
+
+ LttTime start_time, end_time;
/* Free the process tables */
if(self->processes != NULL) lttv_state_free_process_table(self->processes);
//g_tree_destroy(self->parent.ts_context->pqueue);
//self->parent.ts_context->pqueue = g_tree_new(compare_tracefile);
+ ltt_trace_time_span_get(self->parent.t, &start_time, &end_time);
//lttv_process_trace_seek_time(&self->parent, ltt_time_zero);
/* Put the per cpu running_process to beginning state : process 0. */
for(i=0; i< nb_cpus; i++) {
self->running_process[i] = lttv_state_create_process(self, NULL, i, 0,
- LTTV_STATE_UNNAMED, <t_time_zero);
+ LTTV_STATE_UNNAMED, &start_time);
self->running_process[i]->state->s = LTTV_STATE_RUN;
self->running_process[i]->cpu = i;
}
LttvExecutionSubmode submode;
- guint nb_traps = ((LttvTraceState *)(s->parent.t_context))->nb_traps;
- guint trap = ltt_event_get_unsigned(e, f);
+ guint64 nb_traps = ((LttvTraceState *)(s->parent.t_context))->nb_traps;
+ guint64 trap = ltt_event_get_long_unsigned(e, f);
if(trap < nb_traps) {
submode = ((LttvTraceState *)(s->parent.t_context))->trap_names[trap];
LttvExecutionSubmode submode;
submode = ((LttvTraceState *)(s->parent.t_context))->soft_irq_names[
- ltt_event_get_unsigned(e, f)];
+ ltt_event_get_long_unsigned(e, f)];
/* Do something with the info about being in user or system mode when int? */
push_state(s, LTTV_STATE_SOFT_IRQ, submode);
guint pid;
guint cpu = s->cpu;
LttvTraceState *ts = (LttvTraceState*)s->parent.t_context;
- LttvProcessState *process = ts->running_process[cpu];
+ LttvProcessState *process; // = ts->running_process[cpu];
pid = ltt_event_get_unsigned(e, thf->f1);
// FIXME : Add this test in the "known state" section
// g_assert(process->pid == pid);
+ process = lttv_state_find_process(ts, ANY_CPU, pid);
if(likely(process != NULL)) {
process->state->s = LTTV_STATE_EXIT;
}
break;
}
}
- //if(i == num_cpus) /* process is not scheduled */
- //exit_process(s, process); // do nothing : wait for the schedchange to
- //delete the process.
+ if(i == num_cpus) /* process is not scheduled */
+ exit_process(s, process);
}
return FALSE;