Home
last modified time | relevance | path

Searched refs:threads (Results 1 – 25 of 194) sorted by relevance

12345678

/Linux-v4.19/tools/perf/util/
Dthread_map.c57 struct thread_map *threads; in thread_map__new_by_pid() local
68 threads = thread_map__alloc(items); in thread_map__new_by_pid()
69 if (threads != NULL) { in thread_map__new_by_pid()
71 thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid()
72 threads->nr = items; in thread_map__new_by_pid()
73 refcount_set(&threads->refcnt, 1); in thread_map__new_by_pid()
80 return threads; in thread_map__new_by_pid()
85 struct thread_map *threads = thread_map__alloc(1); in thread_map__new_by_tid() local
87 if (threads != NULL) { in thread_map__new_by_tid()
88 thread_map__set_pid(threads, 0, tid); in thread_map__new_by_tid()
[all …]
Dthread_map.h39 size_t thread_map__fprintf(struct thread_map *threads, FILE *fp);
41 static inline int thread_map__nr(struct thread_map *threads) in thread_map__nr() argument
43 return threads ? threads->nr : 1; in thread_map__nr()
62 void thread_map__read_comms(struct thread_map *threads);
63 bool thread_map__has(struct thread_map *threads, pid_t pid);
64 int thread_map__remove(struct thread_map *threads, int idx);
Dmachine.c43 struct threads *threads = &machine->threads[i]; in machine__threads_init() local
44 threads->entries = RB_ROOT; in machine__threads_init()
45 init_rwsem(&threads->lock); in machine__threads_init()
46 threads->nr = 0; in machine__threads_init()
47 INIT_LIST_HEAD(&threads->dead); in machine__threads_init()
48 threads->last_match = NULL; in machine__threads_init()
180 struct threads *threads = &machine->threads[i]; in machine__delete_threads() local
181 down_write(&threads->lock); in machine__delete_threads()
182 nd = rb_first(&threads->entries); in machine__delete_threads()
189 up_write(&threads->lock); in machine__delete_threads()
[all …]
Dvalues.c21 values->threads = 0; in perf_read_values_init()
53 for (i = 0; i < values->threads; i++) in perf_read_values_destroy()
92 for (i = 0; i < values->threads; i++) in perf_read_values__findnew_thread()
96 if (values->threads == values->threads_max) { in perf_read_values__findnew_thread()
102 i = values->threads; in perf_read_values__findnew_thread()
111 values->threads = i + 1; in perf_read_values__findnew_thread()
133 for (i = 0; i < values->threads; i++) { in perf_read_values__enlarge_counters()
216 for (i = 0; i < values->threads; i++) { in perf_read_values__display_pretty()
237 for (i = 0; i < values->threads; i++) { in perf_read_values__display_pretty()
260 for (i = 0; i < values->threads; i++) { in perf_read_values__display_raw()
[all …]
Devlist.c41 struct thread_map *threads) in perf_evlist__init() argument
48 perf_evlist__set_maps(evlist, cpus, threads); in perf_evlist__init()
141 thread_map__put(evlist->threads); in perf_evlist__delete()
143 evlist->threads = NULL; in perf_evlist__delete()
164 thread_map__put(evsel->threads); in __perf_evlist__propagate_maps()
165 evsel->threads = thread_map__get(evlist->threads); in __perf_evlist__propagate_maps()
353 return thread_map__nr(evlist->threads); in perf_evlist__nr_threads()
436 int nr_threads = thread_map__nr(evlist->threads); in perf_evlist__alloc_pollfd()
567 if (!evsel->system_wide && evlist->threads && thread >= 0) in perf_evlist__set_sid_idx()
568 sid->tid = thread_map__pid(evlist->threads, thread); in perf_evlist__set_sid_idx()
[all …]
/Linux-v4.19/tools/perf/tests/
Dthread-map.c59 struct thread_map *threads; in process_event() local
65 threads = thread_map__new_event(&event->thread_map); in process_event()
66 TEST_ASSERT_VAL("failed to alloc map", threads); in process_event()
68 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event()
70 thread_map__pid(threads, 0) == getpid()); in process_event()
72 thread_map__comm(threads, 0) && in process_event()
73 !strcmp(thread_map__comm(threads, 0), NAME)); in process_event()
75 refcount_read(&threads->refcnt) == 1); in process_event()
76 thread_map__put(threads); in process_event()
82 struct thread_map *threads; in test__thread_map_synthesize() local
[all …]
Devent-times.c60 struct thread_map *threads; in attach__current_disabled() local
65 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_disabled()
66 if (threads == NULL) { in attach__current_disabled()
73 err = perf_evsel__open_per_thread(evsel, threads); in attach__current_disabled()
79 thread_map__put(threads); in attach__current_disabled()
86 struct thread_map *threads; in attach__current_enabled() local
91 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_enabled()
92 if (threads == NULL) { in attach__current_enabled()
97 err = perf_evsel__open_per_thread(evsel, threads); in attach__current_enabled()
99 thread_map__put(threads); in attach__current_enabled()
Dtask-exit.c49 struct thread_map *threads; in test__task_exit() local
67 threads = thread_map__new_by_tid(-1); in test__task_exit()
68 if (!cpus || !threads) { in test__task_exit()
74 perf_evlist__set_maps(evlist, cpus, threads); in test__task_exit()
77 threads = NULL; in test__task_exit()
139 thread_map__put(threads); in test__task_exit()
Dsw-clock.c41 struct thread_map *threads; in __test__sw_clock_freq() local
60 threads = thread_map__new_by_tid(getpid()); in __test__sw_clock_freq()
61 if (!cpus || !threads) { in __test__sw_clock_freq()
67 perf_evlist__set_maps(evlist, cpus, threads); in __test__sw_clock_freq()
70 threads = NULL; in __test__sw_clock_freq()
129 thread_map__put(threads); in __test__sw_clock_freq()
Dmmap-basic.c30 struct thread_map *threads; in test__basic_mmap() local
43 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__basic_mmap()
44 if (threads == NULL) { in test__basic_mmap()
70 perf_evlist__set_maps(evlist, cpus, threads); in test__basic_mmap()
87 if (perf_evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap()
156 threads = NULL; in test__basic_mmap()
160 thread_map__put(threads); in test__basic_mmap()
Dopenat-syscall.c19 struct thread_map *threads = thread_map__new(-1, getpid(), UINT_MAX); in test__openat_syscall_event() local
23 if (threads == NULL) { in test__openat_syscall_event()
35 if (perf_evsel__open_per_thread(evsel, threads) < 0) { in test__openat_syscall_event()
64 thread_map__put(threads); in test__openat_syscall_event()
Dmmap-thread-lookup.c29 static struct thread_data threads[THREADS]; variable
78 struct thread_data *td = &threads[i]; in thread_create()
98 struct thread_data *td0 = &threads[0]; in threads_create()
115 struct thread_data *td0 = &threads[0]; in threads_destroy()
124 err = pthread_join(threads[i].pt, NULL); in threads_destroy()
183 struct thread_data *td = &threads[i]; in mmap_events()
Dkeep-tracking.c68 struct thread_map *threads = NULL; in test__keep_tracking() local
75 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__keep_tracking()
76 CHECK_NOT_NULL__(threads); in test__keep_tracking()
84 perf_evlist__set_maps(evlist, cpus, threads); in test__keep_tracking()
153 thread_map__put(threads); in test__keep_tracking()
/Linux-v4.19/tools/testing/selftests/powerpc/math/
Dvmx_signal.c99 int i, j, rc, threads; in test_signal_vmx() local
103 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_vmx()
104 tids = malloc(threads * sizeof(pthread_t)); in test_signal_vmx()
108 threads_starting = threads; in test_signal_vmx()
109 for (i = 0; i < threads; i++) { in test_signal_vmx()
115 printf("\tWaiting for %d workers to start... %d", threads, threads_starting); in test_signal_vmx()
125 for (j = 0; j < threads; j++) { in test_signal_vmx()
134 for (i = 0; i < threads; i++) { in test_signal_vmx()
Dfpu_preempt.c61 int i, rc, threads; in test_preempt_fpu() local
64 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_fpu()
65 tids = malloc((threads) * sizeof(pthread_t)); in test_preempt_fpu()
69 threads_starting = threads; in test_preempt_fpu()
70 for (i = 0; i < threads; i++) { in test_preempt_fpu()
92 for (i = 0; i < threads; i++) { in test_preempt_fpu()
Dfpu_signal.c81 int i, j, rc, threads; in test_signal_fpu() local
85 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_fpu()
86 tids = malloc(threads * sizeof(pthread_t)); in test_signal_fpu()
90 threads_starting = threads; in test_signal_fpu()
91 for (i = 0; i < threads; i++) { in test_signal_fpu()
104 for (j = 0; j < threads; j++) { in test_signal_fpu()
113 for (i = 0; i < threads; i++) { in test_signal_fpu()
Dvmx_preempt.c61 int i, rc, threads; in test_preempt_vmx() local
64 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vmx()
65 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vmx()
69 threads_starting = threads; in test_preempt_vmx()
70 for (i = 0; i < threads; i++) { in test_preempt_vmx()
92 for (i = 0; i < threads; i++) { in test_preempt_vmx()
Dvsx_preempt.c96 int i, rc, threads; in test_preempt_vsx() local
99 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vsx()
100 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vsx()
104 threads_starting = threads; in test_preempt_vsx()
105 for (i = 0; i < threads; i++) { in test_preempt_vsx()
127 for (i = 0; i < threads; i++) { in test_preempt_vsx()
/Linux-v4.19/tools/testing/selftests/powerpc/tm/
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()
/Linux-v4.19/tools/testing/radix-tree/
Diteration_check.c25 static pthread_t threads[NUM_THREADS]; variable
189 if (pthread_create(&threads[0], NULL, tagged_iteration_fn, NULL)) { in iteration_test()
193 if (pthread_create(&threads[1], NULL, untagged_iteration_fn, NULL)) { in iteration_test()
197 if (pthread_create(&threads[2], NULL, add_entries_fn, NULL)) { in iteration_test()
201 if (pthread_create(&threads[3], NULL, remove_entries_fn, NULL)) { in iteration_test()
205 if (pthread_create(&threads[4], NULL, tag_entries_fn, NULL)) { in iteration_test()
214 if (pthread_join(threads[i], NULL)) { in iteration_test()
/Linux-v4.19/Documentation/x86/
Dtopology.txt21 threads, cores, packages, etc.
34 - threads
78 A core consists of 1 or more threads. It does not matter whether the threads
79 are SMT- or CMT-type threads.
88 The number of threads in a core. The number of threads in a package can be
99 AMDs nomenclature for CMT threads is "Compute Unit Core". The kernel always
106 The cpumask contains all online threads in the package to which a thread
109 The number of online threads is also printed in /proc/cpuinfo "siblings."
113 The cpumask contains all online threads in the core to which a thread
136 threads. Many BIOSes enumerate all threads 0 first and then all threads 1.
[all …]
/Linux-v4.19/tools/perf/bench/
Dsched-pipe.c82 struct thread_data threads[2], *td; in bench_sched_pipe() local
105 td = threads + t; in bench_sched_pipe()
122 td = threads + t; in bench_sched_pipe()
129 td = threads + t; in bench_sched_pipe()
140 worker_thread(threads + 0); in bench_sched_pipe()
143 worker_thread(threads + 1); in bench_sched_pipe()
/Linux-v4.19/tools/testing/selftests/sync/
Dsync_stress_consumer.c56 int threads; member
112 int n = test_data_mpsc.threads; 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()
/Linux-v4.19/tools/perf/python/
Dtwatch.py20 threads = perf.thread_map(thread)
35 evsel.open(cpus = cpus, threads = threads);
36 evlist = perf.evlist(cpus, threads)
/Linux-v4.19/drivers/firmware/
Dpsci_checker.c385 struct task_struct **threads; in suspend_tests() local
388 threads = kmalloc_array(nb_available_cpus, sizeof(*threads), in suspend_tests()
390 if (!threads) in suspend_tests()
420 threads[nb_threads++] = thread; in suspend_tests()
436 wake_up_process(threads[i]); in suspend_tests()
444 err += kthread_stop(threads[i]); in suspend_tests()
447 kfree(threads); in suspend_tests()

12345678