/Linux-v5.4/tools/perf/util/ |
D | thread_map.c | 35 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, 0, tid); in thread_map__new_by_tid() [all …]
|
D | machine.c | 57 struct threads *threads = &machine->threads[i]; in machine__threads_init() local 58 threads->entries = RB_ROOT_CACHED; in machine__threads_init() 59 init_rwsem(&threads->lock); in machine__threads_init() 60 threads->nr = 0; in machine__threads_init() 61 INIT_LIST_HEAD(&threads->dead); in machine__threads_init() 62 threads->last_match = NULL; in machine__threads_init() 194 struct threads *threads = &machine->threads[i]; in machine__delete_threads() local 195 down_write(&threads->lock); in machine__delete_threads() 196 nd = rb_first_cached(&threads->entries); in machine__delete_threads() 203 up_write(&threads->lock); in machine__delete_threads() [all …]
|
D | thread_map.h | 26 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);
|
D | values.c | 22 values->threads = 0; in perf_read_values_init() 54 for (i = 0; i < values->threads; i++) in perf_read_values_destroy() 93 for (i = 0; i < values->threads; i++) in perf_read_values__findnew_thread() 97 if (values->threads == values->threads_max) { in perf_read_values__findnew_thread() 103 i = values->threads; in perf_read_values__findnew_thread() 112 values->threads = i + 1; in perf_read_values__findnew_thread() 134 for (i = 0; i < values->threads; i++) { in perf_read_values__enlarge_counters() 217 for (i = 0; i < values->threads; i++) { in perf_read_values__display_pretty() 238 for (i = 0; i < values->threads; i++) { in perf_read_values__display_pretty() 261 for (i = 0; i < values->threads; i++) { in perf_read_values__display_raw() [all …]
|
/Linux-v5.4/tools/perf/tests/ |
D | thread-map.c | 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 [all …]
|
D | event-times.c | 62 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 = perf_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 = perf_evsel__open_per_thread(evsel, threads); in attach__current_enabled() 101 perf_thread_map__put(threads); in attach__current_enabled()
|
D | sw-clock.c | 45 struct perf_thread_map *threads; in __test__sw_clock_freq() local 64 threads = thread_map__new_by_tid(getpid()); in __test__sw_clock_freq() 65 if (!cpus || !threads) { in __test__sw_clock_freq() 71 perf_evlist__set_maps(&evlist->core, cpus, threads); in __test__sw_clock_freq() 74 threads = NULL; in __test__sw_clock_freq() 133 perf_thread_map__put(threads); in __test__sw_clock_freq()
|
D | task-exit.c | 54 struct perf_thread_map *threads; in test__task_exit() local 72 threads = thread_map__new_by_tid(-1); in test__task_exit() 73 if (!cpus || !threads) { in test__task_exit() 79 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__task_exit() 82 threads = NULL; in test__task_exit() 144 perf_thread_map__put(threads); in test__task_exit()
|
D | mmap-basic.c | 35 struct perf_thread_map *threads; in test__basic_mmap() local 48 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__basic_mmap() 49 if (threads == NULL) { in test__basic_mmap() 75 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__basic_mmap() 92 if (evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap() 161 threads = NULL; in test__basic_mmap() 165 perf_thread_map__put(threads); in test__basic_mmap()
|
/Linux-v5.4/tools/perf/lib/ |
D | threadmap.c | 47 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->nr; i++) in perf_thread_map__delete() [all …]
|
D | evlist.c | 47 perf_thread_map__put(evsel->threads); in __perf_evlist__propagate_maps() 48 evsel->threads = perf_thread_map__get(evlist->threads); in __perf_evlist__propagate_maps() 111 struct perf_thread_map *threads) in perf_evlist__set_maps() argument 125 if (threads != evlist->threads) { in perf_evlist__set_maps() 126 perf_thread_map__put(evlist->threads); in perf_evlist__set_maps() 127 evlist->threads = perf_thread_map__get(threads); in perf_evlist__set_maps() 139 err = perf_evsel__open(evsel, evsel->cpus, evsel->threads); in perf_evlist__open() 249 int nr_threads = perf_thread_map__nr(evlist->threads); in perf_evlist__alloc_pollfd()
|
/Linux-v5.4/tools/perf/lib/tests/ |
D | test-evsel.c | 52 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", threads); in test_stat_thread_enable() 96 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread_enable() [all …]
|
D | test-evlist.c | 74 struct perf_thread_map *threads; in test_stat_thread() local 87 threads = perf_thread_map__new_dummy(); in test_stat_thread() 88 __T("failed to create threads", threads); in test_stat_thread() 90 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread() 105 perf_evlist__set_maps(evlist, NULL, threads); in test_stat_thread() 118 perf_thread_map__put(threads); in test_stat_thread() 125 struct perf_thread_map *threads; in test_stat_thread_enable() local 140 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable() 141 __T("failed to create threads", threads); in test_stat_thread_enable() 143 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread_enable() [all …]
|
D | test-threadmap.c | 15 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()
|
/Linux-v5.4/tools/testing/selftests/powerpc/math/ |
D | vmx_signal.c | 95 int i, j, rc, threads; in test_signal_vmx() local 99 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_vmx() 100 tids = malloc(threads * sizeof(pthread_t)); in test_signal_vmx() 104 threads_starting = threads; in test_signal_vmx() 105 for (i = 0; i < threads; i++) { in test_signal_vmx() 111 printf("\tWaiting for %d workers to start... %d", threads, threads_starting); in test_signal_vmx() 121 for (j = 0; j < threads; j++) { in test_signal_vmx() 130 for (i = 0; i < threads; i++) { in test_signal_vmx()
|
D | fpu_preempt.c | 57 int i, rc, threads; in test_preempt_fpu() local 60 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_fpu() 61 tids = malloc((threads) * sizeof(pthread_t)); in test_preempt_fpu() 65 threads_starting = threads; in test_preempt_fpu() 66 for (i = 0; i < threads; i++) { in test_preempt_fpu() 88 for (i = 0; i < threads; i++) { in test_preempt_fpu()
|
D | fpu_signal.c | 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() 100 for (j = 0; j < threads; j++) { in test_signal_fpu() 109 for (i = 0; i < threads; i++) { in test_signal_fpu()
|
D | vmx_preempt.c | 57 int i, rc, threads; in test_preempt_vmx() local 60 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vmx() 61 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vmx() 65 threads_starting = threads; in test_preempt_vmx() 66 for (i = 0; i < threads; i++) { in test_preempt_vmx() 88 for (i = 0; i < threads; i++) { in test_preempt_vmx()
|
D | vsx_preempt.c | 92 int i, rc, threads; in test_preempt_vsx() local 95 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vsx() 96 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vsx() 100 threads_starting = threads; in test_preempt_vsx() 101 for (i = 0; i < threads; i++) { in test_preempt_vsx() 123 for (i = 0; i < threads; i++) { in test_preempt_vsx()
|
/Linux-v5.4/tools/testing/selftests/powerpc/tm/ |
D | tm-vmx-unavail.c | 91 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-v5.4/Documentation/driver-api/dmaengine/ |
D | dmatest.rst | 63 (shared) parameters used for all threads will use the new values. 64 After the channels are specified, each thread is set as pending. All threads 72 Once started a message like " dmatest: Added 1 threads using dma0chan0" is 160 dmatest: Added 1 threads using dma0chan2 168 dmatest: Added 1 threads using dma0chan1 170 dmatest: Added 1 threads using dma0chan2 180 dmatest: Added 1 threads using dma0chan0 181 dmatest: Added 1 threads using dma0chan3 182 dmatest: Added 1 threads using dma0chan4 183 dmatest: Added 1 threads using dma0chan5 [all …]
|
/Linux-v5.4/tools/testing/radix-tree/ |
D | iteration_check.c | 15 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()
|
/Linux-v5.4/Documentation/x86/ |
D | topology.rst | 24 threads, cores, packages, etc. 37 - threads 86 A core consists of 1 or more threads. It does not matter whether the threads 87 are SMT- or CMT-type threads. 96 The number of threads in a core. The number of threads in a package can be 107 AMDs nomenclature for CMT threads is "Compute Unit Core". The kernel always 114 The cpumask contains all online threads in the package to which a thread 117 The number of online threads is also printed in /proc/cpuinfo "siblings." 121 The cpumask contains all online threads in the core to which a thread 144 threads. Many BIOSes enumerate all threads 0 first and then all threads 1. [all …]
|
/Linux-v5.4/tools/testing/selftests/sync/ |
D | sync_stress_consumer.c | 56 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-v5.4/tools/perf/bench/ |
D | sched-pipe.c | 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()
|