All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Davidlohr Bueso <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
	mingo@kernel.org, jolsa@kernel.org, mitake@dcl.info.waseda.ac.jp,
	tglx@linutronix.de, davidlohr@hp.com, aswin@hp.com
Subject: [tip:perf/core] perf bench futex: Use global --repeat option
Date: Tue, 24 Jun 2014 22:51:55 -0700	[thread overview]
Message-ID: <tip-d9de84afd1f3a464135abe2b26e66aa86be5af8d@git.kernel.org> (raw)
In-Reply-To: <1402942467-10671-6-git-send-email-davidlohr@hp.com>

Commit-ID:  d9de84afd1f3a464135abe2b26e66aa86be5af8d
Gitweb:     http://git.kernel.org/tip/d9de84afd1f3a464135abe2b26e66aa86be5af8d
Author:     Davidlohr Bueso <davidlohr@hp.com>
AuthorDate: Mon, 16 Jun 2014 11:14:23 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 19 Jun 2014 16:13:16 -0300

perf bench futex: Use global --repeat option

This option is available through perf-bench, use it instead and free the
local option.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1402942467-10671-6-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/bench/futex-requeue.c | 10 +---------
 tools/perf/bench/futex-wake.c    | 12 ++----------
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index a1625587..732403b 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;
  */
 static unsigned int nrequeue = 1;
 
-/*
- * There can be significant variance from run to run,
- * the more repeats, the more exact the overall avg and
- * the better idea of the futex latency.
- */
-static unsigned int repeat = 10;
-
 static pthread_t *worker;
 static bool done = 0, silent = 0;
 static pthread_mutex_t thread_lock;
@@ -46,7 +39,6 @@ static unsigned int ncpus, threads_starting, nthreads = 0;
 static const struct option options[] = {
 	OPT_UINTEGER('t', "threads",  &nthreads, "Specify amount of threads"),
 	OPT_UINTEGER('q', "nrequeue", &nrequeue, "Specify amount of threads to requeue at once"),
-	OPT_UINTEGER('r', "repeat",   &repeat,   "Specify amount of times to repeat the run"),
 	OPT_BOOLEAN( 's', "silent",   &silent,   "Silent mode: do not display data/details"),
 	OPT_END()
 };
@@ -146,7 +138,7 @@ int bench_futex_requeue(int argc, const char **argv,
 	pthread_cond_init(&thread_parent, NULL);
 	pthread_cond_init(&thread_worker, NULL);
 
-	for (j = 0; j < repeat && !done; j++) {
+	for (j = 0; j < bench_repeat && !done; j++) {
 		unsigned int nrequeued = 0;
 		struct timeval start, end, runtime;
 
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c
index d096169..50022cb 100644
--- a/tools/perf/bench/futex-wake.c
+++ b/tools/perf/bench/futex-wake.c
@@ -30,15 +30,8 @@ static u_int32_t futex1 = 0;
  */
 static unsigned int nwakes = 1;
 
-/*
- * There can be significant variance from run to run,
- * the more repeats, the more exact the overall avg and
- * the better idea of the futex latency.
- */
-static unsigned int repeat = 10;
-
 pthread_t *worker;
-static bool done = 0, silent = 0;
+static bool done = false, silent = false;
 static pthread_mutex_t thread_lock;
 static pthread_cond_t thread_parent, thread_worker;
 static struct stats waketime_stats, wakeup_stats;
@@ -47,7 +40,6 @@ static unsigned int ncpus, threads_starting, nthreads = 0;
 static const struct option options[] = {
 	OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
 	OPT_UINTEGER('w', "nwakes",  &nwakes,   "Specify amount of threads to wake at once"),
-	OPT_UINTEGER('r', "repeat",  &repeat,   "Specify amount of times to repeat the run"),
 	OPT_BOOLEAN( 's', "silent",  &silent,   "Silent mode: do not display data/details"),
 	OPT_END()
 };
@@ -149,7 +141,7 @@ int bench_futex_wake(int argc, const char **argv,
 	pthread_cond_init(&thread_parent, NULL);
 	pthread_cond_init(&thread_worker, NULL);
 
-	for (j = 0; j < repeat && !done; j++) {
+	for (j = 0; j < bench_repeat && !done; j++) {
 		unsigned int nwoken = 0;
 		struct timeval start, end, runtime;
 

  reply	other threads:[~2014-06-25  5:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 18:14 [PATCH 0/9] perf bench: Updates for 3.17 Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 1/9] perf bench: Add --repeat option Davidlohr Bueso
2014-06-19  6:14   ` Namhyung Kim
2014-06-19 11:45     ` Davidlohr Bueso
2014-06-19 23:51       ` Namhyung Kim
2014-06-20  3:03         ` Davidlohr Bueso
2014-06-24  5:54           ` Namhyung Kim
2014-06-25  5:51   ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 2/9] perf bench: sched-messaging: Redo runtime output Davidlohr Bueso
2014-06-19 19:30   ` Arnaldo Carvalho de Melo
2014-06-16 18:14 ` [PATCH 3/9] perf bench: sched-messaging: Support multiple runs Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 4/9] perf bench: sched-messaging: Plug memleak Davidlohr Bueso
2014-06-19  6:20   ` Namhyung Kim
2014-06-25  5:51   ` [tip:perf/core] perf bench " tip-bot for Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 5/9] perf bench: futex: Use global --repeat option Davidlohr Bueso
2014-06-25  5:51   ` tip-bot for Davidlohr Bueso [this message]
2014-06-16 18:14 ` [PATCH 6/9] perf bench: futex: Replace --silent option with global --format Davidlohr Bueso
2014-06-19 16:38   ` Arnaldo Carvalho de Melo
2014-06-19 17:01     ` Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 7/9] perf bench: mem: -o and -n options are mutually exclusive Davidlohr Bueso
2014-06-25  5:52   ` [tip:perf/core] perf bench mem: The " tip-bot for Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 8/9] perf bench: sched-messaging: Drop barf() Davidlohr Bueso
2014-06-25  5:52   ` [tip:perf/core] perf bench " tip-bot for Davidlohr Bueso
2014-06-16 18:14 ` [PATCH 9/9] perf bench: futex: Support operations for shared futexes Davidlohr Bueso
2014-06-19 16:41   ` Arnaldo Carvalho de Melo
2014-06-19 16:43     ` Davidlohr Bueso
2014-06-19 17:05       ` Arnaldo Carvalho de Melo
2014-06-19 19:48         ` Darren Hart
2014-06-25 17:07         ` Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-d9de84afd1f3a464135abe2b26e66aa86be5af8d@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mitake@dcl.info.waseda.ac.jp \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.