Re: [PATCH] perf record: Let user have timestamps with per-thread recording

From: David Ahern
Date: Mon Jul 06 2015 - 11:31:23 EST


On 7/6/15 5:51 AM, Adrian Hunter wrote:
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 6be3c01ff6f8..ec98e5b4e14e 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) {


Why is the sample_time_set even needed? If a user or a command asks for sample time the bit should be set. This seems crazy that underlying code is ignoring the request.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/