kernel thread stack size = 1
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 7 Dec 2006 20:57:47 +0000 (20:57 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 7 Dec 2006 20:57:47 +0000 (20:57 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2292 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/stats.c

index 92d5af7267f6c15f52189f2e7aa9fe621717cbaf..98c4c3322cf94d31274d38015f41e0a4f9f59fa3 100644 (file)
@@ -2274,7 +2274,10 @@ static gboolean process_kernel_thread(void *hook_data, void *call_data)
   s->parent.target_pid = pid;
 
   process = lttv_state_find_process(ts, ANY_CPU, pid);
-  es = &g_array_index(process->execution_stack, LttvExecutionState, 0);
+  process->execution_stack = 
+    g_array_set_size(process->execution_stack, 1);
+  es = process->state =
+    &g_array_index(process->execution_stack, LttvExecutionState, 0);
   es->t = LTTV_STATE_SYSCALL;
   process->type = LTTV_STATE_KERNEL_THREAD;
 
index 49c359d2c1375dbef03c96749159b30fc5ec331a..c71b204538621e50c4024182e3baac9a43fbcb5f 100644 (file)
@@ -484,6 +484,9 @@ static void mode_end(LttvTracefileStats *tfcs)
 
   LttTime delta;
 
+  /* FIXME put there in case of a missing update after a state modification */
+  //update_event_tree(tfcs);
+
   lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_ELAPSED_TIME, 
       LTTV_TIME, &elapsed_time);
 
@@ -495,6 +498,8 @@ static void mode_end(LttvTracefileStats *tfcs)
 
   *(elapsed_time.v_time) = ltt_time_add(*(elapsed_time.v_time), delta);
 
+  //g_assert(delta.tv_nsec != 14736);
+
   lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME, 
       LTTV_TIME, &cpu_time);
 
@@ -688,7 +693,6 @@ gboolean before_schedchange(void *hook_data, void *call_data)
   state_out = ltt_event_get_int(e, thf->f3);
 
   /* compute the time for the process to schedule out */
-
   mode_change(tfcs);
 
   return FALSE;
@@ -858,9 +862,6 @@ static void lttv_stats_cleanup_state(LttvTraceStats *tcs)
   for(i=0; i<nb_cpus; i++) {
     lttv_stats_cleanup_process_state(ts, ts->running_process[i]);
   }
-  /* Does not work correctly FIXME. */
-  //g_hash_table_foreach(ts->processes, lttv_stats_cleanup_process_state,
-  //    tcs);
 }
 
 void
This page took 0.027173 seconds and 4 git commands to generate.