diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-09-20 12:13:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-20 13:37:34 -0400 |
commit | 4f1202c8e61478984ed2d0df616149faf84c2a7f (patch) | |
tree | 540fb2e48d8b55bda2db75a61085908401453ac0 /tools/perf/util/svghelper.c | |
parent | cdf8073d6b2c6c5a3cd6ce0e6c1297157f7f99ba (diff) |
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 <arjan@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090920181328.68baa978@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/svghelper.c')
-rw-r--r-- | tools/perf/util/svghelper.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c index b0fcecdf378d..9f70fa8e7643 100644 --- a/tools/perf/util/svghelper.c +++ b/tools/perf/util/svghelper.c | |||
@@ -242,7 +242,7 @@ void svg_pstate(int cpu, u64 start, u64 end, u64 freq) | |||
242 | } | 242 | } |
243 | 243 | ||
244 | 244 | ||
245 | void svg_partial_wakeline(u64 start, int row1, int row2) | 245 | void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc2) |
246 | { | 246 | { |
247 | double height; | 247 | double height; |
248 | 248 | ||
@@ -251,21 +251,35 @@ void svg_partial_wakeline(u64 start, int row1, int row2) | |||
251 | 251 | ||
252 | 252 | ||
253 | if (row1 < row2) { | 253 | if (row1 < row2) { |
254 | if (row1) | 254 | if (row1) { |
255 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", | 255 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", |
256 | time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); | 256 | time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); |
257 | 257 | if (desc2) | |
258 | if (row2) | 258 | fprintf(svgfile, "<text transform=\"translate(%4.8f,%4.8f) rotate(90)\" font-size=\"0.02pt\">%s ></text>\n", |
259 | time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_HEIGHT/48, desc2); | ||
260 | } | ||
261 | if (row2) { | ||
259 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", | 262 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", |
260 | time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row2 * SLOT_MULT); | 263 | time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row2 * SLOT_MULT); |
264 | if (desc1) | ||
265 | fprintf(svgfile, "<text transform=\"translate(%4.8f,%4.8f) rotate(90)\" font-size=\"0.02pt\">%s ></text>\n", | ||
266 | time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, desc1); | ||
267 | } | ||
261 | } else { | 268 | } else { |
262 | if (row2) | 269 | if (row2) { |
263 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", | 270 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", |
264 | time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); | 271 | time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); |
265 | 272 | if (desc1) | |
266 | if (row1) | 273 | fprintf(svgfile, "<text transform=\"translate(%4.8f,%4.8f) rotate(90)\" font-size=\"0.02pt\">%s <</text>\n", |
274 | time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/48, desc1); | ||
275 | } | ||
276 | if (row1) { | ||
267 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", | 277 | fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%4.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n", |
268 | time2pixels(start), row1 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row1 * SLOT_MULT); | 278 | time2pixels(start), row1 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row1 * SLOT_MULT); |
279 | if (desc2) | ||
280 | fprintf(svgfile, "<text transform=\"translate(%4.8f,%4.8f) rotate(90)\" font-size=\"0.02pt\">%s <</text>\n", | ||
281 | time2pixels(start), row1 * SLOT_MULT - SLOT_HEIGHT/32, desc2); | ||
282 | } | ||
269 | } | 283 | } |
270 | height = row1 * SLOT_MULT; | 284 | height = row1 * SLOT_MULT; |
271 | if (row2 > row1) | 285 | if (row2 > row1) |