aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-07-31 02:45:04 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-08-12 11:00:03 -0400
commit8affc2b8c27bfc2d6e70827b746f490b62c44eaa (patch)
tree5fee2c062b02c41e27a19d88c00525b551357c24 /tools/perf/util/evsel.c
parentb048a24cc8f29dce1bad564aaeb8680020d3701c (diff)
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>
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 21a373ebea22..92e5235f5377 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)
633 if (opts->period) 633 if (opts->period)
634 perf_evsel__set_sample_bit(evsel, PERIOD); 634 perf_evsel__set_sample_bit(evsel, PERIOD);
635 635
636 if (!perf_missing_features.sample_id_all && 636 /*
637 (opts->sample_time || !opts->no_inherit || 637 * When the user explicitely disabled time don't force it here.
638 target__has_cpu(&opts->target) || per_cpu)) 638 */
639 if (opts->sample_time &&
640 (!perf_missing_features.sample_id_all &&
641 (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu)))
639 perf_evsel__set_sample_bit(evsel, TIME); 642 perf_evsel__set_sample_bit(evsel, TIME);
640 643
641 if (opts->raw_samples && !evsel->no_aux_samples) { 644 if (opts->raw_samples && !evsel->no_aux_samples) {