Lines Matching refs:rep

114 	struct report *rep = cb;  in report__config()  local
123 rep->min_percent = pcnt; in report__config()
132 return perf_config_u64(&rep->queue_size, var, value); in report__config()
140 rep->skip_empty = perf_config_bool(var, value); in report__config()
152 struct report *rep = arg; in hist_iter__report_callback() local
159 if (!ui__has_annotation() && !rep->symbol_ipc) in hist_iter__report_callback()
170 } else if (rep->mem_mode) { in hist_iter__report_callback()
195 struct report *rep = arg; in hist_iter__branch_callback() local
201 branch_type_count(&rep->brtype_stat, &bi->flags, in hist_iter__branch_callback()
204 if (!ui__has_annotation() && !rep->symbol_ipc) in hist_iter__branch_callback()
227 struct report *rep = container_of(session->tool, struct report, tool); in process_feature_event() local
236 } else if (rep->header_only) { in process_feature_event()
245 setup_forced_leader(rep, session->evlist); in process_feature_event()
255 struct report *rep = container_of(tool, struct report, tool); in process_sample_event() local
265 if (perf_time__ranges_skip_sample(rep->ptime_range, rep->range_num, in process_sample_event()
270 if (evswitch__discard(&rep->evswitch, evsel)) in process_sample_event()
279 if (rep->stitch_lbr) in process_sample_event()
285 if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap)) in process_sample_event()
298 } else if (rep->mem_mode) { in process_sample_event()
309 if (ui__has_annotation() || rep->symbol_ipc || rep->total_cycles_mode) { in process_sample_event()
311 rep->nonany_branch_mode, in process_sample_event()
312 &rep->total_cycles); in process_sample_event()
315 ret = hist_entry_iter__add(&iter, &al, rep->max_stack, rep); in process_sample_event()
329 struct report *rep = container_of(tool, struct report, tool); in process_read_event() local
331 if (rep->show_threads) { in process_read_event()
333 int err = perf_read_values_add_value(&rep->show_threads_values, in process_read_event()
347 static int report__setup_sample_type(struct report *rep) in report__setup_sample_type() argument
349 struct perf_session *session = rep->session; in report__setup_sample_type()
415 if (rep->stitch_lbr && (callchain_param.record_mode != CALLCHAIN_LBR)) { in report__setup_sample_type()
418 rep->stitch_lbr = false; in report__setup_sample_type()
423 rep->nonany_branch_mode = true; in report__setup_sample_type()
440 static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report *rep, in hists__fprintf_nr_sample_events() argument
486 if (rep->time_str) in hists__fprintf_nr_sample_events()
487 ret += fprintf(fp, " (time slices: %s)", rep->time_str); in hists__fprintf_nr_sample_events()
493 if (rep->mem_mode) { in hists__fprintf_nr_sample_events()
505 static int evlist__tui_block_hists_browse(struct evlist *evlist, struct report *rep) in evlist__tui_block_hists_browse() argument
511 ret = report__browse_block_hists(&rep->block_reports[i++].hist, in evlist__tui_block_hists_browse()
512 rep->min_percent, pos, in evlist__tui_block_hists_browse()
513 &rep->session->header.env, in evlist__tui_block_hists_browse()
514 &rep->annotation_opts); in evlist__tui_block_hists_browse()
522 static int evlist__tty_browse_hists(struct evlist *evlist, struct report *rep, const char *help) in evlist__tty_browse_hists() argument
539 if (rep->skip_empty && !hists->stats.nr_samples) in evlist__tty_browse_hists()
542 hists__fprintf_nr_sample_events(hists, rep, evname, stdout); in evlist__tty_browse_hists()
544 if (rep->total_cycles_mode) { in evlist__tty_browse_hists()
545 report__browse_block_hists(&rep->block_reports[i++].hist, in evlist__tty_browse_hists()
546 rep->min_percent, pos, in evlist__tty_browse_hists()
551 hists__fprintf(hists, !quiet, 0, 0, rep->min_percent, stdout, in evlist__tty_browse_hists()
560 if (rep->show_threads) { in evlist__tty_browse_hists()
561 bool style = !strcmp(rep->pretty_printing_style, "raw"); in evlist__tty_browse_hists()
562 perf_read_values_display(stdout, &rep->show_threads_values, in evlist__tty_browse_hists()
564 perf_read_values_destroy(&rep->show_threads_values); in evlist__tty_browse_hists()
568 branch_type_stat_display(stdout, &rep->brtype_stat); in evlist__tty_browse_hists()
573 static void report__warn_kptr_restrict(const struct report *rep) in report__warn_kptr_restrict() argument
575 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host); in report__warn_kptr_restrict()
578 if (evlist__exclude_kernel(rep->session->evlist)) in report__warn_kptr_restrict()
602 static int report__gtk_browse_hists(struct report *rep, const char *help) in report__gtk_browse_hists() argument
614 return hist_browser(rep->session->evlist, help, NULL, rep->min_percent); in report__gtk_browse_hists()
617 static int report__browse_hists(struct report *rep) in report__browse_hists() argument
620 struct perf_session *session = rep->session; in report__browse_hists()
633 if (rep->total_cycles_mode) { in report__browse_hists()
634 ret = evlist__tui_block_hists_browse(evlist, rep); in report__browse_hists()
638 ret = evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent, in report__browse_hists()
639 &session->header.env, true, &rep->annotation_opts); in report__browse_hists()
648 ret = report__gtk_browse_hists(rep, help); in report__browse_hists()
651 ret = evlist__tty_browse_hists(evlist, rep, help); in report__browse_hists()
658 static int report__collapse_hists(struct report *rep) in report__collapse_hists() argument
664 ui_progress__init(&prog, rep->nr_entries, "Merging related events..."); in report__collapse_hists()
666 evlist__for_each_entry(rep->session->evlist, pos) { in report__collapse_hists()
670 hists->symbol_filter_str = rep->symbol_filter_str; in report__collapse_hists()
672 hists->socket_filter = rep->socket_filter; in report__collapse_hists()
693 struct report *rep = arg; in hists__resort_cb() local
696 if (rep->symbol_ipc && sym && !sym->annotate2) { in hists__resort_cb()
706 static void report__output_resort(struct report *rep) in report__output_resort() argument
711 ui_progress__init(&prog, rep->nr_entries, "Sorting events for output..."); in report__output_resort()
713 evlist__for_each_entry(rep->session->evlist, pos) { in report__output_resort()
714 evsel__output_resort_cb(pos, &prog, hists__resort_cb, rep); in report__output_resort()
736 static void stats_setup(struct report *rep) in stats_setup() argument
738 memset(&rep->tool, 0, sizeof(rep->tool)); in stats_setup()
739 rep->tool.attr = process_attr; in stats_setup()
740 rep->tool.sample = count_sample_event; in stats_setup()
741 rep->tool.no_warn = true; in stats_setup()
744 static int stats_print(struct report *rep) in stats_print() argument
746 struct perf_session *session = rep->session; in stats_print()
748 perf_session__fprintf_nr_events(session, stdout, rep->skip_empty); in stats_print()
749 evlist__fprintf_nr_events(session->evlist, stdout, rep->skip_empty); in stats_print()
753 static void tasks_setup(struct report *rep) in tasks_setup() argument
755 memset(&rep->tool, 0, sizeof(rep->tool)); in tasks_setup()
756 rep->tool.ordered_events = true; in tasks_setup()
757 if (rep->mmaps_mode) { in tasks_setup()
758 rep->tool.mmap = perf_event__process_mmap; in tasks_setup()
759 rep->tool.mmap2 = perf_event__process_mmap2; in tasks_setup()
761 rep->tool.attr = process_attr; in tasks_setup()
762 rep->tool.comm = perf_event__process_comm; in tasks_setup()
763 rep->tool.exit = perf_event__process_exit; in tasks_setup()
764 rep->tool.fork = perf_event__process_fork; in tasks_setup()
765 rep->tool.no_warn = true; in tasks_setup()
833 static int tasks_print(struct report *rep, FILE *fp) in tasks_print() argument
835 struct perf_session *session = rep->session; in tasks_print()
900 static int __cmd_report(struct report *rep) in __cmd_report() argument
903 struct perf_session *session = rep->session; in __cmd_report()
909 if (rep->cpu_list) { in __cmd_report()
910 ret = perf_session__cpu_bitmap(session, rep->cpu_list, in __cmd_report()
911 rep->cpu_bitmap); in __cmd_report()
916 session->itrace_synth_opts->cpu_bitmap = rep->cpu_bitmap; in __cmd_report()
919 if (rep->show_threads) { in __cmd_report()
920 ret = perf_read_values_init(&rep->show_threads_values); in __cmd_report()
925 ret = report__setup_sample_type(rep); in __cmd_report()
931 if (rep->stats_mode) in __cmd_report()
932 stats_setup(rep); in __cmd_report()
934 if (rep->tasks_mode) in __cmd_report()
935 tasks_setup(rep); in __cmd_report()
945 if (rep->stats_mode) in __cmd_report()
946 return stats_print(rep); in __cmd_report()
948 if (rep->tasks_mode) in __cmd_report()
949 return tasks_print(rep, stdout); in __cmd_report()
951 report__warn_kptr_restrict(rep); in __cmd_report()
954 rep->nr_entries += evsel__hists(pos)->nr_entries; in __cmd_report()
965 rep->skip_empty); in __cmd_report()
967 rep->skip_empty); in __cmd_report()
972 ret = report__collapse_hists(rep); in __cmd_report()
985 rep->nr_entries = 0; in __cmd_report()
987 rep->nr_entries += evsel__hists(pos)->nr_entries; in __cmd_report()
989 if (rep->nr_entries == 0) { in __cmd_report()
994 report__output_resort(rep); in __cmd_report()
996 if (rep->total_cycles_mode) { in __cmd_report()
1006 rep->block_reports = block_info__create_report(session->evlist, in __cmd_report()
1007 rep->total_cycles, in __cmd_report()
1009 &rep->nr_block_reports); in __cmd_report()
1010 if (!rep->block_reports) in __cmd_report()
1014 return report__browse_hists(rep); in __cmd_report()
1103 struct report *rep = opt->value; in parse_percent_limit() local
1106 rep->min_percent = pcnt; in parse_percent_limit()