The event kernel.sched_try_wakeup can occur for process already running (in
kernel/sched.c:try_to_wake_up). Hence, in this condition, this event must not
change the state of the process to LTTV_STATE_WAIT_CPU.
This patch supports SMP
Signed-off-by: Francis Giraldeau <francis.giraldeau@usherbrooke.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
(LttvTraceState*)s->parent.t_context,
woken_cpu, woken_pid,
&s->parent.timestamp);
- process->state->s = LTTV_STATE_WAIT_CPU;
- process->state->change = s->parent.timestamp;
+
+ if (process->state->s == LTTV_STATE_WAIT || process->state->s == LTTV_STATE_WAIT_FORK)
+ {
+ process->state->s = LTTV_STATE_WAIT_CPU;
+ process->state->change = s->parent.timestamp;
+ }
g_debug("Wakeup: process %d on CPU %u\n", woken_pid, woken_cpu);