From 15f3a340cafb619cc5af27ef60da41f880e9828f Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 7 Dec 2006 20:57:47 +0000 Subject: [PATCH] kernel thread stack size = 1 git-svn-id: http://ltt.polymtl.ca/svn@2292 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/state.c | 5 ++++- ltt/branches/poly/lttv/lttv/stats.c | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 92d5af72..98c4c332 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -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; diff --git a/ltt/branches/poly/lttv/lttv/stats.c b/ltt/branches/poly/lttv/lttv/stats.c index 49c359d2..c71b2045 100644 --- a/ltt/branches/poly/lttv/lttv/stats.c +++ b/ltt/branches/poly/lttv/lttv/stats.c @@ -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; irunning_process[i]); } - /* Does not work correctly FIXME. */ - //g_hash_table_foreach(ts->processes, lttv_stats_cleanup_process_state, - // tcs); } void -- 2.34.1