Lines Matching refs:cpu_map_idx
260 static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread, in evsel__write_stat_event() argument
263 struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread); in evsel__write_stat_event()
264 struct perf_cpu cpu = perf_cpu_map__cpu(evsel__cpus(counter), cpu_map_idx); in evsel__write_stat_event()
270 static int read_single_counter(struct evsel *counter, int cpu_map_idx, int thread) in read_single_counter() argument
272 int err = evsel__read_counter(counter, cpu_map_idx, thread); in read_single_counter()
278 if (err && cpu_map_idx == 0 && in read_single_counter()
283 perf_counts(counter->counts, cpu_map_idx, thread); in read_single_counter()
285 start_time = xyarray__entry(counter->start_times, cpu_map_idx, thread); in read_single_counter()
301 static int read_counter_cpu(struct evsel *counter, int cpu_map_idx) in read_counter_cpu() argument
312 count = perf_counts(counter->counts, cpu_map_idx, thread); in read_counter_cpu()
318 if (!perf_counts__is_loaded(counter->counts, cpu_map_idx, thread) && in read_counter_cpu()
319 read_single_counter(counter, cpu_map_idx, thread)) { in read_counter_cpu()
321 perf_counts(counter->counts, cpu_map_idx, thread)->ena = 0; in read_counter_cpu()
322 perf_counts(counter->counts, cpu_map_idx, thread)->run = 0; in read_counter_cpu()
326 perf_counts__set_loaded(counter->counts, cpu_map_idx, thread, false); in read_counter_cpu()
329 if (evsel__write_stat_event(counter, cpu_map_idx, thread, count)) { in read_counter_cpu()
340 cpu_map_idx).cpu, in read_counter_cpu()
370 counter->err = read_counter_cpu(counter, evlist_cpu_itr.cpu_map_idx); in read_affinity_counters()
662 int cpu_map_idx) in create_perf_stat_counter() argument
712 return evsel__open_per_cpu_and_thread(evsel, evsel__cpus(evsel), cpu_map_idx, in create_perf_stat_counter()
778 evlist_cpu_itr.cpu_map_idx) == 0) in __run_perf_stat()
817 perf_evsel__close_cpu(&counter->core, evlist_cpu_itr.cpu_map_idx); in __run_perf_stat()
829 evlist_cpu_itr.cpu_map_idx) == 0) in __run_perf_stat()