[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8c76279b-ce27-cfcd-7e58-8d9492e40b60@linux.intel.com>
Date: Wed, 3 Oct 2018 17:41:02 +0300
From: Alexey Budankov <alexey.budankov@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] perf record: encode -k clockid frequency into Perf
trace
Hi,
On 03.10.2018 16:39, Jiri Olsa wrote:
> On Wed, Oct 03, 2018 at 10:01:56AM +0300, Alexey Budankov wrote:
<SNIP>
>> + if (rec->opts.use_clockid && rec->opts.clockid_res_ns)
>> + session->header.env.clockid_res_ns = rec->opts.clockid_res_ns;
>> + else
>> + perf_header__clear_feat(&session->header, HEADER_CLOCKID);
>> +
>
> could you please keep only bits setting in record__init_features
> and move the header.env.clockid_res_ns assignment out of it?
Ok. Accepted.
>
<SNIP>
>> +static int get_clockid_res(clockid_t clk_id, size_t *res_ns)
>> +{
>> + struct timespec res;
>> +
>> + *res_ns = 0;
>> + if (!clock_getres(clk_id, &res))
>> + *res_ns = res.tv_nsec + res.tv_sec * NSEC_PER_SEC;
>
> hum, if this one fails (which I guess is unlikely) we should tell
> and probably even quit
Makes sense. Please stay tuned for v3.
Thanks,
Alexey
Powered by blists - more mailing lists