Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167786
b: refs/heads/master
c: 3bc2a39
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Oct 20, 2009
1 parent 037b1da commit 798816d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 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: dc79959aaf80e518741657a702fa2727c86c1189
refs/heads/master: 3bc2a39c69d423d5d1f0b3ef77960b1464c976a0
28 changes: 26 additions & 2 deletions trunk/tools/perf/builtin-timechart.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,26 +765,50 @@ static void draw_wakeups(void)
if (c->Y && c->start_time <= we->time && c->end_time >= we->time) {
if (p->pid == we->waker) {
from = c->Y;
task_from = c->comm;
task_from = strdup(c->comm);
}
if (p->pid == we->wakee) {
to = c->Y;
task_to = c->comm;
task_to = strdup(c->comm);
}
}
c = c->next;
}
c = p->all;
while (c) {
if (p->pid == we->waker && !from) {
from = c->Y;
task_from = strdup(c->comm);
}
if (p->pid == we->wakee && !to) {
to = c->Y;
task_to = strdup(c->comm);
}
c = c->next;
}
}
p = p->next;
}

if (!task_from) {
task_from = malloc(40);
sprintf(task_from, "[%i]", we->waker);
}
if (!task_to) {
task_to = malloc(40);
sprintf(task_to, "[%i]", we->wakee);
}

if (we->waker == -1)
svg_interrupt(we->time, to);
else if (from && to && abs(from - to) == 1)
svg_wakeline(we->time, from, to);
else
svg_partial_wakeline(we->time, from, task_from, to, task_to);
we = we->next;

free(task_from);
free(task_to);
}
}

Expand Down

0 comments on commit 798816d

Please sign in to comment.