Lines Matching refs:ofp
56 void output_section_hdr(FILE *ofp, char *hdr) in output_section_hdr() argument
58 fprintf(ofp, "==================== "); in output_section_hdr()
59 fprintf(ofp, "%s", hdr); in output_section_hdr()
60 fprintf(ofp, " ====================\n\n"); in output_section_hdr()
63 void output_hdr(FILE *ofp, char *hdr) in output_hdr() argument
65 fprintf(ofp, "%15s %13s %13s %13s %11s\n", in output_hdr()
67 fprintf(ofp, "--------------- ------------- ------------- ------------- -----------\n"); in output_hdr()
70 void __output_avg(FILE *ofp, char *hdr, struct avg_info *ap, int do_easy) in __output_avg() argument
74 fprintf(ofp, "%-15s %13.9f %13.9f %13.9f %11d\n", hdr, in __output_avg()
96 FILE *ofp; member
106 __output_avg(odap->ofp, make_dev_hdr(dev_info, 15, dip, 1), in __output_dip_avg()
111 void output_dip_avg(FILE *ofp, char *hdr, ai_dip_t (*func)(struct d_info *)) in output_dip_avg() argument
113 struct __oda oda = { .ofp = ofp, .func = func}; in output_dip_avg()
114 output_hdr(ofp, hdr); in output_dip_avg()
116 fprintf(ofp, "\n"); in output_dip_avg()
120 FILE *ofp; member
130 FILE *ofp = q2dp->ofp; in __output_q2d_histo() local
132 fprintf(q2dp->ofp, "%10s | ", in __output_q2d_histo()
134 q2d_display(ofp, dip->q2d_priv); in __output_q2d_histo()
140 void output_q2d_histo(FILE *ofp) in output_q2d_histo() argument
143 .ofp = ofp, in output_q2d_histo()
148 fprintf(ofp, "%10s | ", "DEV"); in output_q2d_histo()
149 q2d_display_header(ofp); in output_q2d_histo()
150 fprintf(ofp, "--------- | "); in output_q2d_histo()
151 q2d_display_dashes(ofp); in output_q2d_histo()
155 fprintf(ofp, "========== | "); in output_q2d_histo()
156 q2d_display_dashes(ofp); in output_q2d_histo()
157 fprintf(ofp, "%10s | ", "AVG"); in output_q2d_histo()
158 q2d_display(ofp, __q2d.q2d_all); in output_q2d_histo()
159 fprintf(ofp, "\n"); in output_q2d_histo()
227 void output_dip_merge_ratio(FILE *ofp) in output_dip_merge_ratio() argument
229 …fprintf(ofp, "%10s | %8s %8s %7s | %8s %8s %8s %8s\n", "DEV", "#Q", "#D", "Ratio", "BLKmin", "BLKa… in output_dip_merge_ratio()
230 fprintf(ofp, "---------- | -------- -------- ------- | -------- -------- -------- --------\n"); in output_dip_merge_ratio()
231 dip_foreach_out(__output_dip_merge_ratio, ofp); in output_dip_merge_ratio()
233 fprintf(ofp, "---------- | -------- -------- ------- | -------- -------- -------- --------\n"); in output_dip_merge_ratio()
234 …fprintf(ofp, "%10s | %8s %8s %7s | %8s %8s %8s %8s\n", "DEV", "#Q", "#D", "Ratio", "BLKmin", "BLKa… in output_dip_merge_ratio()
235 fprintf((FILE *)ofp, in output_dip_merge_ratio()
243 fprintf(ofp, "\n"); in output_dip_merge_ratio()
252 FILE *ofp; member
269 fprintf(odp->ofp, in __output_dip_prep_ohead()
291 void output_dip_prep_ohead(FILE *ofp) in output_dip_prep_ohead() argument
297 od.ofp = ofp; in output_dip_prep_ohead()
299 fprintf(ofp, "%10s | %9s %9s %9s %9s %9s\n", in output_dip_prep_ohead()
301 fprintf(ofp, "---------- | --------- --------- --------- --------- ---------\n"); in output_dip_prep_ohead()
309 fprintf(ofp, "---------- | --------- --------- --------- --------- ---------\n"); in output_dip_prep_ohead()
310 fprintf(ofp, "%10s | %8.4lf%% %8.4lf%% %8.4lf%% %8.4lf%% %8.4lf%%\n", "Overall", in output_dip_prep_ohead()
316 fprintf(ofp, "\n"); in output_dip_prep_ohead()
331 void output_seek_mode_info(FILE *ofp, struct o_seek_info *sip) in output_seek_mode_info() argument
354 fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)", in output_seek_mode_info()
362 fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", i); in output_seek_mode_info()
393 static void do_output_dip_seek_info(struct d_info *dip, FILE *ofp, int is_q2q) in do_output_dip_seek_info() argument
409 fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)", in do_output_dip_seek_info()
413 fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", nmodes-1); in do_output_dip_seek_info()
416 fprintf(ofp, " %lld", m.modes[i]); in do_output_dip_seek_info()
417 fprintf(ofp, "\n"); in do_output_dip_seek_info()
450 void output_dip_seek_info(FILE *ofp) in output_dip_seek_info() argument
455 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", "DEV", "NSEEKS", in output_dip_seek_info()
457 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_seek_info()
458 dip_foreach_out(__output_dip_seek_info, ofp); in output_dip_seek_info()
460 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_seek_info()
461 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", in output_dip_seek_info()
463 output_seek_mode_info(ofp, &seek_info); in output_dip_seek_info()
464 fprintf(ofp, "\n"); in output_dip_seek_info()
466 fprintf(ofp, "\n"); in output_dip_seek_info()
469 void output_dip_q2q_seek_info(FILE *ofp) in output_dip_q2q_seek_info() argument
474 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", "DEV", "NSEEKS", in output_dip_q2q_seek_info()
476 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_q2q_seek_info()
477 dip_foreach_out(__output_dip_q2q_seek_info, ofp); in output_dip_q2q_seek_info()
479 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_q2q_seek_info()
480 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", in output_dip_q2q_seek_info()
482 output_seek_mode_info(ofp, &seek_info); in output_dip_q2q_seek_info()
483 fprintf(ofp, "\n"); in output_dip_q2q_seek_info()
485 fprintf(ofp, "\n"); in output_dip_q2q_seek_info()
489 FILE *ofp; member
503 __output_avg(opap->ofp, proc_name, ap, 0); in __output_pip_avg()
507 void output_pip_avg(FILE *ofp, char *hdr, ai_pip_t (*func)(struct p_info *)) in output_pip_avg() argument
509 struct __opa opa = { .ofp = ofp, .func = func }; in output_pip_avg()
511 output_hdr(ofp, hdr); in output_pip_avg()
513 fprintf(ofp, "\n"); in output_pip_avg()
525 FILE *ofp = arg; in __dip_output_plug() local
534 fprintf(ofp, "%10s | %10d(%10d) | %13.9lf%%\n", in __dip_output_plug()
552 void __dip_output_plug_all(FILE *ofp, struct plug_info *p) in __dip_output_plug_all() argument
554 fprintf(ofp, "---------- | ---------- ---------- | ----------------\n"); in __dip_output_plug_all()
555 fprintf(ofp, "%10s | %10s %10s | %s\n", in __dip_output_plug_all()
557 fprintf(ofp, "%10s | %10ld(%10ld) | %13.9lf%%\n", "Average", in __dip_output_plug_all()
571 FILE *ofp = arg; in __dip_output_plug_nios() local
585 fprintf(ofp, "%10s | %10.1lf %10.1lf\n", in __dip_output_plug_nios()
597 void __dip_output_uplug_all(FILE *ofp, struct nios_plug_info *p) in __dip_output_uplug_all() argument
606 fprintf(ofp, "---------- | ---------- ----------\n"); in __dip_output_uplug_all()
607 fprintf(ofp, "%10s | %10s %10s\n", in __dip_output_uplug_all()
609 fprintf(ofp, "%10s | %10.1lf %10.1lf\n", in __dip_output_uplug_all()
613 void output_plug_info(FILE *ofp) in output_plug_info() argument
615 fprintf(ofp, "%10s | %10s %10s | %s\n", in output_plug_info()
617 fprintf(ofp, "---------- | ---------- ---------- | ----------------\n"); in output_plug_info()
618 dip_foreach_out(__dip_output_plug, ofp); in output_plug_info()
620 __dip_output_plug_all(ofp, &plug_info); in output_plug_info()
621 fprintf(ofp, "\n"); in output_plug_info()
623 fprintf(ofp, "%10s | %10s %10s\n", in output_plug_info()
625 fprintf(ofp, "---------- | ---------- ----------\n"); in output_plug_info()
626 dip_foreach_out(__dip_output_plug_nios, ofp); in output_plug_info()
628 __dip_output_uplug_all(ofp, &nios_plug_info); in output_plug_info()
629 fprintf(ofp, "\n"); in output_plug_info()
659 void __dip_output_actQ_all(FILE *ofp, struct actQ_info *p) in __dip_output_actQ_all() argument
661 fprintf(ofp, "---------- | -------------\n"); in __dip_output_actQ_all()
662 fprintf(ofp, "%10s | %13s\n", "Overall", "Avgs Reqs @ Q"); in __dip_output_actQ_all()
663 fprintf(ofp, "%10s | %13.1lf\n", "Average", in __dip_output_actQ_all()
667 void output_actQ_info(FILE *ofp) in output_actQ_info() argument
669 fprintf(ofp, "%10s | %13s\n", "DEV", "Avg Reqs @ Q"); in output_actQ_info()
670 fprintf(ofp, "---------- | -------------\n"); in output_actQ_info()
671 dip_foreach_out(__dip_output_actQ, ofp); in output_actQ_info()
673 __dip_output_actQ_all(ofp, &actQ_info); in output_actQ_info()
674 fprintf(ofp, "\n"); in output_actQ_info()
680 FILE *ofp = arg; in __dip_output_p_live() local
684 fprintf(ofp, "%10s | %10lu %13.9lf %13.9lf %6.2lf\n", ttl, in __dip_output_p_live()
690 void output_p_live(FILE *ofp) in output_p_live() argument
692 fprintf(ofp, "%10s | %10s %13s %13s %6s\n", "DEV", in output_p_live()
694 fprintf(ofp, "---------- | ---------- " in output_p_live()
697 dip_foreach_out(__dip_output_p_live, ofp); in output_p_live()
698 fprintf(ofp, "---------- | ---------- " in output_p_live()
701 __dip_output_p_live(NULL, ofp); in output_p_live()
702 fprintf(ofp, "\n"); in output_p_live()
708 FILE *ofp; in output_histos() local
714 ofp = my_fopen(fname, "w"); in output_histos()
715 if (!ofp) { in output_histos()
720 fprintf(ofp, "# BTT histogram data\n"); in output_histos()
721 fprintf(ofp, "# Q buckets\n"); in output_histos()
723 fprintf(ofp, "%4d %lld\n", (i+1), (long long)q_histo[i]); in output_histos()
724 fprintf(ofp, "\n# Q bucket for > %d\n%4d %lld\n", (int)N_HIST_BKTS-1, in output_histos()
726 fclose(ofp); in output_histos()
729 ofp = my_fopen(fname, "w"); in output_histos()
730 if (!ofp) { in output_histos()
734 fprintf(ofp, "# D buckets\n"); in output_histos()
736 fprintf(ofp, "%4d %lld\n", (i+1), (long long)d_histo[i]); in output_histos()
737 fprintf(ofp, "\n# D bucket for > %d\n%4d %lld\n", (int)N_HIST_BKTS-1, in output_histos()
739 fclose(ofp); in output_histos()
742 int output_avgs(FILE *ofp) in output_avgs() argument
746 output_section_hdr(ofp, "Per Process"); in output_avgs()
747 output_pip_avg(ofp, "Q2Qdm", pip_q2q_dm_avg); in output_avgs()
748 output_pip_avg(ofp, "Q2Adm", pip_q2a_dm_avg); in output_avgs()
749 output_pip_avg(ofp, "Q2Cdm", pip_q2c_dm_avg); in output_avgs()
750 fprintf(ofp, "\n"); in output_avgs()
752 output_pip_avg(ofp, "Q2Q", pip_q2q_avg); in output_avgs()
753 output_pip_avg(ofp, "Q2A", pip_q2a_avg); in output_avgs()
754 output_pip_avg(ofp, "Q2G", pip_q2g_avg); in output_avgs()
755 output_pip_avg(ofp, "S2G", pip_s2g_avg); in output_avgs()
756 output_pip_avg(ofp, "G2I", pip_g2i_avg); in output_avgs()
757 output_pip_avg(ofp, "Q2M", pip_q2m_avg); in output_avgs()
758 output_pip_avg(ofp, "I2D", pip_i2d_avg); in output_avgs()
759 output_pip_avg(ofp, "D2C", pip_d2c_avg); in output_avgs()
760 output_pip_avg(ofp, "Q2C", pip_q2c_avg); in output_avgs()
763 output_section_hdr(ofp, "Per Device"); in output_avgs()
764 output_dip_avg(ofp, "Q2Qdm", dip_q2q_dm_avg); in output_avgs()
765 output_dip_avg(ofp, "Q2Adm", dip_q2a_dm_avg); in output_avgs()
766 output_dip_avg(ofp, "Q2Cdm", dip_q2c_dm_avg); in output_avgs()
767 fprintf(ofp, "\n"); in output_avgs()
769 output_dip_avg(ofp, "Q2Q", dip_q2q_avg); in output_avgs()
770 output_dip_avg(ofp, "Q2A", dip_q2a_avg); in output_avgs()
771 output_dip_avg(ofp, "Q2G", dip_q2g_avg); in output_avgs()
772 output_dip_avg(ofp, "S2G", dip_s2g_avg); in output_avgs()
773 output_dip_avg(ofp, "G2I", dip_g2i_avg); in output_avgs()
774 output_dip_avg(ofp, "Q2M", dip_q2m_avg); in output_avgs()
775 output_dip_avg(ofp, "I2D", dip_i2d_avg); in output_avgs()
776 output_dip_avg(ofp, "D2C", dip_d2c_avg); in output_avgs()
777 output_dip_avg(ofp, "Q2C", dip_q2c_avg); in output_avgs()
780 output_section_hdr(ofp, "All Devices"); in output_avgs()
781 output_hdr(ofp, "ALL"); in output_avgs()
782 __output_avg(ofp, "Q2Qdm", &all_avgs.q2q_dm, 0); in output_avgs()
783 __output_avg(ofp, "Q2Adm", &all_avgs.q2a_dm, 0); in output_avgs()
784 __output_avg(ofp, "Q2Cdm", &all_avgs.q2c_dm, 0); in output_avgs()
785 fprintf(ofp, "\n"); in output_avgs()
787 __output_avg(ofp, "Q2Q", &all_avgs.q2q, 1); in output_avgs()
788 __output_avg(ofp, "Q2A", &all_avgs.q2a, 1); in output_avgs()
789 __output_avg(ofp, "Q2G", &all_avgs.q2g, 1); in output_avgs()
790 __output_avg(ofp, "S2G", &all_avgs.s2g, 1); in output_avgs()
791 __output_avg(ofp, "G2I", &all_avgs.g2i, 1); in output_avgs()
792 __output_avg(ofp, "Q2M", &all_avgs.q2m, 1); in output_avgs()
793 __output_avg(ofp, "I2D", &all_avgs.i2d, 1); in output_avgs()
794 __output_avg(ofp, "M2D", &all_avgs.m2d, 1); in output_avgs()
795 __output_avg(ofp, "D2C", &all_avgs.d2c, 1); in output_avgs()
796 __output_avg(ofp, "Q2C", &all_avgs.q2c, 1); in output_avgs()
797 fprintf(ofp, "\n"); in output_avgs()
799 output_section_hdr(ofp, "Device Overhead"); in output_avgs()
800 output_dip_prep_ohead(ofp); in output_avgs()
802 output_section_hdr(ofp, "Device Merge Information"); in output_avgs()
803 output_dip_merge_ratio(ofp); in output_avgs()
805 output_section_hdr(ofp, "Device Q2Q Seek Information"); in output_avgs()
806 output_dip_q2q_seek_info(ofp); in output_avgs()
808 output_section_hdr(ofp, "Device D2D Seek Information"); in output_avgs()
809 output_dip_seek_info(ofp); in output_avgs()
811 output_section_hdr(ofp, "Plug Information"); in output_avgs()
812 output_plug_info(ofp); in output_avgs()
814 output_section_hdr(ofp, "Active Requests At Q Information"); in output_avgs()
815 output_actQ_info(ofp); in output_avgs()
817 output_section_hdr(ofp, "I/O Active Period Information"); in output_avgs()
818 output_p_live(ofp); in output_avgs()
824 output_section_hdr(ofp, "Q2D Histogram"); in output_avgs()
825 output_q2d_histo(ofp); in output_avgs()
831 void __output_ranges(FILE *ofp, struct list_head *head_p, float base) in __output_ranges() argument
839 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->start), base); in __output_ranges()
840 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->start), limit); in __output_ranges()
841 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->end), limit); in __output_ranges()
842 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->end), base); in __output_ranges()
846 int output_regions(FILE *ofp, char *header, struct region_info *reg, in output_regions() argument
852 fprintf(ofp, "# %16s : q activity\n", header); in output_regions()
853 __output_ranges(ofp, ®->qranges, base); in output_regions()
854 fprintf(ofp, "\n"); in output_regions()
856 fprintf(ofp, "# %16s : c activity\n", header); in output_regions()
857 __output_ranges(ofp, ®->cranges, base + 0.5); in output_regions()
858 fprintf(ofp, "\n"); in output_regions()
864 FILE *ofp; member
873 if (output_regions(odp->ofp, header, &dip->regions, odp->base)) in __output_dev()
877 float output_devs(FILE *ofp, float base) in output_devs() argument
879 struct __od od = { .ofp = ofp, .base = base }; in output_devs()
881 fprintf(ofp, "# Per device\n" ); in output_devs()
892 FILE *ofp; member
898 output_regions(opp->ofp, pip->name, &pip->regions, opp->base); in __output_procs()
902 float output_procs(FILE *ofp, float base) in output_procs() argument
904 struct __op op = { .ofp = ofp, .base = base }; in output_procs()
906 fprintf(ofp, "# Per process\n" ); in output_procs()
911 int output_ranges(FILE *ofp) in output_ranges() argument
915 fprintf(ofp, "# %s\n", "Total System"); in output_ranges()
916 if (output_regions(ofp, "Total System", &all_regions, base)) in output_ranges()
920 base = output_devs(ofp, base); in output_ranges()
922 base = output_procs(ofp, base); in output_ranges()