Re: [PATCH] perf record: Let user have timestamps with per-thread recording
From: Adrian Hunter
Date: Tue Jul 07 2015 - 03:34:40 EST
On 06/07/15 18:31, David Ahern wrote:
> 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.
sample_time defaults to true, so there is no way to know if the user set it
without sample_time_set.
--
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/