aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorStanislav Fomichev <stfomichev@yandex-team.ru>2014-07-08 12:03:40 -0400
committerJiri Olsa <jolsa@kernel.org>2014-07-09 18:22:53 -0400
commitf8dda74fb4139f026571b46d8d17f67e75aa157c (patch)
tree131aaa79cdfaa519313d98ebb0097dc51d6589f5 /tools/perf
parent8b5b584daf3b92fc5cdc83919e64231817d2f5a7 (diff)
perf timechart: Fix rendering in Firefox
Firefox doesn't correctly handle cases where we specify number in quotes and have some padding around the number, like the following: <rect ... height=" 3.1" ...> In this case, it doesn't draw the figure. This patch removes 'field width' component from fprintf strings to fix it. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/1404835423-23098-2-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/svghelper.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c
index 6a0a13d07a28..27caf0f45469 100644
--- a/tools/perf/util/svghelper.c
+++ b/tools/perf/util/svghelper.c
@@ -137,7 +137,7 @@ void svg_box(int Yslot, u64 start, u64 end, const char *type)
137 if (!svgfile) 137 if (!svgfile)
138 return; 138 return;
139 139
140 fprintf(svgfile, "<rect x=\"%4.8f\" width=\"%4.8f\" y=\"%4.1f\" height=\"%4.1f\" class=\"%s\"/>\n", 140 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n",
141 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT, type); 141 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT, type);
142} 142}
143 143
@@ -174,7 +174,7 @@ void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace)
174 cpu, time_to_string(end - start)); 174 cpu, time_to_string(end - start));
175 if (backtrace) 175 if (backtrace)
176 fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace); 176 fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace);
177 fprintf(svgfile, "<rect x=\"%4.8f\" width=\"%4.8f\" y=\"%4.1f\" height=\"%4.1f\" class=\"%s\"/>\n", 177 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n",
178 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT, 178 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT,
179 type); 179 type);
180 180
@@ -186,7 +186,7 @@ void svg_running(int Yslot, int cpu, u64 start, u64 end, const char *backtrace)
186 text_size = round_text_size(text_size); 186 text_size = round_text_size(text_size);
187 187
188 if (text_size > MIN_TEXT_SIZE) 188 if (text_size > MIN_TEXT_SIZE)
189 fprintf(svgfile, "<text x=\"%1.8f\" y=\"%1.8f\" font-size=\"%1.8fpt\">%i</text>\n", 189 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"%.8fpt\">%i</text>\n",
190 time2pixels(start), Yslot * SLOT_MULT + SLOT_HEIGHT - 1, text_size, cpu + 1); 190 time2pixels(start), Yslot * SLOT_MULT + SLOT_HEIGHT - 1, text_size, cpu + 1);
191 191
192 fprintf(svgfile, "</g>\n"); 192 fprintf(svgfile, "</g>\n");
@@ -202,10 +202,10 @@ static char *time_to_string(u64 duration)
202 return text; 202 return text;
203 203
204 if (duration < 1000 * 1000) { /* less than 1 msec */ 204 if (duration < 1000 * 1000) { /* less than 1 msec */
205 sprintf(text, "%4.1f us", duration / 1000.0); 205 sprintf(text, "%.1f us", duration / 1000.0);
206 return text; 206 return text;
207 } 207 }
208 sprintf(text, "%4.1f ms", duration / 1000.0 / 1000); 208 sprintf(text, "%.1f ms", duration / 1000.0 / 1000);
209 209
210 return text; 210 return text;
211} 211}
@@ -233,14 +233,14 @@ void svg_waiting(int Yslot, int cpu, u64 start, u64 end, const char *backtrace)
233 233
234 font_size = round_text_size(font_size); 234 font_size = round_text_size(font_size);
235 235
236 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), Yslot * SLOT_MULT); 236 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\">\n", time2pixels(start), Yslot * SLOT_MULT);
237 fprintf(svgfile, "<title>#%d waiting %s</title>\n", cpu, time_to_string(end - start)); 237 fprintf(svgfile, "<title>#%d waiting %s</title>\n", cpu, time_to_string(end - start));
238 if (backtrace) 238 if (backtrace)
239 fprintf(svgfile, "<desc>Waiting on:\n%s</desc>\n", backtrace); 239 fprintf(svgfile, "<desc>Waiting on:\n%s</desc>\n", backtrace);
240 fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n", 240 fprintf(svgfile, "<rect x=\"0\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n",
241 time2pixels(end)-time2pixels(start), SLOT_HEIGHT, style); 241 time2pixels(end)-time2pixels(start), SLOT_HEIGHT, style);
242 if (font_size > MIN_TEXT_SIZE) 242 if (font_size > MIN_TEXT_SIZE)
243 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%1.8fpt\"> %s</text>\n", 243 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%.8fpt\"> %s</text>\n",
244 font_size, text); 244 font_size, text);
245 fprintf(svgfile, "</g>\n"); 245 fprintf(svgfile, "</g>\n");
246} 246}
@@ -289,16 +289,16 @@ void svg_cpu_box(int cpu, u64 __max_freq, u64 __turbo_freq)
289 289
290 fprintf(svgfile, "<g>\n"); 290 fprintf(svgfile, "<g>\n");
291 291
292 fprintf(svgfile, "<rect x=\"%4.8f\" width=\"%4.8f\" y=\"%4.1f\" height=\"%4.1f\" class=\"cpu\"/>\n", 292 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"cpu\"/>\n",
293 time2pixels(first_time), 293 time2pixels(first_time),
294 time2pixels(last_time)-time2pixels(first_time), 294 time2pixels(last_time)-time2pixels(first_time),
295 cpu2y(cpu), SLOT_MULT+SLOT_HEIGHT); 295 cpu2y(cpu), SLOT_MULT+SLOT_HEIGHT);
296 296
297 sprintf(cpu_string, "CPU %i", (int)cpu); 297 sprintf(cpu_string, "CPU %i", (int)cpu);
298 fprintf(svgfile, "<text x=\"%4.8f\" y=\"%4.8f\">%s</text>\n", 298 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\">%s</text>\n",
299 10+time2pixels(first_time), cpu2y(cpu) + SLOT_HEIGHT/2, cpu_string); 299 10+time2pixels(first_time), cpu2y(cpu) + SLOT_HEIGHT/2, cpu_string);
300 300
301 fprintf(svgfile, "<text transform=\"translate(%4.8f,%4.8f)\" font-size=\"1.25pt\">%s</text>\n", 301 fprintf(svgfile, "<text transform=\"translate(%.8f,%.8f)\" font-size=\"1.25pt\">%s</text>\n",
302 10+time2pixels(first_time), cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - 4, cpu_model()); 302 10+time2pixels(first_time), cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - 4, cpu_model());
303 303
304 fprintf(svgfile, "</g>\n"); 304 fprintf(svgfile, "</g>\n");
@@ -319,11 +319,11 @@ void svg_process(int cpu, u64 start, u64 end, int pid, const char *name, const c
319 else 319 else
320 type = "sample"; 320 type = "sample";
321 321
322 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), cpu2y(cpu)); 322 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\">\n", time2pixels(start), cpu2y(cpu));
323 fprintf(svgfile, "<title>%d %s running %s</title>\n", pid, name, time_to_string(end - start)); 323 fprintf(svgfile, "<title>%d %s running %s</title>\n", pid, name, time_to_string(end - start));
324 if (backtrace) 324 if (backtrace)
325 fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace); 325 fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace);
326 fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n", 326 fprintf(svgfile, "<rect x=\"0\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n",
327 time2pixels(end)-time2pixels(start), SLOT_MULT+SLOT_HEIGHT, type); 327 time2pixels(end)-time2pixels(start), SLOT_MULT+SLOT_HEIGHT, type);
328 width = time2pixels(end)-time2pixels(start); 328 width = time2pixels(end)-time2pixels(start);
329 if (width > 6) 329 if (width > 6)
@@ -332,7 +332,7 @@ void svg_process(int cpu, u64 start, u64 end, int pid, const char *name, const c
332 width = round_text_size(width); 332 width = round_text_size(width);
333 333
334 if (width > MIN_TEXT_SIZE) 334 if (width > MIN_TEXT_SIZE)
335 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%3.8fpt\">%s</text>\n", 335 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%.8fpt\">%s</text>\n",
336 width, name); 336 width, name);
337 337
338 fprintf(svgfile, "</g>\n"); 338 fprintf(svgfile, "</g>\n");
@@ -353,7 +353,7 @@ void svg_cstate(int cpu, u64 start, u64 end, int type)
353 type = 6; 353 type = 6;
354 sprintf(style, "c%i", type); 354 sprintf(style, "c%i", type);
355 355
356 fprintf(svgfile, "<rect class=\"%s\" x=\"%4.8f\" width=\"%4.8f\" y=\"%4.1f\" height=\"%4.1f\"/>\n", 356 fprintf(svgfile, "<rect class=\"%s\" x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\"/>\n",
357 style, 357 style,
358 time2pixels(start), time2pixels(end)-time2pixels(start), 358 time2pixels(start), time2pixels(end)-time2pixels(start),
359 cpu2y(cpu), SLOT_MULT+SLOT_HEIGHT); 359 cpu2y(cpu), SLOT_MULT+SLOT_HEIGHT);
@@ -365,7 +365,7 @@ void svg_cstate(int cpu, u64 start, u64 end, int type)
365 width = round_text_size(width); 365 width = round_text_size(width);
366 366
367 if (width > MIN_TEXT_SIZE) 367 if (width > MIN_TEXT_SIZE)
368 fprintf(svgfile, "<text x=\"%4.8f\" y=\"%4.8f\" font-size=\"%3.8fpt\">C%i</text>\n", 368 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"%.8fpt\">C%i</text>\n",
369 time2pixels(start), cpu2y(cpu)+width, width, type); 369 time2pixels(start), cpu2y(cpu)+width, width, type);
370 370
371 fprintf(svgfile, "</g>\n"); 371 fprintf(svgfile, "</g>\n");
@@ -407,9 +407,9 @@ void svg_pstate(int cpu, u64 start, u64 end, u64 freq)
407 if (max_freq) 407 if (max_freq)
408 height = freq * 1.0 / max_freq * (SLOT_HEIGHT + SLOT_MULT); 408 height = freq * 1.0 / max_freq * (SLOT_HEIGHT + SLOT_MULT);
409 height = 1 + cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - height; 409 height = 1 + cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - height;
410 fprintf(svgfile, "<line x1=\"%4.8f\" x2=\"%4.8f\" y1=\"%4.1f\" y2=\"%4.1f\" class=\"pstate\"/>\n", 410 fprintf(svgfile, "<line x1=\"%.8f\" x2=\"%.8f\" y1=\"%.1f\" y2=\"%.1f\" class=\"pstate\"/>\n",
411 time2pixels(start), time2pixels(end), height, height); 411 time2pixels(start), time2pixels(end), height, height);
412 fprintf(svgfile, "<text x=\"%4.8f\" y=\"%4.8f\" font-size=\"0.25pt\">%s</text>\n", 412 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"0.25pt\">%s</text>\n",
413 time2pixels(start), height+0.9, HzToHuman(freq)); 413 time2pixels(start), height+0.9, HzToHuman(freq));
414 414
415 fprintf(svgfile, "</g>\n"); 415 fprintf(svgfile, "</g>\n");
@@ -435,32 +435,32 @@ void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc
435 435
436 if (row1 < row2) { 436 if (row1 < row2) {
437 if (row1) { 437 if (row1) {
438 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", 438 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
439 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); 439 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32);
440 if (desc2) 440 if (desc2)
441 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &gt;</text></g>\n", 441 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &gt;</text></g>\n",
442 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_HEIGHT/48, desc2); 442 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT + SLOT_HEIGHT/48, desc2);
443 } 443 }
444 if (row2) { 444 if (row2) {
445 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", 445 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
446 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row2 * SLOT_MULT); 446 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row2 * SLOT_MULT);
447 if (desc1) 447 if (desc1)
448 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &gt;</text></g>\n", 448 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &gt;</text></g>\n",
449 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, desc1); 449 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, desc1);
450 } 450 }
451 } else { 451 } else {
452 if (row2) { 452 if (row2) {
453 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", 453 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
454 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32); 454 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/32);
455 if (desc1) 455 if (desc1)
456 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &lt;</text></g>\n", 456 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &lt;</text></g>\n",
457 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/48, desc1); 457 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT + SLOT_MULT/48, desc1);
458 } 458 }
459 if (row1) { 459 if (row1) {
460 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", 460 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
461 time2pixels(start), row1 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row1 * SLOT_MULT); 461 time2pixels(start), row1 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row1 * SLOT_MULT);
462 if (desc2) 462 if (desc2)
463 fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &lt;</text></g>\n", 463 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\"0.02pt\">%s &lt;</text></g>\n",
464 time2pixels(start), row1 * SLOT_MULT - SLOT_HEIGHT/32, desc2); 464 time2pixels(start), row1 * SLOT_MULT - SLOT_HEIGHT/32, desc2);
465 } 465 }
466 } 466 }
@@ -468,7 +468,7 @@ void svg_partial_wakeline(u64 start, int row1, char *desc1, int row2, char *desc
468 if (row2 > row1) 468 if (row2 > row1)
469 height += SLOT_HEIGHT; 469 height += SLOT_HEIGHT;
470 if (row1) 470 if (row1)
471 fprintf(svgfile, "<circle cx=\"%4.8f\" cy=\"%4.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n", 471 fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n",
472 time2pixels(start), height); 472 time2pixels(start), height);
473 473
474 fprintf(svgfile, "</g>\n"); 474 fprintf(svgfile, "</g>\n");
@@ -488,16 +488,16 @@ void svg_wakeline(u64 start, int row1, int row2, const char *backtrace)
488 fprintf(svgfile, "<desc>%s</desc>\n", backtrace); 488 fprintf(svgfile, "<desc>%s</desc>\n", backtrace);
489 489
490 if (row1 < row2) 490 if (row1 < row2)
491 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", 491 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
492 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT); 492 time2pixels(start), row1 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row2 * SLOT_MULT);
493 else 493 else
494 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", 494 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,32);stroke-width:0.009\"/>\n",
495 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT); 495 time2pixels(start), row2 * SLOT_MULT + SLOT_HEIGHT, time2pixels(start), row1 * SLOT_MULT);
496 496
497 height = row1 * SLOT_MULT; 497 height = row1 * SLOT_MULT;
498 if (row2 > row1) 498 if (row2 > row1)
499 height += SLOT_HEIGHT; 499 height += SLOT_HEIGHT;
500 fprintf(svgfile, "<circle cx=\"%4.8f\" cy=\"%4.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n", 500 fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n",
501 time2pixels(start), height); 501 time2pixels(start), height);
502 502
503 fprintf(svgfile, "</g>\n"); 503 fprintf(svgfile, "</g>\n");
@@ -515,9 +515,9 @@ void svg_interrupt(u64 start, int row, const char *backtrace)
515 if (backtrace) 515 if (backtrace)
516 fprintf(svgfile, "<desc>%s</desc>\n", backtrace); 516 fprintf(svgfile, "<desc>%s</desc>\n", backtrace);
517 517
518 fprintf(svgfile, "<circle cx=\"%4.8f\" cy=\"%4.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>\n", 518 fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>\n",
519 time2pixels(start), row * SLOT_MULT); 519 time2pixels(start), row * SLOT_MULT);
520 fprintf(svgfile, "<circle cx=\"%4.8f\" cy=\"%4.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>\n", 520 fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>\n",
521 time2pixels(start), row * SLOT_MULT + SLOT_HEIGHT); 521 time2pixels(start), row * SLOT_MULT + SLOT_HEIGHT);
522 522
523 fprintf(svgfile, "</g>\n"); 523 fprintf(svgfile, "</g>\n");
@@ -528,7 +528,7 @@ void svg_text(int Yslot, u64 start, const char *text)
528 if (!svgfile) 528 if (!svgfile)
529 return; 529 return;
530 530
531 fprintf(svgfile, "<text x=\"%4.8f\" y=\"%4.8f\">%s</text>\n", 531 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\">%s</text>\n",
532 time2pixels(start), Yslot * SLOT_MULT+SLOT_HEIGHT/2, text); 532 time2pixels(start), Yslot * SLOT_MULT+SLOT_HEIGHT/2, text);
533} 533}
534 534
@@ -537,9 +537,9 @@ static void svg_legenda_box(int X, const char *text, const char *style)
537 double boxsize; 537 double boxsize;
538 boxsize = SLOT_HEIGHT / 2; 538 boxsize = SLOT_HEIGHT / 2;
539 539
540 fprintf(svgfile, "<rect x=\"%i\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n", 540 fprintf(svgfile, "<rect x=\"%i\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n",
541 X, boxsize, boxsize, style); 541 X, boxsize, boxsize, style);
542 fprintf(svgfile, "<text transform=\"translate(%4.8f, %4.8f)\" font-size=\"%4.8fpt\">%s</text>\n", 542 fprintf(svgfile, "<text transform=\"translate(%.8f, %.8f)\" font-size=\"%.8fpt\">%s</text>\n",
543 X + boxsize + 5, boxsize, 0.8 * boxsize, text); 543 X + boxsize + 5, boxsize, 0.8 * boxsize, text);
544} 544}
545 545
@@ -579,7 +579,7 @@ void svg_time_grid(void)
579 color = 128; 579 color = 128;
580 } 580 }
581 581
582 fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%" PRIu64 "\" style=\"stroke:rgb(%i,%i,%i);stroke-width:%1.3f\"/>\n", 582 fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%" PRIu64 "\" style=\"stroke:rgb(%i,%i,%i);stroke-width:%.3f\"/>\n",
583 time2pixels(i), SLOT_MULT/2, time2pixels(i), total_height, color, color, color, thickness); 583 time2pixels(i), SLOT_MULT/2, time2pixels(i), total_height, color, color, color, thickness);
584 584
585 i += 10000000; 585 i += 10000000;