Lines Matching refs:threads
69 struct perf_thread_map *threads;
75 threads = thread_map__new_event(&event->thread_map);
76 TEST_ASSERT_VAL("failed to alloc map", threads);
78 TEST_ASSERT_VAL("wrong nr", threads->nr == 1);
80 perf_thread_map__pid(threads, 0) == getpid());
82 perf_thread_map__comm(threads, 0) &&
83 !strcmp(perf_thread_map__comm(threads, 0), NAME));
85 refcount_read(&threads->refcnt) == 1);
86 perf_thread_map__put(threads);
92 struct perf_thread_map *threads;
98 threads = thread_map__new_by_pid(getpid());
99 TEST_ASSERT_VAL("failed to alloc map", threads);
101 thread_map__read_comms(threads);
104 !perf_event__synthesize_thread_map2(NULL, threads, process_event, NULL));
106 perf_thread_map__put(threads);
112 struct perf_thread_map *threads;
118 threads = thread_map__new_str(str, NULL, 0, false);
122 threads);
125 thread_map__fprintf(threads, stderr);
128 !thread_map__remove(threads, 0));
130 TEST_ASSERT_VAL("thread_map count != 1", threads->nr == 1);
133 thread_map__fprintf(threads, stderr);
136 !thread_map__remove(threads, 0));
138 TEST_ASSERT_VAL("thread_map count != 0", threads->nr == 0);
141 thread_map__fprintf(threads, stderr);
144 thread_map__remove(threads, 0));
146 perf_thread_map__put(threads);