Lines Matching +full:- +full:8 +full:g

1 // SPDX-License-Identifier: GPL-2.0-only
3 * svghelper.c - helper functions for outputting svg
62 X = 1.0 * svg_page_width * (__time - first_time) / (last_time - first_time); in time2pixels()
77 while (loop--) { in round_text_size()
102 new_width = (last_time - first_time) / 5000000; in open_svg()
114 fprintf(svgfile, " rect { stroke-width: 1; }\n"); in open_svg()
115 …fprintf(svgfile, " rect.process { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:1; … in open_svg()
116 …fprintf(svgfile, " rect.process2 { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:0; … in open_svg()
117 …fprintf(svgfile, " rect.process3 { fill:rgb(180,180,180); fill-opacity:0.5; stroke-width:0; … in open_svg()
118 …fprintf(svgfile, " rect.sample { fill:rgb( 0, 0,255); fill-opacity:0.8; stroke-width:0; … in open_svg()
119 …fprintf(svgfile, " rect.sample_hi{ fill:rgb(255,128, 0); fill-opacity:0.8; stroke-width:0; … in open_svg()
120 …fprintf(svgfile, " rect.error { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; … in open_svg()
121 …fprintf(svgfile, " rect.net { fill:rgb( 0,128, 0); fill-opacity:0.5; stroke-width:0; … in open_svg()
122 …fprintf(svgfile, " rect.disk { fill:rgb( 0, 0,255); fill-opacity:0.5; stroke-width:0; … in open_svg()
123 …fprintf(svgfile, " rect.sync { fill:rgb(128,128, 0); fill-opacity:0.5; stroke-width:0; … in open_svg()
124 …fprintf(svgfile, " rect.poll { fill:rgb( 0,128,128); fill-opacity:0.2; stroke-width:0; … in open_svg()
125 …fprintf(svgfile, " rect.blocked { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; … in open_svg()
126 …fprintf(svgfile, " rect.waiting { fill:rgb(224,214, 0); fill-opacity:0.8; stroke-width:0; … in open_svg()
127 …fprintf(svgfile, " rect.WAITING { fill:rgb(255,214, 48); fill-opacity:0.6; stroke-width:0; … in open_svg()
128 …fprintf(svgfile, " rect.cpu { fill:rgb(192,192,192); fill-opacity:0.2; stroke-width:0.5;… in open_svg()
129 …fprintf(svgfile, " rect.pstate { fill:rgb(128,128,128); fill-opacity:0.8; stroke-width:0; }… in open_svg()
130 …fprintf(svgfile, " rect.c1 { fill:rgb(255,214,214); fill-opacity:0.5; stroke-width:0; }… in open_svg()
131 …fprintf(svgfile, " rect.c2 { fill:rgb(255,172,172); fill-opacity:0.5; stroke-width:0; }… in open_svg()
132 …fprintf(svgfile, " rect.c3 { fill:rgb(255,130,130); fill-opacity:0.5; stroke-width:0; }… in open_svg()
133 …fprintf(svgfile, " rect.c4 { fill:rgb(255, 88, 88); fill-opacity:0.5; stroke-width:0; }… in open_svg()
134 …fprintf(svgfile, " rect.c5 { fill:rgb(255, 44, 44); fill-opacity:0.5; stroke-width:0; }… in open_svg()
135 …fprintf(svgfile, " rect.c6 { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; }… in open_svg()
136 …fprintf(svgfile, " line.pstate { stroke:rgb(255,255, 0); stroke-opacity:0.8; stroke-width:… in open_svg()
155 double w = time2pixels(end) - time2pixels(start); in svg_ubox()
161 fprintf(svgfile, "<g>\n"); in svg_ubox()
163 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n", in svg_ubox()
169 fprintf(svgfile, "</g>\n"); in svg_ubox()
174 double w = time2pixels(end) - time2pixels(start); in svg_lbox()
180 fprintf(svgfile, "<g>\n"); in svg_lbox()
182 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n", in svg_lbox()
185 Yslot * SLOT_MULT + SLOT_HEIGHT - SLOT_HALF * height, in svg_lbox()
188 fprintf(svgfile, "</g>\n"); in svg_lbox()
193 double w = time2pixels(end) - time2pixels(start); in svg_fbox()
199 fprintf(svgfile, "<g>\n"); in svg_fbox()
201 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n", in svg_fbox()
204 Yslot * SLOT_MULT + SLOT_HEIGHT - SLOT_HEIGHT * height, in svg_fbox()
207 fprintf(svgfile, "</g>\n"); in svg_fbox()
215 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n", in svg_box()
216 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT, type); in svg_box()
225 fprintf(svgfile, "<g>\n"); in svg_blocked()
227 time_to_string(end - start)); in svg_blocked()
231 fprintf(svgfile, "</g>\n"); in svg_blocked()
242 if (svg_highlight && end - start > svg_highlight) in svg_running()
246 fprintf(svgfile, "<g>\n"); in svg_running()
249 cpu, time_to_string(end - start)); in svg_running()
252 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"%s\"/>\n", in svg_running()
253 time2pixels(start), time2pixels(end)-time2pixels(start), Yslot * SLOT_MULT, SLOT_HEIGHT, in svg_running()
256 text_size = (time2pixels(end)-time2pixels(start)); in svg_running()
264 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"%.8fpt\">%i</text>\n", in svg_running()
265 time2pixels(start), Yslot * SLOT_MULT + SLOT_HEIGHT - 1, text_size, cpu + 1); in svg_running()
267 fprintf(svgfile, "</g>\n"); in svg_running()
299 if (end-start > 10 * NSEC_PER_MSEC) /* 10 msec */ in svg_waiting()
302 text = time_to_string(end-start); in svg_waiting()
304 font_size = 1.0 * (time2pixels(end)-time2pixels(start)); in svg_waiting()
311 …fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\">\n", time2pixels(start), Yslot * SLOT_MULT… in svg_waiting()
312 fprintf(svgfile, "<title>#%d waiting %s</title>\n", cpu, time_to_string(end - start)); in svg_waiting()
315 fprintf(svgfile, "<rect x=\"0\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n", in svg_waiting()
316 time2pixels(end)-time2pixels(start), SLOT_HEIGHT, style); in svg_waiting()
318 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%.8fpt\"> %s</text>\n", in svg_waiting()
320 fprintf(svgfile, "</g>\n"); in svg_waiting()
365 fprintf(svgfile, "<g>\n"); in svg_cpu_box()
367 fprintf(svgfile, "<rect x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\" class=\"cpu\"/>\n", in svg_cpu_box()
369 time2pixels(last_time)-time2pixels(first_time), in svg_cpu_box()
373 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\">%s</text>\n", in svg_cpu_box()
376 fprintf(svgfile, "<text transform=\"translate(%.8f,%.8f)\" font-size=\"1.25pt\">%s</text>\n", in svg_cpu_box()
377 10+time2pixels(first_time), cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - 4, cpu_model()); in svg_cpu_box()
379 fprintf(svgfile, "</g>\n"); in svg_cpu_box()
390 if (svg_highlight && end - start >= svg_highlight) in svg_process()
397 fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\">\n", time2pixels(start), cpu2y(cpu)); in svg_process()
398 fprintf(svgfile, "<title>%d %s running %s</title>\n", pid, name, time_to_string(end - start)); in svg_process()
401 fprintf(svgfile, "<rect x=\"0\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n", in svg_process()
402 time2pixels(end)-time2pixels(start), SLOT_MULT+SLOT_HEIGHT, type); in svg_process()
403 width = time2pixels(end)-time2pixels(start); in svg_process()
410 fprintf(svgfile, "<text transform=\"rotate(90)\" font-size=\"%.8fpt\">%s</text>\n", in svg_process()
413 fprintf(svgfile, "</g>\n"); in svg_process()
425 fprintf(svgfile, "<g>\n"); in svg_cstate()
431 fprintf(svgfile, "<rect class=\"%s\" x=\"%.8f\" width=\"%.8f\" y=\"%.1f\" height=\"%.1f\"/>\n", in svg_cstate()
433 time2pixels(start), time2pixels(end)-time2pixels(start), in svg_cstate()
436 width = (time2pixels(end)-time2pixels(start))/2.0; in svg_cstate()
443 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"%.8fpt\">C%i</text>\n", in svg_cstate()
446 fprintf(svgfile, "</g>\n"); in svg_cstate()
480 fprintf(svgfile, "<g>\n"); in svg_pstate()
484 height = 1 + cpu2y(cpu) + SLOT_MULT + SLOT_HEIGHT - height; in svg_pstate()
485 fprintf(svgfile, "<line x1=\"%.8f\" x2=\"%.8f\" y1=\"%.1f\" y2=\"%.1f\" class=\"pstate\"/>\n", in svg_pstate()
487 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\" font-size=\"0.25pt\">%s</text>\n", in svg_pstate()
490 fprintf(svgfile, "</g>\n"); in svg_pstate()
502 fprintf(svgfile, "<g>\n"); in svg_partial_wakeline()
513 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_partial_wakeline()
516 …fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\… in svg_partial_wakeline()
520 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_partial_wakeline()
521 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row2 * SLOT_MULT); in svg_partial_wakeline()
523 …fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\… in svg_partial_wakeline()
524 time2pixels(start), row2 * SLOT_MULT - SLOT_MULT/32, desc1); in svg_partial_wakeline()
528 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_partial_wakeline()
531 …fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\… in svg_partial_wakeline()
535 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_partial_wakeline()
536 time2pixels(start), row1 * SLOT_MULT - SLOT_MULT/32, time2pixels(start), row1 * SLOT_MULT); in svg_partial_wakeline()
538 …fprintf(svgfile, "<g transform=\"translate(%.8f,%.8f)\"><text transform=\"rotate(90)\" font-size=\… in svg_partial_wakeline()
539 time2pixels(start), row1 * SLOT_MULT - SLOT_HEIGHT/32, desc2); in svg_partial_wakeline()
546 …fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n… in svg_partial_wakeline()
549 fprintf(svgfile, "</g>\n"); in svg_partial_wakeline()
560 fprintf(svgfile, "<g>\n"); in svg_wakeline()
566 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_wakeline()
569 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%.2f\" style=\"stroke:rgb(32,255,… in svg_wakeline()
575 …fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(32,255,32)\"/>\n… in svg_wakeline()
578 fprintf(svgfile, "</g>\n"); in svg_wakeline()
586 fprintf(svgfile, "<g>\n"); in svg_interrupt()
593 …fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>… in svg_interrupt()
595 …fprintf(svgfile, "<circle cx=\"%.8f\" cy=\"%.2f\" r = \"0.01\" style=\"fill:rgb(255,128,128)\"/>… in svg_interrupt()
598 fprintf(svgfile, "</g>\n"); in svg_interrupt()
606 fprintf(svgfile, "<text x=\"%.8f\" y=\"%.8f\">%s</text>\n", in svg_text()
615 fprintf(svgfile, "<rect x=\"%i\" width=\"%.8f\" y=\"0\" height=\"%.1f\" class=\"%s\"/>\n", in svg_legenda_box()
617 fprintf(svgfile, "<text transform=\"translate(%.8f, %.8f)\" font-size=\"%.8fpt\">%s</text>\n", in svg_legenda_box()
626 fprintf(svgfile, "<g>\n"); in svg_io_legenda()
632 fprintf(svgfile, "</g>\n"); in svg_io_legenda()
640 fprintf(svgfile, "<g>\n"); in svg_legenda()
648 fprintf(svgfile, "</g>\n"); in svg_legenda()
672 …fprintf(svgfile, "<line x1=\"%.8f\" y1=\"%.2f\" x2=\"%.8f\" y2=\"%" PRIu64 "\" style=\"stroke:rgb(… in svg_time_grid()
689 #define cpumask_bits(maskp) ((maskp)->bits)
705 for (i = 0; i < t->sib_thr_nr; i++) { in scan_thread_topology()
706 if (!test_bit(cpu, cpumask_bits(&t->sib_thr[i]))) in scan_thread_topology()
709 for_each_set_bit(thr, cpumask_bits(&t->sib_thr[i]), nr_cpus) in scan_thread_topology()
710 if (map[thr] == -1) in scan_thread_topology()
721 for (i = 0; i < t->sib_core_nr; i++) in scan_core_topology()
722 for_each_set_bit(cpu, cpumask_bits(&t->sib_core[i]), nr_cpus) in scan_core_topology()
735 return -1; in str_to_bitmap()
740 ret = -1; in str_to_bitmap()
758 nr_cpus = min(env->nr_cpus_online, MAX_NR_CPUS); in svg_build_topology_map()
760 t.sib_core_nr = env->nr_sibling_cores; in svg_build_topology_map()
761 t.sib_thr_nr = env->nr_sibling_threads; in svg_build_topology_map()
762 t.sib_core = calloc(env->nr_sibling_cores, sizeof(cpumask_t)); in svg_build_topology_map()
763 t.sib_thr = calloc(env->nr_sibling_threads, sizeof(cpumask_t)); in svg_build_topology_map()
765 sib_core = env->sibling_cores; in svg_build_topology_map()
766 sib_thr = env->sibling_threads; in svg_build_topology_map()
773 for (i = 0; i < env->nr_sibling_cores; i++) { in svg_build_topology_map()
782 for (i = 0; i < env->nr_sibling_threads; i++) { in svg_build_topology_map()
798 topology_map[i] = -1; in svg_build_topology_map()
808 return -1; in svg_build_topology_map()