process->state->t = LTTV_STATE_SYSCALL;
process->state->s = LTTV_STATE_WAIT;
process->state->change = s->parent.timestamp;
+ process->state->entry = s->parent.timestamp;
}
} else {
if(unlikely(process->state->s == LTTV_STATE_EXIT)) {
return FALSE;
}
-/* We stamp a newly created process as kernel_thread */
+/* We stamp a newly created process as kernel_thread.
+ * The thread should not be running yet. */
static gboolean process_kernel_thread(void *hook_data, void *call_data)
{
LttvTracefileState *s = (LttvTracefileState *)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;
es->s = LTTV_STATE_RUN;
if(process->execution_stack->len == 1) {
- /* Still in user mode, means never scheduled */
+ /* Still in bottom unknown mode, means never did a system call
+ * May be either in user mode, syscall mode, running or waiting.*/
+ /* FIXME : we may be tagging syscall mode when being user mode */
process->execution_stack =
g_array_set_size(process->execution_stack, 2);
es = process->state = &g_array_index(process->execution_stack,
//g_assert(timestamp->tv_sec != 0);
es->change = *timestamp;
es->cum_cpu_time = ltt_time_zero;
- es->s = LTTV_STATE_WAIT;
+ //es->s = LTTV_STATE_WAIT;
}
}
}