Lines Matching refs:ofp
54 void output_section_hdr(FILE *ofp, char *hdr) in output_section_hdr() argument
56 fprintf(ofp, "==================== "); in output_section_hdr()
57 fprintf(ofp, "%s", hdr); in output_section_hdr()
58 fprintf(ofp, " ====================\n\n"); in output_section_hdr()
61 void output_hdr(FILE *ofp, char *hdr) in output_hdr() argument
63 fprintf(ofp, "%15s %13s %13s %13s %11s\n", in output_hdr()
65 fprintf(ofp, "--------------- ------------- ------------- ------------- -----------\n"); in output_hdr()
68 void __output_avg(FILE *ofp, char *hdr, struct avg_info *ap, int do_easy) in __output_avg() argument
72 fprintf(ofp, "%-15s %13.9f %13.9f %13.9f %11d\n", hdr, in __output_avg()
94 FILE *ofp; member
104 __output_avg(odap->ofp, make_dev_hdr(dev_info, 15, dip, 1), in __output_dip_avg()
109 void output_dip_avg(FILE *ofp, char *hdr, ai_dip_t (*func)(struct d_info *)) in output_dip_avg() argument
111 struct __oda oda = { .ofp = ofp, .func = func}; in output_dip_avg()
112 output_hdr(ofp, hdr); in output_dip_avg()
114 fprintf(ofp, "\n"); in output_dip_avg()
118 FILE *ofp; member
128 FILE *ofp = q2dp->ofp; in __output_q2d_histo() local
130 fprintf(q2dp->ofp, "%10s | ", in __output_q2d_histo()
132 q2d_display(ofp, dip->q2d_priv); in __output_q2d_histo()
138 void output_q2d_histo(FILE *ofp) in output_q2d_histo() argument
141 .ofp = ofp, in output_q2d_histo()
146 fprintf(ofp, "%10s | ", "DEV"); in output_q2d_histo()
147 q2d_display_header(ofp); in output_q2d_histo()
148 fprintf(ofp, "--------- | "); in output_q2d_histo()
149 q2d_display_dashes(ofp); in output_q2d_histo()
153 fprintf(ofp, "========== | "); in output_q2d_histo()
154 q2d_display_dashes(ofp); in output_q2d_histo()
155 fprintf(ofp, "%10s | ", "AVG"); in output_q2d_histo()
156 q2d_display(ofp, __q2d.q2d_all); in output_q2d_histo()
157 fprintf(ofp, "\n"); in output_q2d_histo()
225 void output_dip_merge_ratio(FILE *ofp) in output_dip_merge_ratio() argument
227 …fprintf(ofp, "%10s | %8s %8s %7s | %8s %8s %8s %8s\n", "DEV", "#Q", "#D", "Ratio", "BLKmin", "BLKa… in output_dip_merge_ratio()
228 fprintf(ofp, "---------- | -------- -------- ------- | -------- -------- -------- --------\n"); in output_dip_merge_ratio()
229 dip_foreach_out(__output_dip_merge_ratio, ofp); in output_dip_merge_ratio()
231 fprintf(ofp, "---------- | -------- -------- ------- | -------- -------- -------- --------\n"); in output_dip_merge_ratio()
232 …fprintf(ofp, "%10s | %8s %8s %7s | %8s %8s %8s %8s\n", "DEV", "#Q", "#D", "Ratio", "BLKmin", "BLKa… in output_dip_merge_ratio()
233 fprintf((FILE *)ofp, in output_dip_merge_ratio()
241 fprintf(ofp, "\n"); in output_dip_merge_ratio()
250 FILE *ofp; member
267 fprintf(odp->ofp, in __output_dip_prep_ohead()
289 void output_dip_prep_ohead(FILE *ofp) in output_dip_prep_ohead() argument
295 od.ofp = ofp; in output_dip_prep_ohead()
297 fprintf(ofp, "%10s | %9s %9s %9s %9s %9s\n", in output_dip_prep_ohead()
299 fprintf(ofp, "---------- | --------- --------- --------- --------- ---------\n"); in output_dip_prep_ohead()
307 fprintf(ofp, "---------- | --------- --------- --------- --------- ---------\n"); in output_dip_prep_ohead()
308 fprintf(ofp, "%10s | %8.4lf%% %8.4lf%% %8.4lf%% %8.4lf%% %8.4lf%%\n", "Overall", in output_dip_prep_ohead()
314 fprintf(ofp, "\n"); in output_dip_prep_ohead()
329 void output_seek_mode_info(FILE *ofp, struct o_seek_info *sip) in output_seek_mode_info() argument
352 fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)", in output_seek_mode_info()
360 fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", i); in output_seek_mode_info()
391 static void do_output_dip_seek_info(struct d_info *dip, FILE *ofp, int is_q2q) in do_output_dip_seek_info() argument
407 fprintf(ofp, "%10s | %15lld %15.1lf %15lld | %lld(%d)", in do_output_dip_seek_info()
411 fprintf(ofp, "\n%10s %15s %15s %15s ...(%d more)\n", "", "", "", "", nmodes-1); in do_output_dip_seek_info()
414 fprintf(ofp, " %lld", m.modes[i]); in do_output_dip_seek_info()
415 fprintf(ofp, "\n"); in do_output_dip_seek_info()
448 void output_dip_seek_info(FILE *ofp) in output_dip_seek_info() argument
453 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", "DEV", "NSEEKS", in output_dip_seek_info()
455 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_seek_info()
456 dip_foreach_out(__output_dip_seek_info, ofp); in output_dip_seek_info()
458 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_seek_info()
459 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", in output_dip_seek_info()
461 output_seek_mode_info(ofp, &seek_info); in output_dip_seek_info()
462 fprintf(ofp, "\n"); in output_dip_seek_info()
464 fprintf(ofp, "\n"); in output_dip_seek_info()
467 void output_dip_q2q_seek_info(FILE *ofp) in output_dip_q2q_seek_info() argument
472 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", "DEV", "NSEEKS", in output_dip_q2q_seek_info()
474 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_q2q_seek_info()
475 dip_foreach_out(__output_dip_q2q_seek_info, ofp); in output_dip_q2q_seek_info()
477 fprintf(ofp, "---------- | --------------- --------------- --------------- | ---------------\n"); in output_dip_q2q_seek_info()
478 fprintf(ofp, "%10s | %15s %15s %15s | %-15s\n", in output_dip_q2q_seek_info()
480 output_seek_mode_info(ofp, &seek_info); in output_dip_q2q_seek_info()
481 fprintf(ofp, "\n"); in output_dip_q2q_seek_info()
483 fprintf(ofp, "\n"); in output_dip_q2q_seek_info()
487 FILE *ofp; member
501 __output_avg(opap->ofp, proc_name, ap, 0); in __output_pip_avg()
505 void output_pip_avg(FILE *ofp, char *hdr, ai_pip_t (*func)(struct p_info *)) in output_pip_avg() argument
507 struct __opa opa = { .ofp = ofp, .func = func }; in output_pip_avg()
509 output_hdr(ofp, hdr); in output_pip_avg()
511 fprintf(ofp, "\n"); in output_pip_avg()
523 FILE *ofp = arg; in __dip_output_plug() local
532 fprintf(ofp, "%10s | %10d(%10d) | %13.9lf%%\n", in __dip_output_plug()
550 void __dip_output_plug_all(FILE *ofp, struct plug_info *p) in __dip_output_plug_all() argument
552 fprintf(ofp, "---------- | ---------- ---------- | ----------------\n"); in __dip_output_plug_all()
553 fprintf(ofp, "%10s | %10s %10s | %s\n", in __dip_output_plug_all()
555 fprintf(ofp, "%10s | %10ld(%10ld) | %13.9lf%%\n", "Average", in __dip_output_plug_all()
569 FILE *ofp = arg; in __dip_output_plug_nios() local
583 fprintf(ofp, "%10s | %10.1lf %10.1lf\n", in __dip_output_plug_nios()
595 void __dip_output_uplug_all(FILE *ofp, struct nios_plug_info *p) in __dip_output_uplug_all() argument
604 fprintf(ofp, "---------- | ---------- ----------\n"); in __dip_output_uplug_all()
605 fprintf(ofp, "%10s | %10s %10s\n", in __dip_output_uplug_all()
607 fprintf(ofp, "%10s | %10.1lf %10.1lf\n", in __dip_output_uplug_all()
611 void output_plug_info(FILE *ofp) in output_plug_info() argument
613 fprintf(ofp, "%10s | %10s %10s | %s\n", in output_plug_info()
615 fprintf(ofp, "---------- | ---------- ---------- | ----------------\n"); in output_plug_info()
616 dip_foreach_out(__dip_output_plug, ofp); in output_plug_info()
618 __dip_output_plug_all(ofp, &plug_info); in output_plug_info()
619 fprintf(ofp, "\n"); in output_plug_info()
621 fprintf(ofp, "%10s | %10s %10s\n", in output_plug_info()
623 fprintf(ofp, "---------- | ---------- ----------\n"); in output_plug_info()
624 dip_foreach_out(__dip_output_plug_nios, ofp); in output_plug_info()
626 __dip_output_uplug_all(ofp, &nios_plug_info); in output_plug_info()
627 fprintf(ofp, "\n"); in output_plug_info()
657 void __dip_output_actQ_all(FILE *ofp, struct actQ_info *p) in __dip_output_actQ_all() argument
659 fprintf(ofp, "---------- | -------------\n"); in __dip_output_actQ_all()
660 fprintf(ofp, "%10s | %13s\n", "Overall", "Avgs Reqs @ Q"); in __dip_output_actQ_all()
661 fprintf(ofp, "%10s | %13.1lf\n", "Average", in __dip_output_actQ_all()
665 void output_actQ_info(FILE *ofp) in output_actQ_info() argument
667 fprintf(ofp, "%10s | %13s\n", "DEV", "Avg Reqs @ Q"); in output_actQ_info()
668 fprintf(ofp, "---------- | -------------\n"); in output_actQ_info()
669 dip_foreach_out(__dip_output_actQ, ofp); in output_actQ_info()
671 __dip_output_actQ_all(ofp, &actQ_info); in output_actQ_info()
672 fprintf(ofp, "\n"); in output_actQ_info()
678 FILE *ofp; in output_histos() local
684 ofp = my_fopen(fname, "w"); in output_histos()
685 if (!ofp) { in output_histos()
690 fprintf(ofp, "# BTT histogram data\n"); in output_histos()
691 fprintf(ofp, "# Q buckets\n"); in output_histos()
693 fprintf(ofp, "%4d %lld\n", (i+1), (long long)q_histo[i]); in output_histos()
694 fprintf(ofp, "\n# Q bucket for > %d\n%4d %lld\n", (int)N_HIST_BKTS-1, in output_histos()
696 fclose(ofp); in output_histos()
699 ofp = my_fopen(fname, "w"); in output_histos()
700 if (!ofp) { in output_histos()
704 fprintf(ofp, "# D buckets\n"); in output_histos()
706 fprintf(ofp, "%4d %lld\n", (i+1), (long long)d_histo[i]); in output_histos()
707 fprintf(ofp, "\n# D bucket for > %d\n%4d %lld\n", (int)N_HIST_BKTS-1, in output_histos()
709 fclose(ofp); in output_histos()
712 int output_avgs(FILE *ofp) in output_avgs() argument
716 output_section_hdr(ofp, "Per Process"); in output_avgs()
717 output_pip_avg(ofp, "Q2Qdm", pip_q2q_dm_avg); in output_avgs()
718 output_pip_avg(ofp, "Q2Adm", pip_q2a_dm_avg); in output_avgs()
719 output_pip_avg(ofp, "Q2Cdm", pip_q2c_dm_avg); in output_avgs()
720 fprintf(ofp, "\n"); in output_avgs()
722 output_pip_avg(ofp, "Q2Q", pip_q2q_avg); in output_avgs()
723 output_pip_avg(ofp, "Q2A", pip_q2a_avg); in output_avgs()
724 output_pip_avg(ofp, "Q2G", pip_q2g_avg); in output_avgs()
725 output_pip_avg(ofp, "S2G", pip_s2g_avg); in output_avgs()
726 output_pip_avg(ofp, "G2I", pip_g2i_avg); in output_avgs()
727 output_pip_avg(ofp, "Q2M", pip_q2m_avg); in output_avgs()
728 output_pip_avg(ofp, "I2D", pip_i2d_avg); in output_avgs()
729 output_pip_avg(ofp, "D2C", pip_d2c_avg); in output_avgs()
730 output_pip_avg(ofp, "Q2C", pip_q2c_avg); in output_avgs()
733 output_section_hdr(ofp, "Per Device"); in output_avgs()
734 output_dip_avg(ofp, "Q2Qdm", dip_q2q_dm_avg); in output_avgs()
735 output_dip_avg(ofp, "Q2Adm", dip_q2a_dm_avg); in output_avgs()
736 output_dip_avg(ofp, "Q2Cdm", dip_q2c_dm_avg); in output_avgs()
737 fprintf(ofp, "\n"); in output_avgs()
739 output_dip_avg(ofp, "Q2Q", dip_q2q_avg); in output_avgs()
740 output_dip_avg(ofp, "Q2A", dip_q2a_avg); in output_avgs()
741 output_dip_avg(ofp, "Q2G", dip_q2g_avg); in output_avgs()
742 output_dip_avg(ofp, "S2G", dip_s2g_avg); in output_avgs()
743 output_dip_avg(ofp, "G2I", dip_g2i_avg); in output_avgs()
744 output_dip_avg(ofp, "Q2M", dip_q2m_avg); in output_avgs()
745 output_dip_avg(ofp, "I2D", dip_i2d_avg); in output_avgs()
746 output_dip_avg(ofp, "D2C", dip_d2c_avg); in output_avgs()
747 output_dip_avg(ofp, "Q2C", dip_q2c_avg); in output_avgs()
750 output_section_hdr(ofp, "All Devices"); in output_avgs()
751 output_hdr(ofp, "ALL"); in output_avgs()
752 __output_avg(ofp, "Q2Qdm", &all_avgs.q2q_dm, 0); in output_avgs()
753 __output_avg(ofp, "Q2Adm", &all_avgs.q2a_dm, 0); in output_avgs()
754 __output_avg(ofp, "Q2Cdm", &all_avgs.q2c_dm, 0); in output_avgs()
755 fprintf(ofp, "\n"); in output_avgs()
757 __output_avg(ofp, "Q2Q", &all_avgs.q2q, 1); in output_avgs()
758 __output_avg(ofp, "Q2A", &all_avgs.q2a, 1); in output_avgs()
759 __output_avg(ofp, "Q2G", &all_avgs.q2g, 1); in output_avgs()
760 __output_avg(ofp, "S2G", &all_avgs.s2g, 1); in output_avgs()
761 __output_avg(ofp, "G2I", &all_avgs.g2i, 1); in output_avgs()
762 __output_avg(ofp, "Q2M", &all_avgs.q2m, 1); in output_avgs()
763 __output_avg(ofp, "I2D", &all_avgs.i2d, 1); in output_avgs()
764 __output_avg(ofp, "M2D", &all_avgs.m2d, 1); in output_avgs()
765 __output_avg(ofp, "D2C", &all_avgs.d2c, 1); in output_avgs()
766 __output_avg(ofp, "Q2C", &all_avgs.q2c, 1); in output_avgs()
767 fprintf(ofp, "\n"); in output_avgs()
769 output_section_hdr(ofp, "Device Overhead"); in output_avgs()
770 output_dip_prep_ohead(ofp); in output_avgs()
772 output_section_hdr(ofp, "Device Merge Information"); in output_avgs()
773 output_dip_merge_ratio(ofp); in output_avgs()
775 output_section_hdr(ofp, "Device Q2Q Seek Information"); in output_avgs()
776 output_dip_q2q_seek_info(ofp); in output_avgs()
778 output_section_hdr(ofp, "Device D2D Seek Information"); in output_avgs()
779 output_dip_seek_info(ofp); in output_avgs()
781 output_section_hdr(ofp, "Plug Information"); in output_avgs()
782 output_plug_info(ofp); in output_avgs()
784 output_section_hdr(ofp, "Active Requests At Q Information"); in output_avgs()
785 output_actQ_info(ofp); in output_avgs()
790 output_section_hdr(ofp, "Q2D Histogram"); in output_avgs()
791 output_q2d_histo(ofp); in output_avgs()
797 void __output_ranges(FILE *ofp, struct list_head *head_p, float base) in __output_ranges() argument
805 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->start), base); in __output_ranges()
806 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->start), limit); in __output_ranges()
807 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->end), limit); in __output_ranges()
808 fprintf(ofp, "%13.9lf %5.1f\n", BIT_TIME(rip->end), base); in __output_ranges()
812 int output_regions(FILE *ofp, char *header, struct region_info *reg, in output_regions() argument
818 fprintf(ofp, "# %16s : q activity\n", header); in output_regions()
819 __output_ranges(ofp, ®->qranges, base); in output_regions()
820 fprintf(ofp, "\n"); in output_regions()
822 fprintf(ofp, "# %16s : c activity\n", header); in output_regions()
823 __output_ranges(ofp, ®->cranges, base + 0.5); in output_regions()
824 fprintf(ofp, "\n"); in output_regions()
830 FILE *ofp; member
839 if (output_regions(odp->ofp, header, &dip->regions, odp->base)) in __output_dev()
843 float output_devs(FILE *ofp, float base) in output_devs() argument
845 struct __od od = { .ofp = ofp, .base = base }; in output_devs()
847 fprintf(ofp, "# Per device\n" ); in output_devs()
858 FILE *ofp; member
864 output_regions(opp->ofp, pip->name, &pip->regions, opp->base); in __output_procs()
868 float output_procs(FILE *ofp, float base) in output_procs() argument
870 struct __op op = { .ofp = ofp, .base = base }; in output_procs()
872 fprintf(ofp, "# Per process\n" ); in output_procs()
877 int output_ranges(FILE *ofp) in output_ranges() argument
881 fprintf(ofp, "# %s\n", "Total System"); in output_ranges()
882 if (output_regions(ofp, "Total System", &all_regions, base)) in output_ranges()
886 base = output_devs(ofp, base); in output_ranges()
888 base = output_procs(ofp, base); in output_ranges()