From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-kernel@vger.kernel.org
Cc: a.p.zijlstra@chello.nl, mingo@elte.hu, eranian@google.com,
ak@linux.intel.com
Subject: [RFC PATCH 4/7] tools, perf: Allow the user to disable time stamps
Date: Wed, 28 May 2014 14:18:07 +0800 [thread overview]
Message-ID: <1401257890-30535-5-git-send-email-zheng.z.yan@intel.com> (raw)
In-Reply-To: <1401257890-30535-1-git-send-email-zheng.z.yan@intel.com>
From: Andi Kleen <ak@linux.intel.com>
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
This can cause some minor misaccounting (by missing mmaps), but significantly
lowers the size of perf.data
The defaults are unchanged.
Signed-off-by: Andi Kleen <ak@linux.intel.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 e4c85b8..1c8849f 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -771,6 +771,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 5c28d82..d6e7865 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -632,9 +632,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) {
--
1.9.0
next prev parent reply other threads:[~2014-05-28 6:18 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 6:18 [RFC PATCH 0/7] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-05-28 6:18 ` [RFC PATCH 1/7] perf, core: Add all PMUs to pmu_idr Yan, Zheng
2014-05-28 6:59 ` Peter Zijlstra
2014-05-28 6:18 ` [RFC PATCH 2/7] perf, core: introduce pmu context switch callback Yan, Zheng
2014-05-28 6:18 ` [RFC PATCH 3/7] perf, x86: use context switch callback to flush LBR stack Yan, Zheng
2014-05-28 6:18 ` Yan, Zheng [this message]
2014-05-28 6:18 ` [RFC PATCH 5/7] perf, x86: use the PEBS auto reload mechanism when possible Yan, Zheng
2014-05-28 7:59 ` Peter Zijlstra
2014-05-28 14:46 ` Andi Kleen
2014-05-28 15:36 ` Peter Zijlstra
2014-05-28 6:18 ` [RFC PATCH 6/7] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-05-28 8:10 ` Peter Zijlstra
2014-05-28 12:54 ` Stephane Eranian
2014-05-28 15:02 ` Peter Zijlstra
2014-05-28 14:58 ` Andi Kleen
2014-05-28 15:24 ` Stephane Eranian
2014-05-28 16:51 ` Andi Kleen
2014-05-28 17:05 ` Stephane Eranian
2014-05-28 17:10 ` Peter Zijlstra
2014-05-28 17:12 ` Andi Kleen
2014-05-28 17:19 ` Peter Zijlstra
2014-05-28 17:45 ` Andi Kleen
2014-05-28 17:49 ` Peter Zijlstra
2014-05-28 17:09 ` Peter Zijlstra
2014-05-28 15:35 ` Peter Zijlstra
2014-05-28 16:08 ` Andi Kleen
2014-05-28 17:05 ` Peter Zijlstra
2014-05-28 17:25 ` Andi Kleen
2014-05-28 17:40 ` Stephane Eranian
2014-05-28 17:47 ` Andi Kleen
2014-05-28 19:28 ` Peter Zijlstra
2014-05-28 6:18 ` [RFC PATCH 7/7] perf, x86: drain PEBS buffer during context switch Yan, Zheng
2014-05-28 8:12 ` Peter Zijlstra
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=1401257890-30535-5-git-send-email-zheng.z.yan@intel.com \
--to=zheng.z.yan@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).