From: compudj Date: Wed, 7 Sep 2005 19:14:54 +0000 (+0000) Subject: fork fix X-Git-Tag: v0.12.20~2347 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=c607371be079c36e281398a753221002c1c4c851;p=lttv.git fork fix git-svn-id: http://ltt.polymtl.ca/svn@1142 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index dee43252..aef86ae5 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -1017,7 +1017,7 @@ lttv_state_create_process(LttvTraceState *tcs, LttvProcessState *parent, //process->last_cpu_index = ltt_tracefile_num(((LttvTracefileContext*)tfs)->tf); process->execution_stack = g_array_sized_new(FALSE, FALSE, sizeof(LttvExecutionState), PREALLOCATED_EXECUTION_STACK); - process->execution_stack = g_array_set_size(process->execution_stack, 1); + process->execution_stack = g_array_set_size(process->execution_stack, 2); es = process->state = &g_array_index(process->execution_stack, LttvExecutionState, 0); es->t = LTTV_STATE_USER_MODE; @@ -1025,6 +1025,15 @@ lttv_state_create_process(LttvTraceState *tcs, LttvProcessState *parent, es->entry = *timestamp; //g_assert(timestamp->tv_sec != 0); es->change = *timestamp; + es->s = LTTV_STATE_RUN; + + es = process->state = &g_array_index(process->execution_stack, + LttvExecutionState, 1); + es->t = LTTV_STATE_SYSCALL; + es->n = LTTV_STATE_SUBMODE_NONE; + es->entry = *timestamp; + //g_assert(timestamp->tv_sec != 0); + es->change = *timestamp; es->s = LTTV_STATE_WAIT_FORK; return process;