Lines Matching refs:thread
224 int pid = -1, idx = 0, thread = 0, nthreads, err = 0, old_errno; in evsel__tool_pmu_open() local
241 for (thread = 0; thread < nthreads; thread++) { in evsel__tool_pmu_open()
242 if (thread >= nthreads) in evsel__tool_pmu_open()
246 pid = perf_thread_map__pid(threads, thread); in evsel__tool_pmu_open()
267 FD(evsel, idx, thread) = fd; in evsel__tool_pmu_open()
272 start_time = xyarray__entry(evsel->start_times, idx, thread); in evsel__tool_pmu_open()
292 threads->err_thread = thread; in evsel__tool_pmu_open()
296 while (--thread >= 0) { in evsel__tool_pmu_open()
297 if (FD(evsel, idx, thread) >= 0) in evsel__tool_pmu_open()
298 close(FD(evsel, idx, thread)); in evsel__tool_pmu_open()
299 FD(evsel, idx, thread) = -1; in evsel__tool_pmu_open()
301 thread = nthreads; in evsel__tool_pmu_open()
437 int evsel__tool_pmu_read(struct evsel *evsel, int cpu_map_idx, int thread) in evsel__tool_pmu_read() argument
446 count = perf_counts(evsel->counts, cpu_map_idx, thread); in evsel__tool_pmu_read()
459 old_count = perf_counts(evsel->prev_raw_counts, cpu_map_idx, thread); in evsel__tool_pmu_read()
461 if (cpu_map_idx == 0 && thread == 0) { in evsel__tool_pmu_read()
484 if (cpu_map_idx == 0 && thread == 0) in evsel__tool_pmu_read()
493 start_time = xyarray__entry(evsel->start_times, cpu_map_idx, thread); in evsel__tool_pmu_read()
494 fd = FD(evsel, cpu_map_idx, thread); in evsel__tool_pmu_read()
504 if (thread == 0) { in evsel__tool_pmu_read()