Lines Matching refs:threads
47 struct perf_thread_map *threads = thread_map__alloc(nr_threads);
50 if (!threads)
54 perf_thread_map__set_pid(threads, i, array ? array[i] : -1);
56 threads->nr = nr_threads;
57 refcount_set(&threads->refcnt, 1);
59 return threads;
67 static void perf_thread_map__delete(struct perf_thread_map *threads)
69 if (threads) {
72 WARN_ONCE(refcount_read(&threads->refcnt) != 0,
74 for (i = 0; i < threads->nr; i++)
75 free(perf_thread_map__comm(threads, i));
76 free(threads);
93 int perf_thread_map__nr(struct perf_thread_map *threads)
95 return threads ? threads->nr : 1;