Lines Matching refs:params
51 static struct bench_futex_parameters params = { variable
58 OPT_INTEGER( 'b', "buckets", ¶ms.nbuckets, "Specify amount of hash buckets"),
59 OPT_UINTEGER('t', "threads", ¶ms.nthreads, "Specify amount of threads"),
60 OPT_UINTEGER('r', "runtime", ¶ms.runtime, "Specify runtime (in seconds)"),
61 OPT_UINTEGER('f', "futexes", ¶ms.nfutexes, "Specify amount of futexes per threads"),
62 OPT_BOOLEAN( 's', "silent", ¶ms.silent, "Silent mode: do not display data/details"),
63 OPT_BOOLEAN( 'S', "shared", ¶ms.fshared, "Use shared futexes instead of private ones"),
64 OPT_BOOLEAN( 'm', "mlockall", ¶ms.mlockall, "Lock all current and future memory"),
88 for (i = 0; i < params.nfutexes; i++, ops++) { in workerfn()
96 if (!params.silent && in workerfn()
122 !params.silent ? "\n" : "", avg, rel_stddev_stats(stddev, avg), in print_summary()
124 futex_print_nbuckets(¶ms); in print_summary()
154 if (params.mlockall) { in bench_futex_hash()
159 if (!params.nthreads) /* default to the number of CPUs */ in bench_futex_hash()
160 params.nthreads = perf_cpu_map__nr(cpu); in bench_futex_hash()
162 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash()
166 if (!params.fshared) in bench_futex_hash()
168 futex_set_nbuckets_param(¶ms); in bench_futex_hash()
171 … getpid(), params.nthreads, params.nfutexes, params.fshared ? "shared":"private", params.runtime); in bench_futex_hash()
178 threads_starting = params.nthreads; in bench_futex_hash()
187 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
189 worker[i].futex = calloc(params.nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash()
218 sleep(params.runtime); in bench_futex_hash()
221 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
232 for (i = 0; i < params.nthreads; i++) { in bench_futex_hash()
236 if (!params.silent) { in bench_futex_hash()
237 if (params.nfutexes == 1) in bench_futex_hash()
243 &worker[i].futex[params.nfutexes-1], t); in bench_futex_hash()