Home
last modified time | relevance | path

Searched refs:threads (Results 26 - 50 of 539) sorted by relevance

12345678910>>...22

/kernel/linux/linux-5.10/tools/testing/radix-tree/
H A Diteration_check.c15 static pthread_t threads[NUM_THREADS]; variable
178 if (pthread_create(&threads[0], NULL, tagged_iteration_fn, NULL)) { in iteration_test()
182 if (pthread_create(&threads[1], NULL, untagged_iteration_fn, NULL)) { in iteration_test()
186 if (pthread_create(&threads[2], NULL, add_entries_fn, NULL)) { in iteration_test()
190 if (pthread_create(&threads[3], NULL, remove_entries_fn, NULL)) { in iteration_test()
194 if (pthread_create(&threads[4], NULL, tag_entries_fn, NULL)) { in iteration_test()
203 if (pthread_join(threads[i], NULL)) { in iteration_test()
H A Dregression1.c168 static pthread_t *threads; variable
180 threads = malloc(nr_threads * sizeof(*threads)); in regression1_test()
184 if (pthread_create(&threads[i], NULL, regression1_fn, (void *)arg)) { in regression1_test()
191 if (pthread_join(threads[i], NULL)) { in regression1_test()
197 free(threads); in regression1_test()
/kernel/linux/linux-6.6/tools/testing/radix-tree/
H A Diteration_check.c15 static pthread_t threads[NUM_THREADS]; variable
178 if (pthread_create(&threads[0], NULL, tagged_iteration_fn, NULL)) { in iteration_test()
182 if (pthread_create(&threads[1], NULL, untagged_iteration_fn, NULL)) { in iteration_test()
186 if (pthread_create(&threads[2], NULL, add_entries_fn, NULL)) { in iteration_test()
190 if (pthread_create(&threads[3], NULL, remove_entries_fn, NULL)) { in iteration_test()
194 if (pthread_create(&threads[4], NULL, tag_entries_fn, NULL)) { in iteration_test()
203 if (pthread_join(threads[i], NULL)) { in iteration_test()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/dscr/
H A Ddscr_default_test.c6 * it's sysfs interface and then verifies that all threads
121 struct random_thread_args threads[THREADS]; in dscr_default_random_test() local
137 threads[i].expected_system_dscr = &expected_system_dscr; in dscr_default_random_test()
138 threads[i].rw_lock = &rw_lock; in dscr_default_random_test()
139 threads[i].barrier = &barrier; in dscr_default_random_test()
141 FAIL_IF(pthread_create(&threads[i].thread_id, NULL, in dscr_default_random_test()
142 dscr_default_random_thread, (void *)&threads[i])); in dscr_default_random_test()
146 FAIL_IF(pthread_join(threads[i].thread_id, NULL)); in dscr_default_random_test()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/math/
H A Dfpu_signal.c26 * worker threads
77 int i, j, rc, threads; in test_signal_fpu() local
81 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_fpu()
82 tids = malloc(threads * sizeof(pthread_t)); in test_signal_fpu()
86 threads_starting = threads; in test_signal_fpu()
87 for (i = 0; i < threads; i++) { in test_signal_fpu()
98 printf("\tSending signals to all threads %d times...", ITERATIONS); in test_signal_fpu()
100 for (j = 0; j < threads; j++) { in test_signal_fpu()
109 for (i = 0; i < threads; i++) { in test_signal_fpu()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/tm/
H A Dtm-vmx-unavail.c91 int threads; in tm_vmx_unavail_test() local
98 threads = sysconf(_SC_NPROCESSORS_ONLN) * 4; in tm_vmx_unavail_test()
99 thread = malloc(sizeof(pthread_t)*threads); in tm_vmx_unavail_test()
103 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test()
106 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/tm/
H A Dtm-vmx-unavail.c90 int threads; in tm_vmx_unavail_test() local
98 threads = sysconf(_SC_NPROCESSORS_ONLN) * 4; in tm_vmx_unavail_test()
99 thread = malloc(sizeof(pthread_t)*threads); in tm_vmx_unavail_test()
103 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test()
106 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test()
/kernel/linux/linux-6.6/tools/perf/tests/
H A Dmmap-basic.c36 struct perf_thread_map *threads; in test__basic_mmap() local
49 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__basic_mmap()
50 if (threads == NULL) { in test__basic_mmap()
77 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__basic_mmap()
98 if (evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap()
168 perf_thread_map__put(threads); in test__basic_mmap()
175 struct perf_thread_map *threads; in test_stat_user_read() local
188 threads = perf_thread_map__new_dummy(); in test_stat_user_read()
189 TEST_ASSERT_VAL("failed to create threads", threads); in test_stat_user_read()
[all...]
/kernel/linux/linux-5.10/tools/perf/util/
H A Dmachine.c63 struct threads *threads = &machine->threads[i]; in machine__threads_init() local
64 threads->entries = RB_ROOT_CACHED; in machine__threads_init()
65 init_rwsem(&threads->lock); in machine__threads_init()
66 threads->nr = 0; in machine__threads_init()
67 INIT_LIST_HEAD(&threads->dead); in machine__threads_init()
68 threads->last_match = NULL; in machine__threads_init()
200 struct threads *threads in machine__delete_threads() local
229 struct threads *threads = &machine->threads[i]; machine__exit() local
452 __threads__get_last_match(struct threads *threads, struct machine *machine, int pid, int tid) __threads__get_last_match() argument
471 threads__get_last_match(struct threads *threads, struct machine *machine, int pid, int tid) threads__get_last_match() argument
483 __threads__set_last_match(struct threads *threads, struct thread *th) __threads__set_last_match() argument
489 threads__set_last_match(struct threads *threads, struct thread *th) threads__set_last_match() argument
499 ____machine__findnew_thread(struct machine *machine, struct threads *threads, pid_t pid, pid_t tid, bool create) ____machine__findnew_thread() argument
571 struct threads *threads = machine__threads(machine, tid); machine__findnew_thread() local
583 struct threads *threads = machine__threads(machine, tid); machine__find_thread() local
949 struct threads *threads = &machine->threads[i]; machine__fprintf() local
1828 struct threads *threads = machine__threads(machine, th->tid); __machine__remove_thread() local
2931 struct threads *threads; machine__for_each_thread() local
[all...]
H A Dthread_map.h26 size_t thread_map__fprintf(struct perf_thread_map *threads, FILE *fp);
28 void thread_map__read_comms(struct perf_thread_map *threads);
29 bool thread_map__has(struct perf_thread_map *threads, pid_t pid);
30 int thread_map__remove(struct perf_thread_map *threads, int idx);
/kernel/linux/linux-5.10/tools/perf/bench/
H A Dsynthesize.c34 OPT_UINTEGER('m', "min-threads", &min_threads,
35 "Minimum number of threads in multithreaded bench"),
36 OPT_UINTEGER('M', "max-threads", &max_threads,
37 "Maximum number of threads in multithreaded bench"),
62 struct perf_thread_map *threads, in do_run_single_threaded()
81 target, threads, in do_run_single_threaded()
116 struct perf_thread_map *threads; in run_single_threaded() local
125 threads = thread_map__new_by_pid(getpid()); in run_single_threaded()
126 if (!threads) { in run_single_threaded()
136 err = do_run_single_threaded(session, threads, in run_single_threaded()
61 do_run_single_threaded(struct perf_session *session, struct perf_thread_map *threads, struct target *target, bool data_mmap) do_run_single_threaded() argument
[all...]
H A Dsched-pipe.c45 OPT_BOOLEAN('T', "threaded", &threaded, "Specify threads/process based task setup"),
79 struct thread_data threads[2], *td; in bench_sched_pipe() local
102 td = threads + t; in bench_sched_pipe()
119 td = threads + t; in bench_sched_pipe()
126 td = threads + t; in bench_sched_pipe()
137 worker_thread(threads + 0); in bench_sched_pipe()
140 worker_thread(threads + 1); in bench_sched_pipe()
153 loops, threaded ? "threads" : "processes"); in bench_sched_pipe()
/kernel/linux/linux-6.6/tools/perf/bench/
H A Dsynthesize.c34 OPT_UINTEGER('m', "min-threads", &min_threads,
35 "Minimum number of threads in multithreaded bench"),
36 OPT_UINTEGER('M', "max-threads", &max_threads,
37 "Maximum number of threads in multithreaded bench"),
62 struct perf_thread_map *threads, in do_run_single_threaded()
81 target, threads, in do_run_single_threaded()
116 struct perf_thread_map *threads; in run_single_threaded() local
125 threads = thread_map__new_by_pid(getpid()); in run_single_threaded()
126 if (!threads) { in run_single_threaded()
136 err = do_run_single_threaded(session, threads, in run_single_threaded()
61 do_run_single_threaded(struct perf_session *session, struct perf_thread_map *threads, struct target *target, bool data_mmap) do_run_single_threaded() argument
[all...]
H A Dsched-pipe.c45 OPT_BOOLEAN('T', "threaded", &threaded, "Specify threads/process based task setup"),
79 struct thread_data threads[2], *td; in bench_sched_pipe() local
102 td = threads + t; in bench_sched_pipe()
119 td = threads + t; in bench_sched_pipe()
126 td = threads + t; in bench_sched_pipe()
137 worker_thread(threads + 0); in bench_sched_pipe()
140 worker_thread(threads + 1); in bench_sched_pipe()
153 loops, threaded ? "threads" : "processes"); in bench_sched_pipe()
/kernel/linux/linux-6.6/tools/testing/selftests/mm/
H A Dmigration.c25 pthread_t *threads; in FIXTURE() local
51 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in FIXTURE_SETUP()
52 ASSERT_NE(self->threads, NULL); in FIXTURE_SETUP()
59 free(self->threads); in FIXTURE_TEARDOWN()
115 * between nodes whilst other threads try and access them triggering the
124 SKIP(return, "Not enough threads or NUMA nodes available");
132 if (pthread_create(&self->threads[i], NULL, access_mem, ptr))
137 ASSERT_EQ(pthread_cancel(self->threads[i]), 0);
150 SKIP(return, "Not enough threads o
[all...]
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/gt/
H A Dselftest_slpc.c483 struct slpc_thread *threads; in live_slpc_tile_interaction() local
486 threads = kcalloc(I915_MAX_GT, sizeof(*threads), GFP_KERNEL); in live_slpc_tile_interaction()
487 if (!threads) in live_slpc_tile_interaction()
491 threads[i].worker = kthread_create_worker(0, "igt/slpc_parallel:%d", gt->info.id); in live_slpc_tile_interaction()
493 if (IS_ERR(threads[i].worker)) { in live_slpc_tile_interaction()
494 ret = PTR_ERR(threads[i].worker); in live_slpc_tile_interaction()
498 threads[i].gt = gt; in live_slpc_tile_interaction()
499 kthread_init_work(&threads[i].work, slpc_spinner_thread); in live_slpc_tile_interaction()
500 kthread_queue_work(threads[ in live_slpc_tile_interaction()
[all...]
/kernel/linux/linux-6.6/tools/lib/perf/
H A Devlist.c71 perf_thread_map__put(evsel->threads); in __perf_evlist__propagate_maps()
72 evsel->threads = perf_thread_map__new_dummy(); in __perf_evlist__propagate_maps()
74 perf_thread_map__put(evsel->threads); in __perf_evlist__propagate_maps()
75 evsel->threads = perf_thread_map__get(evlist->threads); in __perf_evlist__propagate_maps()
155 perf_thread_map__put(evlist->threads); in perf_evlist__exit()
158 evlist->threads = NULL; in perf_evlist__exit()
176 struct perf_thread_map *threads) in perf_evlist__set_maps()
190 if (threads != evlist->threads) { in perf_evlist__set_maps()
174 perf_evlist__set_maps(struct perf_evlist *evlist, struct perf_cpu_map *cpus, struct perf_thread_map *threads) perf_evlist__set_maps() argument
[all...]
/kernel/linux/linux-5.10/tools/perf/tests/
H A Dmmap-basic.c36 struct perf_thread_map *threads; in test__basic_mmap() local
49 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__basic_mmap()
50 if (threads == NULL) { in test__basic_mmap()
76 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__basic_mmap()
93 if (evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap()
162 threads = NULL; in test__basic_mmap()
166 perf_thread_map__put(threads); in test__basic_mmap()
H A Dtask-exit.c55 struct perf_thread_map *threads; in test__task_exit() local
68 * Create maps of threads and cpus to monitor. In this case in test__task_exit()
69 * we start with all threads and cpus (-1, -1) but then in in test__task_exit()
74 threads = thread_map__new_by_tid(-1); in test__task_exit()
75 if (!cpus || !threads) { in test__task_exit()
81 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__task_exit()
84 threads = NULL; in test__task_exit()
154 perf_thread_map__put(threads); in test__task_exit()
H A Dsw-clock.c46 struct perf_thread_map *threads; in __test__sw_clock_freq() local
65 threads = thread_map__new_by_tid(getpid()); in __test__sw_clock_freq()
66 if (!cpus || !threads) { in __test__sw_clock_freq()
72 perf_evlist__set_maps(&evlist->core, cpus, threads); in __test__sw_clock_freq()
75 threads = NULL; in __test__sw_clock_freq()
134 perf_thread_map__put(threads); in __test__sw_clock_freq()
/kernel/linux/linux-5.10/tools/perf/python/
H A Dtwatch.py13 threads = perf.thread_map(thread)
21 """What we want are just the PERF_RECORD_ lifetime events for threads,
25 threads comes and goes... So use (perf.TYPE_SOFTWARE, perf_COUNT_SW_DUMMY,
28 evsel.open(cpus = cpus, threads = threads);
29 evlist = perf.evlist(cpus, threads)
56 to figure out if this is a context switch in or out of the monitored threads.
/kernel/linux/linux-6.6/tools/perf/python/
H A Dtwatch.py13 threads = perf.thread_map(thread)
21 """What we want are just the PERF_RECORD_ lifetime events for threads,
25 threads comes and goes... So use (perf.TYPE_SOFTWARE, perf_COUNT_SW_DUMMY,
28 evsel.open(cpus = cpus, threads = threads);
29 evlist = perf.evlist(cpus, threads)
56 to figure out if this is a context switch in or out of the monitored threads.
/kernel/linux/linux-6.6/tools/perf/util/
H A Dthread_map.h24 size_t thread_map__fprintf(struct perf_thread_map *threads, FILE *fp);
26 void thread_map__read_comms(struct perf_thread_map *threads);
27 bool thread_map__has(struct perf_thread_map *threads, pid_t pid);
28 int thread_map__remove(struct perf_thread_map *threads, int idx);
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/math/
H A Dvsx_preempt.c7 * uses many threads and a long wait. As such, a successful test
27 * worker threads
92 int i, rc, threads; in test_preempt_vsx() local
97 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vsx()
98 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vsx()
102 threads_starting = threads; in test_preempt_vsx()
103 for (i = 0; i < threads; i++) { in test_preempt_vsx()
125 for (i = 0; i < threads; i++) { in test_preempt_vsx()
/kernel/linux/linux-5.10/tools/testing/selftests/sync/
H A Dsync_stress_consumer.c56 int threads; member
112 int n = test_data_mpsc.threads; in mpcs_consumer_thread()
143 /* Release the producer threads */ in mpcs_consumer_thread()
145 "Failure releasing producer threads\n"); in mpcs_consumer_thread()
160 pthread_t threads[n]; in test_consumer_stress_multi_producer_single_consumer() local
169 test_data_mpsc.threads = n; in test_consumer_stress_multi_producer_single_consumer()
174 pthread_create(&threads[i], NULL, (void * (*)(void *)) in test_consumer_stress_multi_producer_single_consumer()
182 pthread_join(threads[i], NULL); in test_consumer_stress_multi_producer_single_consumer()

Completed in 11 milliseconds

12345678910>>...22