aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/svghelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/svghelper.c')
-rw-r--r--tools/perf/util/svghelper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c
index 8b79d3ad1246..740f0328fc13 100644
--- a/tools/perf/util/svghelper.c
+++ b/tools/perf/util/svghelper.c
@@ -285,7 +285,7 @@ void svg_cpu_box(int cpu, u64 __max_freq, u64 __turbo_freq)
285 fprintf(svgfile, "</g>\n"); 285 fprintf(svgfile, "</g>\n");
286} 286}
287 287
288void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name) 288void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name, const char *backtrace)
289{ 289{
290 double width; 290 double width;
291 291
@@ -295,6 +295,8 @@ void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name
295 295
296 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), cpu2y(cpu)); 296 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), cpu2y(cpu));
297 fprintf(svgfile, "<title>%s %s</title>\n", name, time_to_string(end - start)); 297 fprintf(svgfile, "<title>%s %s</title>\n", name, time_to_string(end - start));
298 if (backtrace)
299 fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace);
298 fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n", 300 fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n",
299 time2pixels(end)-time2pixels(start), SLOT_MULT+SLOT_HEIGHT, type); 301 time2pixels(end)-time2pixels(start), SLOT_MULT+SLOT_HEIGHT, type);
300 width = time2pixels(end)-time2pixels(start); 302 width = time2pixels(end)-time2pixels(start);