diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-07-06 13:51:01 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-06 13:58:36 +0200 |
commit | 3abebc55d70b6e3247d1f0e34c0bb906e40d2a18 (patch) | |
tree | 9d7f2f7e55c24acfb74fd8ac92934aa1f6fb2bcc /tools/perf/util/evsel.c | |
parent | perf probe: Delete an unnecessary check before the function call "strfilter__... (diff) | |
download | linux-3abebc55d70b6e3247d1f0e34c0bb906e40d2a18.tar.xz linux-3abebc55d70b6e3247d1f0e34c0bb906e40d2a18.zip |
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/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 6cc97f37887d..83c08037e7e2 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -707,7 +707,8 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts) */ if (opts->sample_time && (!perf_missing_features.sample_id_all && - (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu))) + (!opts->no_inherit || target__has_cpu(&opts->target) || per_cpu || + opts->sample_time_set))) perf_evsel__set_sample_bit(evsel, TIME); if (opts->raw_samples && !evsel->no_aux_samples) { |