From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-kernel@vger.kernel.org
Cc: a.p.zijlstra@chello.nl, mingo@kernel.org, acme@infradead.org,
eranian@google.com, andi@firstfloor.org,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH v2 7/7] tools, perf: Allow the user to disable time stamps
Date: Tue, 15 Jul 2014 16:58:59 +0800 [thread overview]
Message-ID: <1405414739-31455-8-git-send-email-zheng.z.yan@intel.com> (raw)
In-Reply-To: <1405414739-31455-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 378b85b..8728c7c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -776,6 +776,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 8606175..1bc4093 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.3
next prev parent reply other threads:[~2014-07-15 9:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 8:58 [PATCH v2 0/7] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-15 8:58 ` [PATCH v2 1/7] perf, core: introduce pmu context switch callback Yan, Zheng
2014-07-15 11:39 ` Peter Zijlstra
2014-07-15 8:58 ` [PATCH v2 2/7] perf, x86: use context switch callback to flush LBR stack Yan, Zheng
2014-07-15 8:58 ` [PATCH v2 3/7] perf, x86: use the PEBS auto reload mechanism when possible Yan, Zheng
2014-07-15 10:14 ` Peter Zijlstra
2014-07-15 8:58 ` [PATCH v2 4/7] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-15 10:41 ` Peter Zijlstra
2014-07-15 11:38 ` Peter Zijlstra
2014-07-15 8:58 ` [PATCH v2 5/7] perf, x86: drain PEBS buffer during context switch Yan, Zheng
2014-07-15 11:57 ` Peter Zijlstra
2014-07-15 8:58 ` [PATCH v2 6/7] perf, x86: enable large PEBS interrupt threshold for SNB/IVB/HSW Yan, Zheng
2014-07-15 11:12 ` Peter Zijlstra
2014-07-15 8:58 ` Yan, Zheng [this message]
2014-07-15 10:02 ` [PATCH v2 0/7] perf, x86: large PEBS interrupt threshold Peter Zijlstra
2014-07-16 1:12 ` Yan, Zheng
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=1405414739-31455-8-git-send-email-zheng.z.yan@intel.com \
--to=zheng.z.yan@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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
all inboxes | Powered by JetHome®