| /tools/perf/bench/ |
| D | futex-requeue.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 77 params.nthreads, in print_summary() 131 threads_starting = params.nthreads; in block_threads() 138 for (i = 0; i < params.nthreads; i++) { in block_threads() 191 if (!params.nthreads) in bench_futex_requeue() 192 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_requeue() 194 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue() 201 if (params.nrequeue > params.nthreads) in bench_futex_requeue() 202 params.nrequeue = params.nthreads; in bench_futex_requeue() 205 params.nrequeue = params.nthreads; in bench_futex_requeue() [all …]
|
| D | futex-wake.c | 53 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 93 params.nthreads, in print_summary() 104 threads_starting = params.nthreads; in block_threads() 111 for (i = 0; i < params.nthreads; i++) { in block_threads() 166 if (!params.nthreads) in bench_futex_wake() 167 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake() 169 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 178 getpid(), params.nthreads, params.fshared ? "shared":"private", in bench_futex_wake() 205 while (nwoken != params.nthreads) in bench_futex_wake() 216 j + 1, nwoken, params.nthreads, in bench_futex_wake() [all …]
|
| D | breakpoint.c | 22 unsigned int nthreads; member 26 .nthreads = 1, 33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"), 91 threads = calloc(thread_params.nthreads, sizeof(threads[0])); in breakpoint_thread() 97 for (i = 0; i < thread_params.nthreads; i++) { in breakpoint_thread() 102 futex_wake(&done, thread_params.nthreads, 0); in breakpoint_thread() 103 for (i = 0; i < thread_params.nthreads; i++) in breakpoint_thread() 161 (double)result_usec / bench_repeat / thread_params.nthreads); in bench_breakpoint_thread() 164 thread_params.nthreads * thread_params.nparallel); in bench_breakpoint_thread() 200 unsigned int i, nthreads, result_usec, done = 0; in bench_breakpoint_enable() local [all …]
|
| D | futex-wake-parallel.c | 63 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 threads_starting = params.nthreads; in block_threads() 162 for (i = 0; i < params.nthreads; i++) { in block_threads() 203 params.nthreads, waketime_avg / USEC_PER_MSEC, in print_run() 218 params.nthreads, in print_summary() 271 if (!params.nthreads) in bench_futex_wake_parallel() 272 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_wake_parallel() 275 if (params.nwakes > params.nthreads || in bench_futex_wake_parallel() 277 params.nwakes = params.nthreads; in bench_futex_wake_parallel() 279 if (params.nthreads % params.nwakes) in bench_futex_wake_parallel() [all …]
|
| D | futex-lock-pi.c | 48 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 128 threads_starting = params.nthreads; in create_threads() 134 for (i = 0; i < params.nthreads; i++) { in create_threads() 189 if (!params.nthreads) in bench_futex_lock_pi() 190 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_lock_pi() 192 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() 200 getpid(), params.nthreads, params.runtime); in bench_futex_lock_pi() 207 threads_starting = params.nthreads; in bench_futex_lock_pi() 221 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi() 232 for (i = 0; i < params.nthreads; i++) { in bench_futex_lock_pi()
|
| D | futex-hash.c | 56 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"), 155 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash() 156 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_hash() 158 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 166 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash() 173 threads_starting = params.nthreads; in bench_futex_hash() 182 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 216 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash() 227 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
|
| D | epoll-ctl.c | 36 static unsigned int nthreads = 0; variable 75 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 240 for (i = 0; i < nthreads; i++) { in do_threads() 349 if (!nthreads) in bench_epoll_ctl() 350 nthreads = perf_cpu_map__nr(cpu); in bench_epoll_ctl() 352 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() 358 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl() 366 getpid(), nthreads, nfds, nsecs); in bench_epoll_ctl() 375 threads_starting = nthreads; in bench_epoll_ctl() 391 for (i = 0; i < nthreads; i++) { in bench_epoll_ctl() [all …]
|
| D | epoll-wait.c | 91 static unsigned int nthreads = 0; variable 128 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 317 for (i = 0; i < nthreads; i++) { in do_threads() 394 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn() 397 for (i = 0; i < nthreads; i++) { in writerfn() 473 if (!nthreads) in bench_epoll_wait() 474 nthreads = perf_cpu_map__nr(cpu) - 1; in bench_epoll_wait() 476 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait() 483 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait() 491 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait() [all …]
|
| D | futex.h | 24 unsigned int nthreads; member
|
| /tools/testing/selftests/mm/ |
| D | migration.c | 27 int nthreads; in FIXTURE() local 37 self->nthreads = numa_num_task_cpus() - 1; in FIXTURE_SETUP() 51 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in FIXTURE_SETUP() 53 self->pids = malloc(self->nthreads * sizeof(*self->pids)); in FIXTURE_SETUP() 128 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0) 136 for (i = 0; i < self->nthreads - 1; i++) 141 for (i = 0; i < self->nthreads - 1; i++) 154 if (self->nthreads < 2 || self->n1 < 0 || self->n2 < 0) 162 for (i = 0; i < self->nthreads - 1; i++) { 176 for (i = 0; i < self->nthreads - 1; i++) [all …]
|
| D | gup_test.c | 95 int filed, i, opt, nr_pages = 1, thp = -1, write = 1, nthreads = 1, ret; in main() local 132 nthreads = atoi(optarg); in main() 205 ksft_set_plan(nthreads); in main() 258 tid = malloc(sizeof(pthread_t) * nthreads); in main() 260 for (i = 0; i < nthreads; i++) { in main() 264 for (i = 0; i < nthreads; i++) { in main()
|
| D | pagemap_ioctl.c | 1304 static const unsigned int nthreads = 6, pages_per_thread = 32, access_per_thread = 8; variable 1391 if (pthread_barrier_init(&start_barrier, NULL, nthreads + 1)) in transact_test() 1394 if (pthread_barrier_init(&end_barrier, NULL, nthreads + 1)) in transact_test() 1397 mem = mmap(NULL, 0x1000 * nthreads * pages_per_thread, PROT_READ | PROT_WRITE, in transact_test() 1402 wp_init(mem, 0x1000 * nthreads * pages_per_thread); in transact_test() 1403 wp_addr_range(mem, 0x1000 * nthreads * pages_per_thread); in transact_test() 1405 memset(mem, 0, 0x1000 * nthreads * pages_per_thread); in transact_test() 1407 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test() 1409 count = get_dirty_pages_reset(mem, nthreads * pages_per_thread, 1, page_size); in transact_test() 1413 for (i = 0; i < nthreads; ++i) in transact_test() [all …]
|
| /tools/perf/util/ |
| D | counts.c | 10 struct perf_counts *perf_counts__new(int ncpus, int nthreads) in perf_counts__new() argument 17 values = xyarray__new(ncpus, nthreads, sizeof(struct perf_counts_values)); in perf_counts__new() 25 values = xyarray__new(ncpus, nthreads, sizeof(bool)); in perf_counts__new() 61 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_counts() local 63 evsel->counts = perf_counts__new(perf_cpu_map__nr(cpus), nthreads); in evsel__alloc_counts()
|
| D | counts.h | 37 struct perf_counts *perf_counts__new(int ncpus, int nthreads);
|
| D | stat.c | 157 int nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__alloc_prev_raw_counts() local 160 counts = perf_counts__new(cpu_map_nr, nthreads); in evsel__alloc_prev_raw_counts() 249 int idx, nthreads = perf_thread_map__nr(evsel->core.threads); in evsel__copy_prev_raw_counts() local 251 for (int thread = 0; thread < nthreads; thread++) { in evsel__copy_prev_raw_counts() 464 int nthreads = perf_thread_map__nr(counter->core.threads); in process_counter_maps() local 468 for (thread = 0; thread < nthreads; thread++) { in process_counter_maps()
|
| D | evsel.c | 2056 int nthreads = perf_thread_map__nr(threads); in __evsel__prepare_open() local 2083 perf_evsel__alloc_fd(&evsel->core, perf_cpu_map__nr(cpus), nthreads) < 0) in __evsel__prepare_open() 2089 evsel->start_times = xyarray__new(perf_cpu_map__nr(cpus), nthreads, sizeof(__u64)); in __evsel__prepare_open() 2272 int idx, thread, nthreads; in evsel__open_cpu() local 2296 nthreads = perf_thread_map__nr(threads); in evsel__open_cpu() 2309 for (thread = 0; thread < nthreads; thread++) { in evsel__open_cpu() 2312 if (thread >= nthreads) in evsel__open_cpu() 2435 nthreads--; in evsel__open_cpu() 2464 thread = nthreads; in evsel__open_cpu()
|
| /tools/lib/perf/include/internal/ |
| D | evsel.h | 82 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads); 88 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);
|
| /tools/lib/perf/ |
| D | evsel.c | 52 int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_fd() argument 54 evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int)); in perf_evsel__alloc_fd() 60 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd() 72 static int perf_evsel__alloc_mmap(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_mmap() argument 74 evsel->mmap = xyarray__new(ncpus, nthreads, sizeof(struct perf_mmap)); in perf_evsel__alloc_mmap() 513 int perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads) in perf_evsel__alloc_id() argument 515 if (ncpus == 0 || nthreads == 0) in perf_evsel__alloc_id() 518 evsel->sample_id = xyarray__new(ncpus, nthreads, sizeof(struct perf_sample_id)); in perf_evsel__alloc_id() 522 evsel->id = zalloc(ncpus * nthreads * sizeof(u64)); in perf_evsel__alloc_id()
|
| /tools/testing/selftests/filesystems/binderfs/ |
| D | binderfs_test.c | 413 int i, j, k, nthreads; in TEST() local 463 nthreads = get_nprocs_conf(); in TEST() 464 if (nthreads > DEFAULT_THREADS) in TEST() 465 nthreads = DEFAULT_THREADS; in TEST() 470 for (i = 0; i < nthreads; i++) { in TEST()
|
| /tools/testing/selftests/mount_setattr/ |
| D | mount_setattr_test.c | 905 int i, j, nthreads, ret = 0; in TEST_F() local 917 nthreads = get_nprocs_conf(); in TEST_F() 918 if (nthreads > DEFAULT_THREADS) in TEST_F() 919 nthreads = DEFAULT_THREADS; in TEST_F() 922 for (i = 0; i < nthreads; i++) in TEST_F()
|
| /tools/perf/ |
| D | builtin-stat.c | 321 int nthreads = perf_thread_map__nr(evsel_list->core.threads); in read_counter_cpu() local 327 for (thread = 0; thread < nthreads; thread++) { in read_counter_cpu()
|
| D | builtin-script.c | 2389 int nthreads = perf_thread_map__nr(counter->core.threads); in __process_stat() local 2400 for (thread = 0; thread < nthreads; thread++) { in __process_stat()
|