linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Budankov <alexey.budankov@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] perf record: encode -k clockid frequency into Perf trace
Date: Wed, 3 Oct 2018 17:41:02 +0300	[thread overview]
Message-ID: <8c76279b-ce27-cfcd-7e58-8d9492e40b60@linux.intel.com> (raw)
In-Reply-To: <20181003133924.GD31725@krava>

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

  reply	other threads:[~2018-10-03 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  7:01 [PATCH v2] perf record: encode -k clockid frequency into Perf trace Alexey Budankov
2018-10-03 13:39 ` Jiri Olsa
2018-10-03 14:41   ` Alexey Budankov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-09-28  6:39 Alexey Budankov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c76279b-ce27-cfcd-7e58-8d9492e40b60@linux.intel.com \
    --to=alexey.budankov@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).