Lines Matching refs:threads
68 struct perf_thread_map *threads; in process_event() local
74 threads = thread_map__new_event(&event->thread_map); in process_event()
75 TEST_ASSERT_VAL("failed to alloc map", threads); in process_event()
77 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event()
79 perf_thread_map__pid(threads, 0) == getpid()); in process_event()
81 perf_thread_map__comm(threads, 0) && in process_event()
82 !strcmp(perf_thread_map__comm(threads, 0), NAME)); in process_event()
84 refcount_read(&threads->refcnt) == 1); in process_event()
85 perf_thread_map__put(threads); in process_event()
91 struct perf_thread_map *threads; in test__thread_map_synthesize() local
97 threads = thread_map__new_by_pid(getpid()); in test__thread_map_synthesize()
98 TEST_ASSERT_VAL("failed to alloc map", threads); in test__thread_map_synthesize()
100 thread_map__read_comms(threads); in test__thread_map_synthesize()
103 !perf_event__synthesize_thread_map2(NULL, threads, process_event, NULL)); in test__thread_map_synthesize()
105 perf_thread_map__put(threads); in test__thread_map_synthesize()
111 struct perf_thread_map *threads; in test__thread_map_remove() local
117 threads = thread_map__new_str(str, NULL, 0, false); in test__thread_map_remove()
121 threads); in test__thread_map_remove()
124 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
127 !thread_map__remove(threads, 0)); in test__thread_map_remove()
129 TEST_ASSERT_VAL("thread_map count != 1", threads->nr == 1); in test__thread_map_remove()
132 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
135 !thread_map__remove(threads, 0)); in test__thread_map_remove()
137 TEST_ASSERT_VAL("thread_map count != 0", threads->nr == 0); in test__thread_map_remove()
140 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
143 thread_map__remove(threads, 0)); in test__thread_map_remove()
145 perf_thread_map__put(threads); in test__thread_map_remove()