public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
	eranian@google.com, hpa@zytor.com, mingo@kernel.org,
	andi@firstfloor.org, a.p.zijlstra@chello.nl, ak@linux.intel.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf record: Honour --no-time command line option
Date: Tue, 12 Aug 2014 22:13:23 -0700	[thread overview]
Message-ID: <tip-8affc2b8c27bfc2d6e70827b746f490b62c44eaa@git.kernel.org> (raw)
In-Reply-To: <1406789104-25863-10-git-send-email-zheng.z.yan@intel.com>

Commit-ID:  8affc2b8c27bfc2d6e70827b746f490b62c44eaa
Gitweb:     http://git.kernel.org/tip/8affc2b8c27bfc2d6e70827b746f490b62c44eaa
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Thu, 31 Jul 2014 14:45:04 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 12 Aug 2014 12:00:03 -0300

perf record: Honour --no-time command line option

Time stamps are always implicitely enabled for record currently.  The
old --time/-T option is a nop.

Allow the user to disable timestamps by using --no-time, honouring the
existing option.

The defaults are unchanged.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1406789104-25863-10-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c | 1 +
 tools/perf/util/evsel.c     | 9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4869050..ca0251e 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -781,6 +781,7 @@ static const char * const record_usage[] = {
  */
 static struct record record = {
 	.opts = {
+		.sample_time	     = true,
 		.mmap_pages	     = UINT_MAX,
 		.user_freq	     = UINT_MAX,
 		.user_interval	     = ULLONG_MAX,
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 21a373e..92e5235 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -633,9 +633,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
 	if (opts->period)
 		perf_evsel__set_sample_bit(evsel, PERIOD);
 
-	if (!perf_missing_features.sample_id_all &&
-	    (opts->sample_time || !opts->no_inherit ||
-	     target__has_cpu(&opts->target) || per_cpu))
+	/*
+	 * When the user explicitely disabled time don't force it here.
+	 */
+	if (opts->sample_time &&
+	    (!perf_missing_features.sample_id_all &&
+	    (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu)))
 		perf_evsel__set_sample_bit(evsel, TIME);
 
 	if (opts->raw_samples && !evsel->no_aux_samples) {

  parent reply	other threads:[~2014-08-13  5:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31  6:44 [PATCH v4 0/9] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-31  6:44 ` [PATCH v4 1/9] perf, core: introduce pmu context switch callback Yan, Zheng
2014-07-31  6:44 ` [PATCH v4 2/9] perf, x86: use context switch callback to flush LBR stack Yan, Zheng
2014-07-31  6:44 ` [PATCH v4 3/9] perf, x86: use the PEBS auto reload mechanism when possible Yan, Zheng
2014-07-31  6:44 ` [PATCH v4 4/9] perf, x86: introduce setup_pebs_sample_data() Yan, Zheng
2014-07-31  6:45 ` [PATCH v4 5/9] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-31  6:45 ` [PATCH v4 6/9] perf, x86: handle multiple records in PEBS buffer Yan, Zheng
2014-07-31  6:45 ` [PATCH v4 7/9] perf, x86: drain PEBS buffer during context switch Yan, Zheng
2014-07-31  6:45 ` [PATCH v4 8/9] perf, x86: enlarge PEBS buffer Yan, Zheng
2014-07-31  6:45 ` [PATCH v4 9/9] tools, perf: Allow the user to disable time stamps Yan, Zheng
2014-07-31 14:45   ` Arnaldo Carvalho de Melo
2014-08-13  5:13   ` tip-bot for Andi Kleen [this message]
2014-07-31  7:16 ` [PATCH v4 0/9] perf, x86: large PEBS interrupt threshold Ingo Molnar
2014-07-31  7:18   ` Yan, Zheng
2014-07-31  7:25     ` Ingo Molnar
2014-07-31  7:27 ` Peter Zijlstra
2014-07-31  7:36   ` Yan, Zheng
2014-07-31  7:49     ` Peter Zijlstra
2014-07-31 14:50   ` Andi Kleen

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-8affc2b8c27bfc2d6e70827b746f490b62c44eaa@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox