Lines Matching refs:fp
22 static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin) in callchain__fprintf_left_margin() argument
25 int ret = fprintf(fp, " "); in callchain__fprintf_left_margin()
28 ret += fprintf(fp, " "); in callchain__fprintf_left_margin()
33 static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask, in ipchain__fprintf_graph_line() argument
37 size_t ret = callchain__fprintf_left_margin(fp, left_margin); in ipchain__fprintf_graph_line()
41 ret += fprintf(fp, "| "); in ipchain__fprintf_graph_line()
43 ret += fprintf(fp, " "); in ipchain__fprintf_graph_line()
45 ret += fprintf(fp, "\n"); in ipchain__fprintf_graph_line()
50 static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_node *node, in ipchain__fprintf_graph() argument
61 ret += callchain__fprintf_left_margin(fp, left_margin); in ipchain__fprintf_graph()
64 ret += fprintf(fp, "|"); in ipchain__fprintf_graph()
66 ret += fprintf(fp, " "); in ipchain__fprintf_graph()
68 ret += fprintf(fp, "--"); in ipchain__fprintf_graph()
69 ret += callchain_node__fprintf_value(node, fp, total_samples); in ipchain__fprintf_graph()
70 ret += fprintf(fp, "--"); in ipchain__fprintf_graph()
72 ret += fprintf(fp, "%s", " "); in ipchain__fprintf_graph()
87 fputs(str, fp); in ipchain__fprintf_graph()
88 fputc('\n', fp); in ipchain__fprintf_graph()
109 static size_t __callchain__fprintf_graph(FILE *fp, struct rb_root *root, in __callchain__fprintf_graph() argument
150 ret += ipchain__fprintf_graph_line(fp, depth, depth_mask, in __callchain__fprintf_graph()
154 ret += ipchain__fprintf_graph(fp, child, chain, depth, in __callchain__fprintf_graph()
165 ret += __callchain__fprintf_graph(fp, &child->rb_root, new_total, in __callchain__fprintf_graph()
190 ret += ipchain__fprintf_graph(fp, &rem_node, &rem_hits, depth, in __callchain__fprintf_graph()
217 static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root, in callchain__fprintf_graph() argument
244 ret += callchain__fprintf_left_margin(fp, left_margin); in callchain__fprintf_graph()
245 ret += fprintf(fp, "|\n"); in callchain__fprintf_graph()
246 ret += callchain__fprintf_left_margin(fp, left_margin); in callchain__fprintf_graph()
247 ret += fprintf(fp, "---"); in callchain__fprintf_graph()
251 ret += callchain__fprintf_left_margin(fp, left_margin); in callchain__fprintf_graph()
253 ret += fprintf(fp, "%s", in callchain__fprintf_graph()
260 chain, fp, NULL, 0); in callchain__fprintf_graph()
261 ret += fprintf(fp, "\n"); in callchain__fprintf_graph()
272 ret += __callchain__fprintf_graph(fp, root, total_samples, in callchain__fprintf_graph()
276 ret += fprintf(fp, "\n"); in callchain__fprintf_graph()
282 static size_t __callchain__fprintf_flat(FILE *fp, struct callchain_node *node, in __callchain__fprintf_flat() argument
292 ret += __callchain__fprintf_flat(fp, node->parent, total_samples); in __callchain__fprintf_flat()
298 ret += fprintf(fp, " %s\n", callchain_list__sym_name(chain, in __callchain__fprintf_flat()
305 static size_t callchain__fprintf_flat(FILE *fp, struct rb_root *tree, in callchain__fprintf_flat() argument
316 ret += fprintf(fp, " "); in callchain__fprintf_flat()
317 ret += callchain_node__fprintf_value(chain, fp, total_samples); in callchain__fprintf_flat()
318 ret += fprintf(fp, "\n"); in callchain__fprintf_flat()
319 ret += __callchain__fprintf_flat(fp, chain, total_samples); in callchain__fprintf_flat()
320 ret += fprintf(fp, "\n"); in callchain__fprintf_flat()
330 static size_t __callchain__fprintf_folded(FILE *fp, struct callchain_node *node) in __callchain__fprintf_folded() argument
341 ret += __callchain__fprintf_folded(fp, node->parent); in __callchain__fprintf_folded()
347 ret += fprintf(fp, "%s%s", first ? "" : sep, in __callchain__fprintf_folded()
356 static size_t callchain__fprintf_folded(FILE *fp, struct rb_root *tree, in callchain__fprintf_folded() argument
368 ret += callchain_node__fprintf_value(chain, fp, total_samples); in callchain__fprintf_folded()
369 ret += fprintf(fp, " "); in callchain__fprintf_folded()
370 ret += __callchain__fprintf_folded(fp, chain); in callchain__fprintf_folded()
371 ret += fprintf(fp, "\n"); in callchain__fprintf_folded()
383 FILE *fp) in hist_entry_callchain__fprintf() argument
392 return callchain__fprintf_graph(fp, &he->sorted_chain, total_samples, in hist_entry_callchain__fprintf()
396 return callchain__fprintf_graph(fp, &he->sorted_chain, total_samples, in hist_entry_callchain__fprintf()
400 return callchain__fprintf_flat(fp, &he->sorted_chain, total_samples); in hist_entry_callchain__fprintf()
403 return callchain__fprintf_folded(fp, &he->sorted_chain, total_samples); in hist_entry_callchain__fprintf()
460 FILE *fp) in hist_entry__hierarchy_fprintf() argument
504 printed += fprintf(fp, "%s", buf); in hist_entry__hierarchy_fprintf()
523 printed += fprintf(fp, "%s%s", sep ?: " ", skip_spaces(buf)); in hist_entry__hierarchy_fprintf()
525 printed += putc('\n', fp); in hist_entry__hierarchy_fprintf()
530 printed += hist_entry_callchain__fprintf(he, total, 0, fp); in hist_entry__hierarchy_fprintf()
540 FILE *fp) in hist_entry__block_fprintf() argument
556 ret += fprintf(fp, "%s\n", bf); in hist_entry__block_fprintf()
564 FILE *fp) in hist_entry__individual_block_fprintf() argument
576 ret += fprintf(fp, "%s\n", bf); in hist_entry__individual_block_fprintf()
582 char *bf, size_t bfsz, FILE *fp, in hist_entry__fprintf() argument
598 return hist_entry__hierarchy_fprintf(he, &hpp, hists, fp); in hist_entry__fprintf()
601 return hist_entry__block_fprintf(he, bf, size, fp); in hist_entry__fprintf()
604 return hist_entry__individual_block_fprintf(he, bf, size, fp); in hist_entry__fprintf()
608 ret = fprintf(fp, "%s\n", bf); in hist_entry__fprintf()
612 0, fp); in hist_entry__fprintf()
620 const char *line, FILE *fp) in print_hierarchy_indent() argument
629 return fprintf(fp, "%-*.*s", width, width, line); in print_hierarchy_indent()
633 struct perf_hpp *hpp, FILE *fp) in hists__fprintf_hierarchy_headers() argument
647 print_hierarchy_indent(sep, indent, " ", fp); in hists__fprintf_hierarchy_headers()
655 fprintf(fp, "%s%s", hpp->buf, sep ?: " "); in hists__fprintf_hierarchy_headers()
662 header_width += fprintf(fp, " / "); in hists__fprintf_hierarchy_headers()
671 header_width += fprintf(fp, "+"); in hists__fprintf_hierarchy_headers()
676 header_width += fprintf(fp, "%s", strim(hpp->buf)); in hists__fprintf_hierarchy_headers()
680 fprintf(fp, "\n# "); in hists__fprintf_hierarchy_headers()
683 print_hierarchy_indent(sep, indent, dots, fp); in hists__fprintf_hierarchy_headers()
692 fprintf(fp, "%s", sep ?: ".."); in hists__fprintf_hierarchy_headers()
696 fprintf(fp, "%.*s", width, dots); in hists__fprintf_hierarchy_headers()
721 fprintf(fp, "%s%-.*s", sep ?: " ", header_width, dots); in hists__fprintf_hierarchy_headers()
723 fprintf(fp, "\n#\n"); in hists__fprintf_hierarchy_headers()
729 int line, FILE *fp) in fprintf_line() argument
741 fprintf(fp, "%s", sep ?: " "); in fprintf_line()
748 fprintf(fp, "%s", hpp->buf); in fprintf_line()
755 FILE *fp) in hists__fprintf_standard_headers() argument
767 fprintf(fp, "# "); in hists__fprintf_standard_headers()
768 fprintf_line(hists, hpp, line, fp); in hists__fprintf_standard_headers()
769 fprintf(fp, "\n"); in hists__fprintf_standard_headers()
777 fprintf(fp, "# "); in hists__fprintf_standard_headers()
786 fprintf(fp, "%s", sep ?: " "); in hists__fprintf_standard_headers()
792 fprintf(fp, "."); in hists__fprintf_standard_headers()
795 fprintf(fp, "\n"); in hists__fprintf_standard_headers()
796 fprintf(fp, "#\n"); in hists__fprintf_standard_headers()
800 int hists__fprintf_headers(struct hists *hists, FILE *fp) in hists__fprintf_headers() argument
808 fprintf(fp, "# "); in hists__fprintf_headers()
811 return hists__fprintf_hierarchy_headers(hists, &dummy_hpp, fp); in hists__fprintf_headers()
813 return hists__fprintf_standard_headers(hists, &dummy_hpp, fp); in hists__fprintf_headers()
818 int max_cols, float min_pcnt, FILE *fp, in hists__fprintf() argument
837 nr_rows += hists__fprintf_headers(hists, fp); in hists__fprintf()
868 ret += hist_entry__fprintf(h, max_cols, line, linesz, fp, ignore_callchains); in hists__fprintf()
880 print_hierarchy_indent(sep, depth, " ", fp); in hists__fprintf()
881 fprintf(fp, "%*sno entry >= %.2f%%\n", indent, "", min_pcnt); in hists__fprintf()
888 maps__fprintf(thread__maps(h->thread), fp); in hists__fprintf()
889 fprintf(fp, "%.10s end\n", graph_dotted_line); in hists__fprintf()
900 size_t events_stats__fprintf(struct events_stats *stats, FILE *fp, in events_stats__fprintf() argument
917 ret += fprintf(fp, "%16s events: %10d (%4.1f%%)\n", in events_stats__fprintf()
921 ret += fprintf(fp, "%16s events: %10d\n", in events_stats__fprintf()