Home
last modified time | relevance | path

Searched refs:threads (Results 1 - 25 of 953) sorted by relevance

12345678910>>...39

/kernel/linux/linux-5.10/tools/perf/util/
H A Dthread_map.c35 struct perf_thread_map *threads; in thread_map__new_by_pid() local
46 threads = thread_map__alloc(items); in thread_map__new_by_pid()
47 if (threads != NULL) { in thread_map__new_by_pid()
49 perf_thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid()
50 threads->nr = items; in thread_map__new_by_pid()
51 refcount_set(&threads->refcnt, 1); in thread_map__new_by_pid()
58 return threads; in thread_map__new_by_pid()
63 struct perf_thread_map *threads = thread_map__alloc(1); in thread_map__new_by_tid() local
65 if (threads != NULL) { in thread_map__new_by_tid()
66 perf_thread_map__set_pid(threads, in thread_map__new_by_tid()
80 struct perf_thread_map *threads = thread_map__alloc(max_threads); __thread_map__new_all_cpus() local
183 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_pid_str() local
245 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_tid_str() local
307 thread_map__fprintf(struct perf_thread_map *threads, FILE *fp) thread_map__fprintf() argument
363 thread_map__read_comms(struct perf_thread_map *threads) thread_map__read_comms() argument
371 thread_map__copy_event(struct perf_thread_map *threads, struct perf_record_thread_map *event) thread_map__copy_event() argument
388 struct perf_thread_map *threads; thread_map__new_event() local
397 thread_map__has(struct perf_thread_map *threads, pid_t pid) thread_map__has() argument
409 thread_map__remove(struct perf_thread_map *threads, int idx) thread_map__remove() argument
[all...]
/kernel/linux/linux-6.6/tools/perf/util/
H A Dthread_map.c36 struct perf_thread_map *threads; in thread_map__new_by_pid() local
47 threads = thread_map__alloc(items); in thread_map__new_by_pid()
48 if (threads != NULL) { in thread_map__new_by_pid()
50 perf_thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid()
51 threads->nr = items; in thread_map__new_by_pid()
52 refcount_set(&threads->refcnt, 1); in thread_map__new_by_pid()
59 return threads; in thread_map__new_by_pid()
64 struct perf_thread_map *threads = thread_map__alloc(1); in thread_map__new_by_tid() local
66 if (threads != NULL) { in thread_map__new_by_tid()
67 perf_thread_map__set_pid(threads, in thread_map__new_by_tid()
81 struct perf_thread_map *threads = thread_map__alloc(max_threads); __thread_map__new_all_cpus() local
184 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_pid_str() local
246 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_tid_str() local
308 thread_map__fprintf(struct perf_thread_map *threads, FILE *fp) thread_map__fprintf() argument
364 thread_map__read_comms(struct perf_thread_map *threads) thread_map__read_comms() argument
372 thread_map__copy_event(struct perf_thread_map *threads, struct perf_record_thread_map *event) thread_map__copy_event() argument
389 struct perf_thread_map *threads; thread_map__new_event() local
398 thread_map__has(struct perf_thread_map *threads, pid_t pid) thread_map__has() argument
410 thread_map__remove(struct perf_thread_map *threads, int idx) thread_map__remove() argument
[all...]
/kernel/linux/linux-5.10/tools/perf/tests/
H A Dthread-map.c68 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
110 struct perf_thread_map *threads; test__thread_map_remove() local
[all...]
H A Devent-times.c62 struct perf_thread_map *threads; in attach__current_disabled() local
67 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_disabled()
68 if (threads == NULL) { in attach__current_disabled()
75 err = evsel__open_per_thread(evsel, threads); in attach__current_disabled()
81 perf_thread_map__put(threads); in attach__current_disabled()
88 struct perf_thread_map *threads; in attach__current_enabled() local
93 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_enabled()
94 if (threads == NULL) { in attach__current_enabled()
99 err = evsel__open_per_thread(evsel, threads); in attach__current_enabled()
101 perf_thread_map__put(threads); in attach__current_enabled()
[all...]
/kernel/linux/linux-6.6/tools/perf/tests/
H A Dthread-map.c69 struct perf_thread_map *threads; in process_event() local
75 threads = thread_map__new_event(&event->thread_map); in process_event()
76 TEST_ASSERT_VAL("failed to alloc map", threads); in process_event()
78 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event()
80 perf_thread_map__pid(threads, 0) == getpid()); in process_event()
82 perf_thread_map__comm(threads, 0) && in process_event()
83 !strcmp(perf_thread_map__comm(threads, 0), NAME)); in process_event()
85 refcount_read(&threads->refcnt) == 1); in process_event()
86 perf_thread_map__put(threads); in process_event()
92 struct perf_thread_map *threads; in test__thread_map_synthesize() local
112 struct perf_thread_map *threads; test__thread_map_remove() local
[all...]
H A Devent-times.c62 struct perf_thread_map *threads; in attach__current_disabled() local
67 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_disabled()
68 if (threads == NULL) { in attach__current_disabled()
75 err = evsel__open_per_thread(evsel, threads); in attach__current_disabled()
81 perf_thread_map__put(threads); in attach__current_disabled()
88 struct perf_thread_map *threads; in attach__current_enabled() local
93 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_enabled()
94 if (threads == NULL) { in attach__current_enabled()
99 err = evsel__open_per_thread(evsel, threads); in attach__current_enabled()
101 perf_thread_map__put(threads); in attach__current_enabled()
[all...]
/kernel/linux/linux-6.6/tools/lib/perf/tests/
H A Dtest-threadmap.c16 struct perf_thread_map *threads; in test_threadmap_array() local
19 threads = perf_thread_map__new_array(nr, array); in test_threadmap_array()
20 __T("Failed to allocate new thread map", threads); in test_threadmap_array()
22 __T("Unexpected number of threads", perf_thread_map__nr(threads) == nr); in test_threadmap_array()
26 perf_thread_map__pid(threads, i) == (array ? array[i] : -1)); in test_threadmap_array()
30 perf_thread_map__set_pid(threads, i, i * 100); in test_threadmap_array()
33 perf_thread_map__pid(threads, 0) == (array ? array[0] : -1)); in test_threadmap_array()
37 perf_thread_map__pid(threads, i) == i * 100); in test_threadmap_array()
40 perf_thread_map__put(threads); in test_threadmap_array()
48 struct perf_thread_map *threads; test_threadmap() local
[all...]
H A Dtest-evsel.c56 struct perf_thread_map *threads; in test_stat_thread() local
64 threads = perf_thread_map__new_dummy(); in test_stat_thread()
65 __T("failed to create threads", threads); in test_stat_thread()
67 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread()
72 err = perf_evsel__open(evsel, NULL, threads); in test_stat_thread()
81 perf_thread_map__put(threads); in test_stat_thread()
88 struct perf_thread_map *threads; in test_stat_thread_enable() local
97 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable()
98 __T("failed to create threads", thread in test_stat_thread_enable()
130 struct perf_thread_map *threads; test_stat_user_read() local
195 test_stat_read_format_single(struct perf_event_attr *attr, struct perf_thread_map *threads) test_stat_read_format_single() argument
230 test_stat_read_format_group(struct perf_event_attr *attr, struct perf_thread_map *threads) test_stat_read_format_group() argument
293 struct perf_thread_map *threads; test_stat_read_format() local
[all...]
H A Dtest-evlist.c95 struct perf_thread_map *threads; in test_stat_thread() local
108 threads = perf_thread_map__new_dummy(); in test_stat_thread()
109 __T("failed to create threads", threads); in test_stat_thread()
111 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread()
130 perf_evlist__set_maps(evlist, NULL, threads); in test_stat_thread()
143 perf_thread_map__put(threads); in test_stat_thread()
150 struct perf_thread_map *threads; in test_stat_thread_enable() local
165 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable()
166 __T("failed to create threads", thread in test_stat_thread_enable()
219 struct perf_thread_map *threads; test_mmap_thread() local
443 struct perf_thread_map *threads; test_stat_multiplexing() local
[all...]
/kernel/linux/linux-5.10/tools/lib/perf/
H A Dthreadmap.c47 struct perf_thread_map *threads = thread_map__alloc(1); in perf_thread_map__new_dummy() local
49 if (threads != NULL) { in perf_thread_map__new_dummy()
50 perf_thread_map__set_pid(threads, 0, -1); in perf_thread_map__new_dummy()
51 threads->nr = 1; in perf_thread_map__new_dummy()
52 refcount_set(&threads->refcnt, 1); in perf_thread_map__new_dummy()
54 return threads; in perf_thread_map__new_dummy()
57 static void perf_thread_map__delete(struct perf_thread_map *threads) in perf_thread_map__delete() argument
59 if (threads) { in perf_thread_map__delete()
62 WARN_ONCE(refcount_read(&threads->refcnt) != 0, in perf_thread_map__delete()
64 for (i = 0; i < threads in perf_thread_map__delete()
83 perf_thread_map__nr(struct perf_thread_map *threads) perf_thread_map__nr() argument
[all...]
/kernel/linux/linux-6.6/tools/lib/perf/
H A Dthreadmap.c47 struct perf_thread_map *threads = thread_map__alloc(nr_threads); in perf_thread_map__new_array() local
50 if (!threads) in perf_thread_map__new_array()
54 perf_thread_map__set_pid(threads, i, array ? array[i] : -1); in perf_thread_map__new_array()
56 threads->nr = nr_threads; in perf_thread_map__new_array()
57 refcount_set(&threads->refcnt, 1); in perf_thread_map__new_array()
59 return threads; in perf_thread_map__new_array()
67 static void perf_thread_map__delete(struct perf_thread_map *threads) in perf_thread_map__delete() argument
69 if (threads) { in perf_thread_map__delete()
72 WARN_ONCE(refcount_read(&threads->refcnt) != 0, in perf_thread_map__delete()
74 for (i = 0; i < threads in perf_thread_map__delete()
93 perf_thread_map__nr(struct perf_thread_map *threads) perf_thread_map__nr() argument
[all...]
/third_party/ltp/testcases/kernel/syscalls/tgkill/
H A Dtgkill01.c7 * of threads in parallel, then one-by-one call tgkill(..., tid, SIGUSR1)
25 static struct thread_state *threads; variable
66 if (threads[i].tid == -1) in stop_threads()
69 SAFE_PTHREAD_JOIN(threads[i].thread, NULL); in stop_threads()
70 threads[i].tid = -1; in stop_threads()
73 if (threads) in stop_threads()
74 free(threads); in stop_threads()
84 TEST(sys_tgkill(getpid(), threads[i].tid, SIGUSR1)); in run()
93 if (!pthread_equal(sigusr1_thread, threads[i].thread)) { in run()
99 tst_res(TPASS, "SIGUSR1 delivered to correct threads"); in run()
[all...]
/kernel/linux/linux-5.10/tools/lib/perf/tests/
H A Dtest-evsel.c52 struct perf_thread_map *threads; in test_stat_thread() local
60 threads = perf_thread_map__new_dummy(); in test_stat_thread()
61 __T("failed to create threads", threads); in test_stat_thread()
63 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread()
68 err = perf_evsel__open(evsel, NULL, threads); in test_stat_thread()
77 perf_thread_map__put(threads); in test_stat_thread()
84 struct perf_thread_map *threads; in test_stat_thread_enable() local
93 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable()
94 __T("failed to create threads", thread in test_stat_thread_enable()
[all...]
H A Dtest-threadmap.c15 struct perf_thread_map *threads; in main() local
21 threads = perf_thread_map__new_dummy(); in main()
22 if (!threads) in main()
25 perf_thread_map__get(threads); in main()
26 perf_thread_map__put(threads); in main()
27 perf_thread_map__put(threads); in main()
H A Dtest-evlist.c85 struct perf_thread_map *threads; in test_stat_thread() local
98 threads = perf_thread_map__new_dummy(); in test_stat_thread()
99 __T("failed to create threads", threads); in test_stat_thread()
101 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread()
116 perf_evlist__set_maps(evlist, NULL, threads); in test_stat_thread()
129 perf_thread_map__put(threads); in test_stat_thread()
136 struct perf_thread_map *threads; in test_stat_thread_enable() local
151 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable()
152 __T("failed to create threads", thread in test_stat_thread_enable()
201 struct perf_thread_map *threads; test_mmap_thread() local
[all...]
/third_party/glfw/tests/
H A Dthreads.c27 // the GLFW API is able to be used from multiple threads
86 Thread threads[] = in main() local
92 const int count = sizeof(threads) / sizeof(Thread); in main()
104 threads[i].window = glfwCreateWindow(200, 200, in main()
105 threads[i].title, in main()
107 if (!threads[i].window) in main()
113 glfwSetKeyCallback(threads[i].window, key_callback); in main()
116 glfwMakeContextCurrent(threads[0].window); in main()
122 if (thrd_create(&threads[i].id, thread_main, threads in main()
[all...]
/third_party/libuv/test/
H A Dtest-thread.c171 struct test_thread threads[8]; in TEST_IMPL() local
175 memset(threads, 0, sizeof(threads)); in TEST_IMPL()
177 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
178 r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); in TEST_IMPL()
182 for (i = 0; i < ARRAY_SIZE(threads); i++) { in TEST_IMPL()
183 r = uv_thread_join(&threads[i].thread_id); in TEST_IMPL()
185 ASSERT_EQ(1, threads[i].thread_called); in TEST_IMPL()
203 uv_thread_t threads[ in TEST_IMPL() local
[all...]
H A Dtest-thread-affinity.c57 uv_thread_t threads[3]; in TEST_IMPL() local
61 threads[0] = GetCurrentThread(); in TEST_IMPL()
63 threads[0] = uv_thread_self(); in TEST_IMPL()
71 r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); in TEST_IMPL()
103 ASSERT_OK(uv_thread_create(threads + 1, in TEST_IMPL()
106 ASSERT_OK(uv_thread_create(threads + 2, in TEST_IMPL()
109 ASSERT_OK(uv_thread_join(threads + 1)); in TEST_IMPL()
110 ASSERT_OK(uv_thread_join(threads + 2)); in TEST_IMPL()
127 r = uv_thread_setaffinity(&threads[0], cpumask, NULL, cpumasksize); in TEST_IMPL()
131 r = uv_thread_getaffinity(&threads[ in TEST_IMPL()
[all...]
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
H A DCollationThreadTest.java226 private void runThreads(Thread[] threads, Control control) { in runThreads() argument
227 for (int i = 0; i < threads.length; ++i) { in runThreads()
228 threads[i].start(); in runThreads()
241 for (int i = 0; i < threads.length; ++i) { in runThreads()
242 threads[i].join(); in runThreads()
259 Thread[] threads = new Thread[10]; in testThreads()
260 for (int i = 0; i < threads.length; ++i) { in testThreads()
271 threads[i] = new Thread(test); in testThreads()
274 runThreads(threads, control); in testThreads()
284 Thread[] threads in testFrozen()
[all...]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/
H A DCollationThreadTest.java229 private void runThreads(Thread[] threads, Control control) { in runThreads() argument
230 for (int i = 0; i < threads.length; ++i) { in runThreads()
231 threads[i].start(); in runThreads()
244 for (int i = 0; i < threads.length; ++i) { in runThreads()
245 threads[i].join(); in runThreads()
262 Thread[] threads = new Thread[10]; in testThreads()
263 for (int i = 0; i < threads.length; ++i) { in testThreads()
274 threads[i] = new Thread(test); in testThreads()
277 runThreads(threads, control); in testThreads()
287 Thread[] threads in testFrozen()
[all...]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/
H A D1-2.c89 static pthread_t threads[3]; variable
96 threads[0] = pthread_self(); in prepare()
101 threads[1] = pthread_self(); in parent()
106 threads[2] = pthread_self(); in child()
137 if (!pthread_equal(ch, threads[0])) { in threaded()
142 if (!pthread_equal(pthread_self(), threads[2])) { in threaded()
151 if (!pthread_equal(ch, threads[0])) { in threaded()
156 if (!pthread_equal(pthread_self(), threads[1])) { in threaded()
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/
H A Dmarl_bench.h33 // threads from the benchmark arguments, calls f, then unbinds and destructs
48 // run() creates a scheduler, sets the number of worker threads from the
57 // threads.
59 // across from 0 to numLogicalCPUs worker threads.
61 // across [0 .. numLogicalCPUs] worker threads in 2^n steps.
64 b->ArgNames({"tasks", "threads"}); in args()
68 for (unsigned int threads = 1U; threads <= numLogicalCPUs; threads++) { in args()
69 b->Args({NumTasks, threads}); in args()
[all...]
/third_party/musl/libc-test/src/functional/
H A Dtest-malloc-info-stats-print.h38 char threads[SIZES_COUNT][MAX_TID_LEN + 1]; member
81 snprintf(test_results.threads[0], MAX_TID_LEN, "%d", (pid_t) syscall(__NR_gettid)); in get_main_thread_test_results()
115 pthread_t threads[SIZES_COUNT]; in get_different_threads_test_results() local
117 pthread_create(&threads[i], NULL, allocate_wait_free, &thread_data[i]); in get_different_threads_test_results()
122 snprintf(test_results.threads[i], MAX_TID_LEN, "%d", thread_data[i].self_id); in get_different_threads_test_results()
128 pthread_join(threads[i], NULL); in get_different_threads_test_results()
148 populate_thread_stats(test_results->stats_before_allocations, test_results->threads[0], &stats_before_allocations); in validate_main_thread_test_results()
149 populate_thread_stats(test_results->stats_after_allocations, test_results->threads[0], &stats_after_allocations); in validate_main_thread_test_results()
150 populate_thread_stats(test_results->stats_after_free, test_results->threads[0], &stats_after_free); in validate_main_thread_test_results()
174 result &= populate_thread_stats(test_results->stats_after_allocations, test_results->threads[ in validate_different_threads_test_results()
[all...]
/kernel/linux/linux-6.6/tools/testing/selftests/dma/
H A Ddma_map_benchmark.c29 int threads = 1, seconds = 20, node = -1; in main() local
41 threads = atoi(optarg); in main()
66 if (threads <= 0 || threads > DMA_MAP_MAX_THREADS) { in main()
67 fprintf(stderr, "invalid number of threads, must be in 1-%d\n", in main()
109 map.threads = threads; in main()
121 printf("dma mapping benchmark: threads:%d seconds:%d node:%d dir:%s granule: %d\n", in main()
122 threads, seconds, node, dir[directions], granule); in main()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/translit/
H A DThreadTest.java28 private ArrayList<Worker> threads = new ArrayList<Worker>(); field in ThreadTest
40 threads.add(thread); in TestThreads()
44 for (Worker thread: threads) { in TestThreads()
83 ArrayList<Thread> threads = new ArrayList<Thread>(); in TestAnyTranslit()
85 threads.add(new Thread() { in TestAnyTranslit()
92 for (Thread th:threads) { in TestAnyTranslit()
95 for (Thread th:threads) { in TestAnyTranslit()

Completed in 8 milliseconds

12345678910>>...39