From: David Ahern <dsahern@gmail.com>
To: Harald Servat <harald.servat@bsc.es>
Cc: linux-perf-users@vger.kernel.org, Pawel Moll <pawel.moll@arm.com>
Subject: Re: Information regarding the perf tool
Date: Mon, 04 Nov 2013 10:53:21 -0700 [thread overview]
Message-ID: <5277DF11.7080601@gmail.com> (raw)
In-Reply-To: <5277D8E1.9000009@bsc.es>
[added Pawel, author of the patches]
On 11/4/13, 10:26 AM, Harald Servat wrote:
> On 31/10/13 19:22, David Ahern wrote:
>> On 10/31/13, 11:23 AM, Harald Servat wrote:
>>> Which is the relation between perf_clock() (or local_clock()) and
>>> clock_gettime (CLOCK_MONOTONIC, ). Are they the same? If not, is there a
>>> way to correlate them? Or alternatively, is it possible to call
>>> local_clock() from the userland?
>>
>> We still do not have a means of correlating perf_clock to time-of-day,
>> monotonic or any other clock source. Still trying.
>>
>> Pawell Moll has a couple of patches posted -- one uses an ioctl to get
>> perf_clock timestamps the other makes perf_clock accessible through
>> clock_gettime. See attached.
>>
>> David
>
> Hello,
>
> thank you David! Those patches are great! I decided to access perf
> clock through clock_gettime because I'm more used to this call since I
> used it before.
My long term preference as well with a hook into vdso page.
> I understand that the patches are a bit hardcoded, right? I tried to
> #include "/usr/include/linux/time.h" after #include <time.h> but they
> seem to conflict. If I just extract the interesting bits (#define
> CLOCK_PERF) it seems to work. Is there a cleaner way to use this right now?
They should just work. I seem to have misplaced my test case; I don't
recall having problems with it.
>
> JFTR, I have written a very small app that demonstrate the usage of
> this clock_gettime + perf (attached). It is very interesting to see that
> the difference between the monotonic and the perf clock is rather
> similar. However, as time goes by, at least in my machine, perf clock
> seems to advance at a faster pace than the monotonic clock.
that's why we would like to get a perf_clock/trace_clock time source
exported by the kernel.
David
next prev parent reply other threads:[~2013-11-04 17:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 16:19 Information regarding the perf tool Harald Servat
2013-10-23 12:47 ` Andi Kleen
2013-10-23 13:51 ` Harald Servat
2013-10-31 15:45 ` Harald Servat
2013-10-31 16:39 ` David Ahern
2013-10-31 17:23 ` Harald Servat
2013-10-31 18:22 ` David Ahern
2013-11-04 17:26 ` Harald Servat
2013-11-04 17:53 ` David Ahern [this message]
2013-11-04 18:02 ` Pawel Moll
2013-12-12 0:56 ` David Ahern
2013-12-12 8:47 ` Harald Servat
2014-01-09 12:11 ` Harald Servat
2013-10-31 16:48 ` Andi Kleen
2013-10-31 16:57 ` Harald Servat
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=5277DF11.7080601@gmail.com \
--to=dsahern@gmail.com \
--cc=harald.servat@bsc.es \
--cc=linux-perf-users@vger.kernel.org \
--cc=pawel.moll@arm.com \
/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).