summaryrefslogtreecommitdiff
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index 73d4a6c3fe52..6606569e7ccc 100644
--- a/tools/perf/bench/futex-requeue.c
+++ b/tools/perf/bench/futex-requeue.c
@@ -53,6 +53,7 @@ static const struct option options[] = {
OPT_BOOLEAN( 's', "silent", &params.silent, "Silent mode: do not display data/details"),
OPT_BOOLEAN( 'S', "shared", &params.fshared, "Use shared futexes instead of private ones"),
OPT_BOOLEAN( 'm', "mlockall", &params.mlockall, "Lock all current and future memory"),
+ OPT_BOOLEAN( 'B', "broadcast", &params.broadcast, "Requeue all threads at once"),
OPT_END()
};
@@ -154,6 +155,9 @@ int bench_futex_requeue(int argc, const char **argv)
if (params.nrequeue > params.nthreads)
params.nrequeue = params.nthreads;
+ if (params.broadcast)
+ params.nrequeue = params.nthreads;
+
printf("Run summary [PID %d]: Requeuing %d threads (from [%s] %p to %p), "
"%d at a time.\n\n", getpid(), params.nthreads,
params.fshared ? "shared":"private", &futex1, &futex2, params.nrequeue);