Lines Matching refs:perf_stat

135 struct perf_stat {  struct
148 static struct perf_stat perf_stat; argument
149 #define STAT_RECORD perf_stat.record
257 if (perf_data__write(&perf_stat.data, event, event->header.size) < 0) { in process_synthesized_event()
262 perf_stat.bytes_written += event->header.size; in process_synthesized_event()
704 bool is_pipe = STAT_RECORD ? perf_stat.data.is_pipe : false; in __run_perf_stat()
848 int fd = perf_data__fd(&perf_stat.data); in __run_perf_stat()
851 err = perf_header__write_pipe(perf_data__fd(&perf_stat.data)); in __run_perf_stat()
853 err = perf_session__write_header(perf_stat.session, evsel_list, in __run_perf_stat()
980 if (STAT_RECORD && perf_stat.data.is_pipe) in print_counters()
1598 u32 cache_level = (perf_stat.aggr_level) ?: stat_config.aggr_level; in perf_env__get_cache_aggr_by_cpu()
1683 return perf_env__get_socket_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_socket_file()
1688 return perf_env__get_die_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_die_file()
1694 return perf_env__get_cluster_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_cluster_file()
1700 return perf_env__get_cache_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_cache_file()
1706 return perf_env__get_core_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_core_file()
1712 return perf_env__get_cpu_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_cpu_file()
1718 return perf_env__get_node_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_node_file()
1724 return perf_env__get_global_aggr_by_cpu(cpu, &perf_stat.session->header.env); in perf_stat__get_global_file()
1781 static int perf_stat_init_aggr_mode_file(struct perf_stat *st) in perf_stat_init_aggr_mode_file()
2132 struct perf_data *data = &perf_stat.data; in __cmd_record()
2155 perf_stat.session = session; in __cmd_record()
2156 perf_stat.record = true; in __cmd_record()
2188 struct perf_stat *st = container_of(tool, struct perf_stat, tool); in process_stat_config_event()
2199 if (perf_stat.data.is_pipe) in process_stat_config_event()
2215 static int set_maps(struct perf_stat *st) in set_maps()
2237 struct perf_stat *st = container_of(tool, struct perf_stat, tool); in process_thread_map_event()
2256 struct perf_stat *st = container_of(tool, struct perf_stat, tool); in process_cpu_map_event()
2277 static struct perf_stat perf_stat = { variable
2287 OPT_SET_UINT(0, "per-socket", &perf_stat.aggr_mode, in __cmd_report()
2289 OPT_SET_UINT(0, "per-die", &perf_stat.aggr_mode, in __cmd_report()
2291 OPT_SET_UINT(0, "per-cluster", &perf_stat.aggr_mode, in __cmd_report()
2293 OPT_CALLBACK_OPTARG(0, "per-cache", &perf_stat.aggr_mode, &perf_stat.aggr_level, in __cmd_report()
2297 OPT_SET_UINT(0, "per-core", &perf_stat.aggr_mode, in __cmd_report()
2299 OPT_SET_UINT(0, "per-node", &perf_stat.aggr_mode, in __cmd_report()
2301 OPT_SET_UINT('A', "no-aggr", &perf_stat.aggr_mode, in __cmd_report()
2317 perf_stat.data.path = input_name; in __cmd_report()
2318 perf_stat.data.mode = PERF_DATA_MODE_READ; in __cmd_report()
2320 perf_tool__init(&perf_stat.tool, /*ordered_events=*/false); in __cmd_report()
2321 perf_stat.tool.attr = perf_event__process_attr; in __cmd_report()
2322 perf_stat.tool.event_update = perf_event__process_event_update; in __cmd_report()
2323 perf_stat.tool.thread_map = process_thread_map_event; in __cmd_report()
2324 perf_stat.tool.cpu_map = process_cpu_map_event; in __cmd_report()
2325 perf_stat.tool.stat_config = process_stat_config_event; in __cmd_report()
2326 perf_stat.tool.stat = perf_event__process_stat_event; in __cmd_report()
2327 perf_stat.tool.stat_round = process_stat_round_event; in __cmd_report()
2329 session = perf_session__new(&perf_stat.data, &perf_stat.tool); in __cmd_report()
2333 perf_stat.session = session; in __cmd_report()
2852 stat_config.identifier = !(STAT_RECORD && perf_stat.data.is_pipe); in cmd_stat()
2909 int fd = perf_data__fd(&perf_stat.data); in cmd_stat()
2911 err = perf_event__synthesize_kernel_mmap((void *)&perf_stat, in cmd_stat()
2913 &perf_stat.session->machines.host); in cmd_stat()
2924 if (!perf_stat.data.is_pipe) { in cmd_stat()
2925 perf_stat.session->header.data_size += perf_stat.bytes_written; in cmd_stat()
2926 perf_session__write_header(perf_stat.session, evsel_list, fd, true); in cmd_stat()
2930 perf_session__delete(perf_stat.session); in cmd_stat()