this fixes display bugs
git-svn-id: http://ltt.polymtl.ca/svn@2571
04897980-b3bd-0310-b5e0-
8ef037075253
static void
restore_init_state(LttvTraceState *self)
{
static void
restore_init_state(LttvTraceState *self)
{
+ guint i, nb_cpus, nb_irqs;
LttvTracefileState *tfcs;
LttvTracefileState *tfcs;
//lttv_process_trace_seek_time(&self->parent, ltt_time_zero);
nb_cpus = ltt_trace_get_num_cpu(self->parent.t);
//lttv_process_trace_seek_time(&self->parent, ltt_time_zero);
nb_cpus = ltt_trace_get_num_cpu(self->parent.t);
+ nb_irqs = self->nb_irqs;
/* Put the per cpu running_process to beginning state : process 0. */
for(i=0; i< nb_cpus; i++) {
/* Put the per cpu running_process to beginning state : process 0. */
for(i=0; i< nb_cpus; i++) {
//self->running_process[i]->state->s = LTTV_STATE_RUN;
self->running_process[i]->cpu = i;
//self->running_process[i]->state->s = LTTV_STATE_RUN;
self->running_process[i]->cpu = i;
+
+ /* reset cpu states */
+ if(self->cpu_states[i].mode_stack->len > 0)
+ g_array_remove_range(self->cpu_states[i].mode_stack, 0, self->cpu_states[i].mode_stack->len);
+ }
+
+ for(i=0; i<nb_irqs; i++) {
+ if(self->irq_states[i].mode_stack->len > 0)
+ g_array_remove_range(self->irq_states[i].mode_stack, 0, self->irq_states[i].mode_stack->len);