diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-07-06 14:51:01 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-06 14:58:36 +0300 |
commit | 3abebc55d70b6e3247d1f0e34c0bb906e40d2a18 (patch) | |
tree | 9d7f2f7e55c24acfb74fd8ac92934aa1f6fb2bcc /tools/perf/builtin-record.c | |
parent | 200802a4a79b3a7a1cf924ad870d3265023d0787 (diff) | |
download | linux-3abebc55d70b6e3247d1f0e34c0bb906e40d2a18.tar.xz |
perf record: Let user have timestamps with per-thread recording
If the option -T is used with option --per-thread, then time is still
not sampled. Fix that by using OPT_BOOLEAN_SET to distinguish when the
user used the -T option as opposed to the default case when timestamps
are enabled but only for per-cpu recording.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1436183461-1918-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index de165a1b9240..283fe96bdfc1 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1030,7 +1030,9 @@ struct option __record_options[] = { OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat, "per thread counts"), OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"), - OPT_BOOLEAN('T', "timestamp", &record.opts.sample_time, "Record the sample timestamps"), + OPT_BOOLEAN_SET('T', "timestamp", &record.opts.sample_time, + &record.opts.sample_time_set, + "Record the sample timestamps"), OPT_BOOLEAN('P', "period", &record.opts.period, "Record the sample period"), OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples, "don't sample"), |