aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/bench/futex-requeue.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/bench/futex-requeue.c')
-rw-r--r--tools/perf/bench/futex-requeue.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index a16255876f1d..732403bfd31a 100644
--- a/tools/perf/bench/futex-requeue.c
+++ b/tools/perf/bench/futex-requeue.c
@@ -29,13 +29,6 @@ static u_int32_t futex1 = 0, futex2 = 0;
29 */ 29 */
30static unsigned int nrequeue = 1; 30static unsigned int nrequeue = 1;
31 31
32/*
33 * There can be significant variance from run to run,
34 * the more repeats, the more exact the overall avg and
35 * the better idea of the futex latency.
36 */
37static unsigned int repeat = 10;
38
39static pthread_t *worker; 32static pthread_t *worker;
40static bool done = 0, silent = 0; 33static bool done = 0, silent = 0;
41static pthread_mutex_t thread_lock; 34static pthread_mutex_t thread_lock;
@@ -46,7 +39,6 @@ static unsigned int ncpus, threads_starting, nthreads = 0;
46static const struct option options[] = { 39static const struct option options[] = {
47 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"), 40 OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
48 OPT_UINTEGER('q', "nrequeue", &nrequeue, "Specify amount of threads to requeue at once"), 41 OPT_UINTEGER('q', "nrequeue", &nrequeue, "Specify amount of threads to requeue at once"),
49 OPT_UINTEGER('r', "repeat", &repeat, "Specify amount of times to repeat the run"),
50 OPT_BOOLEAN( 's', "silent", &silent, "Silent mode: do not display data/details"), 42 OPT_BOOLEAN( 's', "silent", &silent, "Silent mode: do not display data/details"),
51 OPT_END() 43 OPT_END()
52}; 44};
@@ -146,7 +138,7 @@ int bench_futex_requeue(int argc, const char **argv,
146 pthread_cond_init(&thread_parent, NULL); 138 pthread_cond_init(&thread_parent, NULL);
147 pthread_cond_init(&thread_worker, NULL); 139 pthread_cond_init(&thread_worker, NULL);
148 140
149 for (j = 0; j < repeat && !done; j++) { 141 for (j = 0; j < bench_repeat && !done; j++) {
150 unsigned int nrequeued = 0; 142 unsigned int nrequeued = 0;
151 struct timeval start, end, runtime; 143 struct timeval start, end, runtime;
152 144