Lines Matching defs:thread

1399 void evsel__compute_deltas(struct evsel *evsel, int cpu, int thread,
1411 tmp = *perf_counts(evsel->prev_raw_counts, cpu, thread);
1412 *perf_counts(evsel->prev_raw_counts, cpu, thread) = *count;
1439 static int evsel__read_one(struct evsel *evsel, int cpu, int thread)
1441 struct perf_counts_values *count = perf_counts(evsel->counts, cpu, thread);
1443 return perf_evsel__read(&evsel->core, cpu, thread, count);
1447 perf_evsel__set_count(struct evsel *counter, int cpu, int thread,
1452 count = perf_counts(counter->counts, cpu, thread);
1458 perf_counts__set_loaded(counter->counts, cpu, thread, true);
1463 int cpu, int thread, u64 *data)
1482 perf_evsel__set_count(leader, cpu, thread,
1492 perf_evsel__set_count(counter, cpu, thread,
1499 static int evsel__read_group(struct evsel *leader, int cpu, int thread)
1520 if (FD(leader, cpu, thread) < 0)
1523 if (readn(FD(leader, cpu, thread), data, size) <= 0)
1526 return perf_evsel__process_group_data(leader, cpu, thread, data);
1529 int evsel__read_counter(struct evsel *evsel, int cpu, int thread)
1534 return evsel__read_group(evsel, cpu, thread);
1536 return evsel__read_one(evsel, cpu, thread);
1539 int __evsel__read_on_cpu(struct evsel *evsel, int cpu, int thread, bool scale)
1544 if (FD(evsel, cpu, thread) < 0)
1547 if (evsel->counts == NULL && evsel__alloc_counts(evsel, cpu + 1, thread + 1) < 0)
1550 if (readn(FD(evsel, cpu, thread), &count, nv * sizeof(u64)) <= 0)
1553 evsel__compute_deltas(evsel, cpu, thread, &count);
1555 *perf_counts(evsel->counts, cpu, thread) = count;
1559 static int get_group_fd(struct evsel *evsel, int cpu, int thread)
1573 fd = FD(leader, cpu, thread);
1584 for (int thread = thread_idx; thread < nr_threads - 1; thread++)
1585 FD(pos, cpu, thread) = FD(pos, cpu, thread + 1);
1615 int thread, int err)
1617 pid_t ignore_pid = perf_thread_map__pid(threads, thread);
1630 /* If there's only one thread, let it fail. */
1638 if (update_fds(evsel, nr_cpus, cpu, threads->nr, thread))
1641 if (thread_map__remove(threads, thread))
1706 int cpu, thread, nthreads;
1785 for (thread = 0; thread < nthreads; thread++) {
1789 pid = perf_thread_map__pid(threads, thread);
1791 group_fd = get_group_fd(evsel, cpu, thread);
1798 FD(evsel, cpu, thread) = fd;
1808 if (ignore_missing_thread(evsel, cpus->nr, cpu, threads, thread, err)) {
1810 * We just removed 1 thread, so take a step
1811 * back on thread index and lower the upper
1815 thread--;
1885 if (err != -EINVAL || cpu > 0 || thread > 0)
1959 threads->err_thread = thread;
1963 while (--thread >= 0) {
1964 if (FD(evsel, cpu, thread) >= 0)
1965 close(FD(evsel, cpu, thread));
1966 FD(evsel, cpu, thread) = -1;
1968 thread = nthreads;
2714 int cpu, thread;
2717 for (thread = 0; thread < xyarray__max_y(evsel->core.fd);
2718 thread++) {
2719 int fd = FD(evsel, cpu, thread);
2722 cpu, thread, fd) < 0)