update compat
[lttv.git] / ltt / branches / poly / lttv / lttv / state.c
index 6bd7912a1b319c39575c95668df78c85d1a03fb2..7835b708d2a33a097b9d037634f368bb0047281e 100644 (file)
@@ -253,7 +253,10 @@ static void lttv_state_free_usertraces(GHashTable *usertraces)
   g_hash_table_destroy(usertraces);
 }
 
-
+gboolean rettrue(gpointer key, gpointer value, gpointer user_data)
+{
+       return TRUE;
+}
 
 static void
 restore_init_state(LttvTraceState *self)
@@ -316,7 +319,8 @@ restore_init_state(LttvTraceState *self)
 
   /* reset bdev states */
   g_hash_table_foreach(self->bdev_states, bdevstate_free_cb, NULL);
-  g_hash_table_steal_all(self->bdev_states);
+  //g_hash_table_steal_all(self->bdev_states);
+  g_hash_table_foreach_steal(self->bdev_states, rettrue, NULL);
   
 #if 0
   nb_tracefile = self->parent.tracefiles->len;
@@ -1155,7 +1159,7 @@ static void lttv_state_free_cpu_states(LttvCPUState *states, guint n)
   guint i;
 
   for(i=0; i<n; i++) {
-    g_array_free(states[i].mode_stack, FALSE);
+    g_array_free(states[i].mode_stack, TRUE);
   }
 
   g_free(states);
@@ -1184,7 +1188,7 @@ static void lttv_state_free_irq_states(LttvIRQState *states, guint n)
   guint i;
 
   for(i=0; i<n; i++) {
-    g_array_free(states[i].mode_stack, FALSE);
+    g_array_free(states[i].mode_stack, TRUE);
   }
 
   g_free(states);
@@ -1221,7 +1225,7 @@ static LttvBdevState *bdevstate_new(void)
 
 static void bdevstate_free(LttvBdevState *bds)
 {
-  g_array_free(bds->mode_stack, FALSE);
+  g_array_free(bds->mode_stack, TRUE);
   g_free(bds);
 }
 
@@ -2139,7 +2143,7 @@ lttv_state_find_process_or_create(LttvTraceState *ts, guint cpu, guint pid,
  * the parent waits for its child terminaison, but may also happen in special
  * cases in the child's exit : when the parent ignores its children SIGCCHLD or
  * has the flag SA_NOCLDWAIT. It can also happen when the child is part
- * of a killed thread ground, but isn't the leader.
+ * of a killed thread group, but isn't the leader.
  */
 static void exit_process(LttvTracefileState *tfs, LttvProcessState *process) 
 {
@@ -2546,7 +2550,7 @@ static gboolean schedchange(void *hook_data, void *call_data)
         process->state->change = s->parent.timestamp;
       }
       
-      if(state_out == 32 || state_out == 128)
+      if(state_out == 32 || state_out == 64)
          exit_process(s, process); /* EXIT_DEAD || TASK_DEAD */
             /* see sched.h for states */
     }
This page took 0.039912 seconds and 4 git commands to generate.