Lines Matching full: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()
110 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()
120 threads); in test__thread_map_remove()
123 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
126 !thread_map__remove(threads, 0)); in test__thread_map_remove()
128 TEST_ASSERT_VAL("thread_map count != 1", threads->nr == 1); in test__thread_map_remove()
131 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
134 !thread_map__remove(threads, 0)); in test__thread_map_remove()
136 TEST_ASSERT_VAL("thread_map count != 0", threads->nr == 0); in test__thread_map_remove()
139 thread_map__fprintf(threads, stderr); in test__thread_map_remove()
142 thread_map__remove(threads, 0)); in test__thread_map_remove()
144 for (i = 0; i < threads->nr; i++) in test__thread_map_remove()
145 zfree(&threads->map[i].comm); in test__thread_map_remove()
147 free(threads); in test__thread_map_remove()