Lines Matching refs:rep
120 struct report *rep = cb; in report__config() local
129 rep->min_percent = pcnt; in report__config()
138 return perf_config_u64(&rep->queue_size, var, value); in report__config()
146 rep->skip_empty = perf_config_bool(var, value); in report__config()
158 struct report *rep = arg; in hist_iter__report_callback() local
165 if (!ui__has_annotation() && !rep->symbol_ipc) in hist_iter__report_callback()
176 } else if (rep->mem_mode) { in hist_iter__report_callback()
201 struct report *rep = arg; in hist_iter__branch_callback() local
207 branch_type_count(&rep->brtype_stat, &bi->flags, in hist_iter__branch_callback()
210 if (!ui__has_annotation() && !rep->symbol_ipc) in hist_iter__branch_callback()
233 struct report *rep = container_of(session->tool, struct report, tool); in process_feature_event() local
242 } else if (rep->header_only) { in process_feature_event()
251 setup_forced_leader(rep, session->evlist); in process_feature_event()
261 struct report *rep = container_of(tool, struct report, tool); in process_sample_event() local
271 if (perf_time__ranges_skip_sample(rep->ptime_range, rep->range_num, in process_sample_event()
276 if (evswitch__discard(&rep->evswitch, evsel)) in process_sample_event()
285 if (rep->stitch_lbr) in process_sample_event()
291 if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap)) in process_sample_event()
304 } else if (rep->mem_mode) { in process_sample_event()
315 if (ui__has_annotation() || rep->symbol_ipc || rep->total_cycles_mode) { in process_sample_event()
317 rep->nonany_branch_mode, in process_sample_event()
318 &rep->total_cycles); in process_sample_event()
321 ret = hist_entry_iter__add(&iter, &al, rep->max_stack, rep); in process_sample_event()
335 struct report *rep = container_of(tool, struct report, tool); in process_read_event() local
337 if (rep->show_threads) { in process_read_event()
339 int err = perf_read_values_add_value(&rep->show_threads_values, in process_read_event()
353 static int report__setup_sample_type(struct report *rep) in report__setup_sample_type() argument
355 struct perf_session *session = rep->session; in report__setup_sample_type()
433 callchain_param_setup(sample_type, perf_env__arch(&rep->session->header.env)); in report__setup_sample_type()
435 if (rep->stitch_lbr && (callchain_param.record_mode != CALLCHAIN_LBR)) { in report__setup_sample_type()
438 rep->stitch_lbr = false; in report__setup_sample_type()
443 rep->nonany_branch_mode = true; in report__setup_sample_type()
460 static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report *rep, in hists__fprintf_nr_sample_events() argument
506 if (rep->time_str) in hists__fprintf_nr_sample_events()
507 ret += fprintf(fp, " (time slices: %s)", rep->time_str); in hists__fprintf_nr_sample_events()
513 if (rep->mem_mode) { in hists__fprintf_nr_sample_events()
525 static int evlist__tui_block_hists_browse(struct evlist *evlist, struct report *rep) in evlist__tui_block_hists_browse() argument
531 ret = report__browse_block_hists(&rep->block_reports[i++].hist, in evlist__tui_block_hists_browse()
532 rep->min_percent, pos, in evlist__tui_block_hists_browse()
533 &rep->session->header.env, in evlist__tui_block_hists_browse()
534 &rep->annotation_opts); in evlist__tui_block_hists_browse()
542 static int evlist__tty_browse_hists(struct evlist *evlist, struct report *rep, const char *help) in evlist__tty_browse_hists() argument
559 if (rep->skip_empty && !hists->stats.nr_samples) in evlist__tty_browse_hists()
562 hists__fprintf_nr_sample_events(hists, rep, evname, stdout); in evlist__tty_browse_hists()
564 if (rep->total_cycles_mode) { in evlist__tty_browse_hists()
565 report__browse_block_hists(&rep->block_reports[i++].hist, in evlist__tty_browse_hists()
566 rep->min_percent, pos, in evlist__tty_browse_hists()
571 hists__fprintf(hists, !quiet, 0, 0, rep->min_percent, stdout, in evlist__tty_browse_hists()
580 if (rep->show_threads) { in evlist__tty_browse_hists()
581 bool style = !strcmp(rep->pretty_printing_style, "raw"); in evlist__tty_browse_hists()
582 perf_read_values_display(stdout, &rep->show_threads_values, in evlist__tty_browse_hists()
584 perf_read_values_destroy(&rep->show_threads_values); in evlist__tty_browse_hists()
588 branch_type_stat_display(stdout, &rep->brtype_stat); in evlist__tty_browse_hists()
593 static void report__warn_kptr_restrict(const struct report *rep) in report__warn_kptr_restrict() argument
595 struct map *kernel_map = machine__kernel_map(&rep->session->machines.host); in report__warn_kptr_restrict()
598 if (evlist__exclude_kernel(rep->session->evlist)) in report__warn_kptr_restrict()
622 static int report__gtk_browse_hists(struct report *rep, const char *help) in report__gtk_browse_hists() argument
634 return hist_browser(rep->session->evlist, help, NULL, rep->min_percent); in report__gtk_browse_hists()
637 static int report__browse_hists(struct report *rep) in report__browse_hists() argument
640 struct perf_session *session = rep->session; in report__browse_hists()
656 if (rep->total_cycles_mode) { in report__browse_hists()
657 ret = evlist__tui_block_hists_browse(evlist, rep); in report__browse_hists()
661 ret = evlist__tui_browse_hists(evlist, help, NULL, rep->min_percent, in report__browse_hists()
662 &session->header.env, true, &rep->annotation_opts); in report__browse_hists()
671 ret = report__gtk_browse_hists(rep, help); in report__browse_hists()
674 ret = evlist__tty_browse_hists(evlist, rep, help); in report__browse_hists()
681 static int report__collapse_hists(struct report *rep) in report__collapse_hists() argument
687 ui_progress__init(&prog, rep->nr_entries, "Merging related events..."); in report__collapse_hists()
689 evlist__for_each_entry(rep->session->evlist, pos) { in report__collapse_hists()
693 hists->symbol_filter_str = rep->symbol_filter_str; in report__collapse_hists()
695 hists->socket_filter = rep->socket_filter; in report__collapse_hists()
716 struct report *rep = arg; in hists__resort_cb() local
719 if (rep->symbol_ipc && sym && !sym->annotate2) { in hists__resort_cb()
729 static void report__output_resort(struct report *rep) in report__output_resort() argument
734 ui_progress__init(&prog, rep->nr_entries, "Sorting events for output..."); in report__output_resort()
736 evlist__for_each_entry(rep->session->evlist, pos) { in report__output_resort()
737 evsel__output_resort_cb(pos, &prog, hists__resort_cb, rep); in report__output_resort()
760 struct report *rep = container_of(tool, struct report, tool); in count_lost_samples_event() local
763 evsel = evlist__id2evsel(rep->session->evlist, sample->id); in count_lost_samples_event()
775 static void stats_setup(struct report *rep) in stats_setup() argument
777 memset(&rep->tool, 0, sizeof(rep->tool)); in stats_setup()
778 rep->tool.attr = process_attr; in stats_setup()
779 rep->tool.sample = count_sample_event; in stats_setup()
780 rep->tool.lost_samples = count_lost_samples_event; in stats_setup()
781 rep->tool.no_warn = true; in stats_setup()
784 static int stats_print(struct report *rep) in stats_print() argument
786 struct perf_session *session = rep->session; in stats_print()
788 perf_session__fprintf_nr_events(session, stdout, rep->skip_empty); in stats_print()
789 evlist__fprintf_nr_events(session->evlist, stdout, rep->skip_empty); in stats_print()
793 static void tasks_setup(struct report *rep) in tasks_setup() argument
795 memset(&rep->tool, 0, sizeof(rep->tool)); in tasks_setup()
796 rep->tool.ordered_events = true; in tasks_setup()
797 if (rep->mmaps_mode) { in tasks_setup()
798 rep->tool.mmap = perf_event__process_mmap; in tasks_setup()
799 rep->tool.mmap2 = perf_event__process_mmap2; in tasks_setup()
801 rep->tool.attr = process_attr; in tasks_setup()
802 rep->tool.comm = perf_event__process_comm; in tasks_setup()
803 rep->tool.exit = perf_event__process_exit; in tasks_setup()
804 rep->tool.fork = perf_event__process_fork; in tasks_setup()
805 rep->tool.no_warn = true; in tasks_setup()
873 static int tasks_print(struct report *rep, FILE *fp) in tasks_print() argument
875 struct perf_session *session = rep->session; in tasks_print()
940 static int __cmd_report(struct report *rep) in __cmd_report() argument
943 struct perf_session *session = rep->session; in __cmd_report()
949 if (rep->cpu_list) { in __cmd_report()
950 ret = perf_session__cpu_bitmap(session, rep->cpu_list, in __cmd_report()
951 rep->cpu_bitmap); in __cmd_report()
956 session->itrace_synth_opts->cpu_bitmap = rep->cpu_bitmap; in __cmd_report()
959 if (rep->show_threads) { in __cmd_report()
960 ret = perf_read_values_init(&rep->show_threads_values); in __cmd_report()
965 ret = report__setup_sample_type(rep); in __cmd_report()
971 if (rep->stats_mode) in __cmd_report()
972 stats_setup(rep); in __cmd_report()
974 if (rep->tasks_mode) in __cmd_report()
975 tasks_setup(rep); in __cmd_report()
985 if (rep->stats_mode) in __cmd_report()
986 return stats_print(rep); in __cmd_report()
988 if (rep->tasks_mode) in __cmd_report()
989 return tasks_print(rep, stdout); in __cmd_report()
991 report__warn_kptr_restrict(rep); in __cmd_report()
994 rep->nr_entries += evsel__hists(pos)->nr_entries; in __cmd_report()
1005 rep->skip_empty); in __cmd_report()
1007 rep->skip_empty); in __cmd_report()
1012 ret = report__collapse_hists(rep); in __cmd_report()
1025 rep->nr_entries = 0; in __cmd_report()
1027 rep->nr_entries += evsel__hists(pos)->nr_entries; in __cmd_report()
1029 if (rep->nr_entries == 0) { in __cmd_report()
1034 report__output_resort(rep); in __cmd_report()
1036 if (rep->total_cycles_mode) { in __cmd_report()
1046 rep->block_reports = block_info__create_report(session->evlist, in __cmd_report()
1047 rep->total_cycles, in __cmd_report()
1049 &rep->nr_block_reports); in __cmd_report()
1050 if (!rep->block_reports) in __cmd_report()
1054 return report__browse_hists(rep); in __cmd_report()
1143 struct report *rep = opt->value; in parse_percent_limit() local
1146 rep->min_percent = pcnt; in parse_percent_limit()