Lines Matching defs:cpu_map_idx
1411 int evsel__enable_cpu(struct evsel *evsel, int cpu_map_idx)
1413 return perf_evsel__enable_cpu(&evsel->core, cpu_map_idx);
1426 int evsel__disable_cpu(struct evsel *evsel, int cpu_map_idx)
1428 return perf_evsel__disable_cpu(&evsel->core, cpu_map_idx);
1500 void evsel__compute_deltas(struct evsel *evsel, int cpu_map_idx, int thread,
1508 tmp = *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread);
1509 *perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread) = *count;
1516 static int evsel__read_one(struct evsel *evsel, int cpu_map_idx, int thread)
1518 struct perf_counts_values *count = perf_counts(evsel->counts, cpu_map_idx, thread);
1520 return perf_evsel__read(&evsel->core, cpu_map_idx, thread, count);
1523 static void evsel__set_count(struct evsel *counter, int cpu_map_idx, int thread,
1528 count = perf_counts(counter->counts, cpu_map_idx, thread);
1535 perf_counts__set_loaded(counter->counts, cpu_map_idx, thread, true);
1538 static int evsel__process_group_data(struct evsel *leader, int cpu_map_idx, int thread, u64 *data)
1566 evsel__set_count(counter, cpu_map_idx, thread, v->value, ena, run, lost);
1572 static int evsel__read_group(struct evsel *leader, int cpu_map_idx, int thread)
1593 if (FD(leader, cpu_map_idx, thread) < 0)
1596 if (readn(FD(leader, cpu_map_idx, thread), data, size) <= 0)
1599 return evsel__process_group_data(leader, cpu_map_idx, thread, data);
1602 int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread)
1607 return evsel__read_group(evsel, cpu_map_idx, thread);
1609 return evsel__read_one(evsel, cpu_map_idx, thread);
1612 int __evsel__read_on_cpu(struct evsel *evsel, int cpu_map_idx, int thread, bool scale)
1617 if (FD(evsel, cpu_map_idx, thread) < 0)
1623 if (readn(FD(evsel, cpu_map_idx, thread), &count, nv * sizeof(u64)) <= 0)
1626 evsel__compute_deltas(evsel, cpu_map_idx, thread, &count);
1628 *perf_counts(evsel->counts, cpu_map_idx, thread) = count;
1633 int cpu_map_idx)
1637 cpu = perf_cpu_map__cpu(evsel->core.cpus, cpu_map_idx);
1641 static int evsel__hybrid_group_cpu_map_idx(struct evsel *evsel, int cpu_map_idx)
1647 return evsel__match_other_cpu(evsel, leader, cpu_map_idx);
1650 return cpu_map_idx;
1653 static int get_group_fd(struct evsel *evsel, int cpu_map_idx, int thread)
1667 cpu_map_idx = evsel__hybrid_group_cpu_map_idx(evsel, cpu_map_idx);
1668 if (cpu_map_idx == -1)
1671 fd = FD(leader, cpu_map_idx, thread);
1689 int nr_cpus, int cpu_map_idx,
1694 if (cpu_map_idx >= nr_cpus || thread_idx >= nr_threads)
1698 nr_cpus = pos != evsel ? nr_cpus : cpu_map_idx;
1713 int nr_cpus, int cpu_map_idx,
1738 if (update_fds(evsel, nr_cpus, cpu_map_idx, threads->nr, thread))
2183 int evsel__open_per_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, int cpu_map_idx)
2185 if (cpu_map_idx == -1)
2188 return evsel__open_cpu(evsel, cpus, NULL, cpu_map_idx, cpu_map_idx + 1);
3068 int cpu_map_idx, thread;
3070 for (cpu_map_idx = 0; cpu_map_idx < xyarray__max_x(evsel->core.fd); cpu_map_idx++) {
3073 int fd = FD(evsel, cpu_map_idx, thread);
3076 cpu_map_idx, thread, fd) < 0)