All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Davidlohr Bueso <davidlohr@hp.com>,
	Aswin Chandramouleeswaran <aswin@hp.com>,
	Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
	Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 10/11] perf bench mem: The -o and -n options are mutually exclusive
Date: Thu, 19 Jun 2014 18:13:52 -0300	[thread overview]
Message-ID: <1403212433-2714-11-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1403212433-2714-1-git-send-email-acme@kernel.org>

From: Davidlohr Bueso <davidlohr@hp.com>

 -o, --only-prefault   Show only the result with page faults before mem*
 -n, --no-prefault     Show only the result without page faults before mem*

Makes no sense to call together. Applies to both memset and memcpy.

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-8-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/bench/mem-memcpy.c | 5 +++++
 tools/perf/bench/mem-memset.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c
index 5ce71d3b72cf..e622c3e96efc 100644
--- a/tools/perf/bench/mem-memcpy.c
+++ b/tools/perf/bench/mem-memcpy.c
@@ -189,6 +189,11 @@ int bench_mem_memcpy(int argc, const char **argv,
 	argc = parse_options(argc, argv, options,
 			     bench_mem_memcpy_usage, 0);
 
+	if (no_prefault && only_prefault) {
+		fprintf(stderr, "Invalid options: -o and -n are mutually exclusive\n");
+		return 1;
+	}
+
 	if (use_cycle)
 		init_cycle();
 
diff --git a/tools/perf/bench/mem-memset.c b/tools/perf/bench/mem-memset.c
index 9af79d2b18e5..2a65468619f0 100644
--- a/tools/perf/bench/mem-memset.c
+++ b/tools/perf/bench/mem-memset.c
@@ -181,6 +181,11 @@ int bench_mem_memset(int argc, const char **argv,
 	argc = parse_options(argc, argv, options,
 			     bench_mem_memset_usage, 0);
 
+	if (no_prefault && only_prefault) {
+		fprintf(stderr, "Invalid options: -o and -n are mutually exclusive\n");
+		return 1;
+	}
+
 	if (use_cycle)
 		init_cycle();
 
-- 
1.9.3


  parent reply	other threads:[~2014-06-19 21:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 21:13 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 01/11] perf trace: Fix up fd -> pathname resolution Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 02/11] perf evlist: Add suggestion of how to set perf_event_paranoid sysctl Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 03/11] perf trace: Remove needless reassignments Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 04/11] perf trace: Cache the is_exit syscall test Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 05/11] perf hists browser: Remove ev_name argument from perf_evsel__hists_browse Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 06/11] perf ui browser: Fix scrollbar refresh row index Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 07/11] perf bench sched-messaging: Plug memleak Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 08/11] perf bench: Add --repeat option Arnaldo Carvalho de Melo
2014-06-19 21:13 ` [PATCH 09/11] perf bench futex: Use global " Arnaldo Carvalho de Melo
2014-06-19 21:13 ` Arnaldo Carvalho de Melo [this message]
2014-06-19 21:13 ` [PATCH 11/11] perf bench sched-messaging: Drop barf() Arnaldo Carvalho de Melo
2014-06-25  5:43 ` [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar

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=1403212433-2714-11-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mitake@dcl.info.waseda.ac.jp \
    /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.