/Linux-v5.10/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 …]
|
/Linux-v5.10/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 | mmap-thread-lookup.c | 21 #define THREADS 4 macro 32 static struct thread_data threads[THREADS]; variable 81 struct thread_data *td = &threads[i]; in thread_create() 101 struct thread_data *td0 = &threads[0]; in threads_create() 110 for (i = 1; !err && i < THREADS; i++) in threads_create() 118 struct thread_data *td0 = &threads[0]; in threads_destroy() 126 for (i = 1; !err && i < THREADS; i++) in threads_destroy() 127 err = pthread_join(threads[i].pt, NULL); in threads_destroy() 162 * The threads_create will not return before all threads in mmap_events() 168 TEST_ASSERT_VAL("failed to create threads", !threads_create()); in mmap_events() [all …]
|
/Linux-v5.10/tools/lib/perf/ |
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 | 56 perf_thread_map__put(evsel->threads); in __perf_evlist__propagate_maps() 57 evsel->threads = perf_thread_map__get(evlist->threads); in __perf_evlist__propagate_maps() 130 perf_thread_map__put(evlist->threads); in perf_evlist__exit() 133 evlist->threads = NULL; in perf_evlist__exit() 151 struct perf_thread_map *threads) in perf_evlist__set_maps() argument 165 if (threads != evlist->threads) { in perf_evlist__set_maps() 166 perf_thread_map__put(evlist->threads); in perf_evlist__set_maps() 167 evlist->threads = perf_thread_map__get(threads); in perf_evlist__set_maps() 182 err = perf_evsel__open(evsel, evsel->cpus, evsel->threads); in perf_evlist__open() 292 int nr_threads = perf_thread_map__nr(evlist->threads); in perf_evlist__alloc_pollfd() [all …]
|
/Linux-v5.10/tools/lib/perf/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 | 85 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", threads); in test_stat_thread_enable() 154 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.10/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.10/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 102 Threads chapter 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 [all …]
|
/Linux-v5.10/Documentation/power/ |
D | freezing-of-tasks.rst | 11 kernel threads are controlled during hibernation or system-wide suspend (on some 19 PF_NOFREEZE unset (all user space processes and some kernel threads) are 29 fake signal to all user space processes, and wakes up all the kernel threads. 37 frozen before kernel threads. 44 signal-handling code, but the freezable kernel threads need to call it 64 threads must call try_to_freeze() somewhere or use one of the 80 - freezes all tasks (including kernel threads) because we can't freeze 81 kernel threads without freezing userspace tasks 84 - thaws only kernel threads; this is particularly useful if we need to do 85 anything special in between thawing of kernel threads and thawing of [all …]
|
/Linux-v5.10/include/uapi/linux/ |
D | membarrier.h | 34 * @MEMBARRIER_CMD_GLOBAL: Execute a memory barrier on all running threads. 36 * is ensured that all running threads have passed 40 * (non-running threads are de facto in such a 41 * state). This covers threads from all processes 44 * Execute a memory barrier on all running threads 48 * is ensured that all running threads have passed 52 * (non-running threads are de facto in such a 53 * state). This only covers threads from processes 70 * threads siblings have passed through a state 74 * (non-running threads are de facto in such a [all …]
|
/Linux-v5.10/tools/testing/selftests/powerpc/dscr/ |
D | dscr_default_test.c | 6 * it's sysfs interface and then verifies that all threads 16 static unsigned long result[THREADS]; 62 pthread_t threads[THREADS]; in dscr_default() local 63 unsigned long i, *status[THREADS]; in dscr_default() 74 /* Spawn all testing threads */ in dscr_default() 75 for (i = 0; i < THREADS; i++) { in dscr_default() 76 if (pthread_create(&threads[i], NULL, do_test, (void *)i)) { in dscr_default() 104 for (i = 0; i < THREADS; i++) { in dscr_default() 105 if (pthread_join(threads[i], (void **)&(status[i]))) { in dscr_default()
|
/Linux-v5.10/arch/powerpc/kvm/ |
D | book3s_hv_ras.c | 194 * - On TB error, HMI interrupt is reported on all the threads of the core 203 * All threads need to co-ordinate before making opal hmi handler. 204 * All threads will use sibling_subcore_state->in_guest[] (shared by all 205 * threads in the core) in paca which holds information about whether 208 * subcore status. Only primary threads from each subcore is responsible 215 * primary threads to decide who takes up the responsibility. 222 * - All other threads which are in host will call 227 * - Once all primary threads clear in_guest[0-3], all of them will invoke 229 * - Now all threads will wait for TB resync to complete by invoking 233 * - All other threads will now come out of resync wait loop and proceed [all …]
|
/Linux-v5.10/tools/perf/bench/ |
D | synthesize.c | 34 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() argument 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, &target, false); in run_single_threaded() [all …]
|
D | futex-wake-parallel.c | 5 * Block a bunch of threads and let parallel waker threads wakeup an 47 /* all threads will block on the same futex -- hash bucket chaos ;) */ 61 OPT_UINTEGER('t', "threads", &nblocked_threads, "Specify amount of threads"), 62 OPT_UINTEGER('w', "nwakers", &nwaking_threads, "Specify amount of waking threads"), 102 /* create and block all threads */ in wakeup_threads() 149 /* create and block all threads */ in block_threads() 180 printf("[Run %d]: Avg per-thread latency (waking %d/%d threads) " in print_run() 195 printf("Avg per-thread latency (waking %d/%d threads) in %.4f ms (+-%.2f%%)\n", in print_summary() 268 printf("Run summary [PID %d]: blocking on %d threads (at [%s] " in bench_futex_wake_parallel() 269 "futex %p), %d threads waking up %d at a time.\n\n", in bench_futex_wake_parallel() [all …]
|
D | futex-wake.c | 5 * futex-wake: Block a bunch of threads on a futex and wake'em up, N at a time. 32 /* all threads will block on the same futex */ 50 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 51 OPT_UINTEGER('w', "nwakes", &nwakes, "Specify amount of threads to wake at once"), 86 printf("Wokeup %d of %d threads in %.4f ms (+-%.2f%%)\n", in print_summary() 101 /* create and block all threads */ in block_threads() 154 printf("Run summary [PID %d]: blocking on %d threads (at [%s] futex %p), " in bench_futex_wake() 169 /* create, launch & block all threads */ in bench_futex_wake() 172 /* make sure all threads are already blocked */ in bench_futex_wake() 181 /* Ok, all threads are patiently blocked, start waking folks up */ in bench_futex_wake() [all …]
|
D | futex-requeue.c | 5 * futex-requeue: Block a bunch of threads on futex1 and requeue them 49 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 50 OPT_UINTEGER('q', "nrequeue", &nrequeue, "Specify amount of threads to requeue at once"), 67 printf("Requeued %d of %d threads in %.4f ms (+-%.2f%%)\n", in print_summary() 95 /* create and block all threads */ in block_threads() 149 printf("Run summary [PID %d]: Requeuing %d threads (from [%s] %p to %p), " in bench_futex_requeue() 164 /* create, launch & block all threads */ in bench_futex_requeue() 167 /* make sure all threads are already blocked */ in bench_futex_requeue() 176 /* Ok, all threads are patiently blocked, start requeueing */ in bench_futex_requeue() 194 printf("[Run %d]: Requeued %d of %d threads in %.4f ms\n", in bench_futex_requeue()
|
/Linux-v5.10/samples/pktgen/ |
D | pktgen_sample06_numa_awared_queue_irq_affinity.sh | 3 # Multiqueue: Using pktgen threads for sending on multiple CPUs 4 # * adding devices to kernel threads which are in the same NUMA node 5 # * bound devices queue's irq affinity to the threads, 1:1 mapping 30 [ $THREADS -gt ${#irq_array[*]} -o $THREADS -gt ${#cpu_array[*]} ] && \ 31 err 1 "Thread number $THREADS exceeds: min (${#irq_array[*]},${#cpu_array[*]})" 50 # Threads are specified with parameter -t value in $THREADS 51 for ((i = 0; i < $THREADS; i++)); do 108 for ((i = 0; i < $THREADS; i++)); do
|
D | parameters.sh | 14 echo " -t : (\$THREADS) threads to start" 54 export THREADS=$OPTARG 55 info "Number of threads to start: $THREADS" 99 if [ -z "$THREADS" ]; then 100 export THREADS=1 103 export L_THREAD=$(( THREADS + F_THREAD - 1 ))
|
/Linux-v5.10/tools/testing/selftests/powerpc/math/ |
D | fpu_signal.c | 26 * 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()
|
D | fpu_preempt.c | 8 * no way to be sure preemption happened so this test just uses many threads 28 * worker threads 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()
|
/Linux-v5.10/tools/lib/perf/Documentation/examples/ |
D | counting.c | 23 struct perf_thread_map *threads; in main() local 40 threads = perf_thread_map__new_dummy(); in main() 41 if (!threads) { in main() 42 fprintf(stderr, "failed to create threads\n"); in main() 45 perf_thread_map__set_pid(threads, 0, 0); in main() 63 perf_evlist__set_maps(evlist, NULL, threads); in main() 81 perf_thread_map__put(threads); in main()
|
/Linux-v5.10/arch/powerpc/include/asm/ |
D | cputhreads.h | 10 * Mapping of threads to cores 13 * threads per core and the same number for each core in the system 14 * (though it would work if some processors had less threads as long 38 * @threads: a cpumask of online threads 46 static inline cpumask_t cpu_thread_mask_to_cores(const struct cpumask *threads) in cpu_thread_mask_to_cores() argument 54 if (cpumask_intersects(threads, &tmp)) { in cpu_thread_mask_to_cores()
|
/Linux-v5.10/tools/perf/python/ |
D | twatch.py | 13 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.
|