From 4f1202c8e61478984ed2d0df616149faf84c2a7f Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sun, 20 Sep 2009 18:13:28 +0200 Subject: perf timechart: Show the name of the waker/wakee in timechart Timechart currently shows thin green lines for sending or receiving wakeups. This patch also prints (in a very small font) the name of the process that is being woken/wakes up this process. Signed-off-by: Arjan van de Ven Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Frederic Weisbecker LKML-Reference: <20090920181328.68baa978@linux.intel.com> Signed-off-by: Ingo Molnar --- tools/perf/builtin-timechart.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tools/perf/builtin-timechart.c') diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 58d737ec8f5e..3f45b8b24e3d 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -752,6 +752,7 @@ static void draw_wakeups(void) we = wake_events; while (we) { int from = 0, to = 0; + char *task_from = NULL, *task_to = NULL; /* locate the column of the waker and wakee */ p = all_data; @@ -760,10 +761,14 @@ static void draw_wakeups(void) c = p->all; while (c) { if (c->Y && c->start_time <= we->time && c->end_time >= we->time) { - if (p->pid == we->waker) + if (p->pid == we->waker) { from = c->Y; - if (p->pid == we->wakee) + task_from = c->comm; + } + if (p->pid == we->wakee) { to = c->Y; + task_to = c->comm; + } } c = c->next; } @@ -776,7 +781,7 @@ static void draw_wakeups(void) else if (from && to && abs(from - to) == 1) svg_wakeline(we->time, from, to); else - svg_partial_wakeline(we->time, from, to); + svg_partial_wakeline(we->time, from, task_from, to, task_to); we = we->next; } } -- cgit v1.2.3-59-g8ed1b