Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163764
b: refs/heads/master
c: aa1ab9d
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Sep 14, 2009
1 parent 4352471 commit 744bfe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d13025222cdb0043e2239b3b819389358bb31bc0
refs/heads/master: aa1ab9d26ae9fe2566a9036e3cb83e7d555b3987
8 changes: 7 additions & 1 deletion trunk/tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ enum thread_state {
struct work_atom {
struct list_head list;
enum thread_state state;
u64 sched_out_time;
u64 wake_up_time;
u64 sched_in_time;
u64 runtime;
Expand Down Expand Up @@ -988,9 +989,11 @@ lat_sched_out(struct task_atoms *atoms,
if (!atom)
die("Non memory");

atom->sched_out_time = timestamp;

if (sched_out_state(switch_event) == 'R') {
atom->state = THREAD_WAIT_CPU;
atom->wake_up_time = timestamp;
atom->wake_up_time = atom->sched_out_time;
}

atom->runtime = delta;
Expand Down Expand Up @@ -1106,6 +1109,9 @@ latency_wakeup_event(struct trace_wakeup_event *wakeup_event,
if (atom->state != THREAD_SLEEPING)
return;

if (atom->sched_out_time > timestamp)
return;

atom->state = THREAD_WAIT_CPU;
atom->wake_up_time = timestamp;
}
Expand Down

0 comments on commit 744bfe8

Please sign in to comment.