From: pmf Date: Tue, 31 Jul 2007 19:46:15 +0000 (+0000) Subject: restore_init_state: restore cpu resource info X-Git-Tag: v0.12.20~918 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=311b8e398d4d986809fabacdeff0762ad20bb438;p=lttv.git restore_init_state: restore cpu resource info this fixes display bugs git-svn-id: http://ltt.polymtl.ca/svn@2571 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 848e6b1e..0c0a4cbc 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -243,7 +243,7 @@ static void lttv_state_free_usertraces(GHashTable *usertraces) static void restore_init_state(LttvTraceState *self) { - guint i, nb_cpus; + guint i, nb_cpus, nb_irqs; LttvTracefileState *tfcs; @@ -268,6 +268,7 @@ restore_init_state(LttvTraceState *self) //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++) { @@ -286,6 +287,15 @@ restore_init_state(LttvTraceState *self) //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; iirq_states[i].mode_stack->len > 0) + g_array_remove_range(self->irq_states[i].mode_stack, 0, self->irq_states[i].mode_stack->len); } #if 0