lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] perf record: encode -k clockid frequency into Perf trace
From
Date
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

\
 
 \ /
  Last update: 2018-10-03 16:42    [W:0.031 / U:7.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site