From: Pawel Moll <pawel.moll@arm.com>
To: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
John Stultz <john.stultz@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] perf: Add sampling of the raw monotonic clock
Date: Mon, 29 Sep 2014 15:47:36 +0100 [thread overview]
Message-ID: <1412002056.3817.10.camel@hornet> (raw)
In-Reply-To: <5425BD94.4030006@gmail.com>
On Fri, 2014-09-26 at 20:25 +0100, David Ahern wrote:
> On 9/26/14, 9:05 AM, Pawel Moll wrote:
> > To do the correlation you need both timestamps to be "taken"
> > simultaneously:
> >
> > perf event user event
> > -----O--------------+-------------O------> t_mono
> > : | :
> > : V :
> > -----O----------------------------O------> t_perf
> >
> > Of course it's not possible get both values literally at the same time,
> > but placing them in a atomic context a couple of instructions from each
> > other still gives pretty good results. The larger this distance is, the
>
> An early patchset on this topic added the realtime clock as an event and
> an ioctl was used to push a sample into the event stream.
Yeah, I remember. If I remember correctly correctly the pushback was on
a custom event type, right?
Generally speaking I don't mind any solution that we'll get us to the
place both you and I want to be (just being able to time stamp some
performance data in userspace, how difficult can this be! ;-) but I like
the flexibility of an extra sample - one can pick and mix events and
samples at one's leisure.
> In that case
> you have wall clock and perf-clock samples taken in the same kernel
> context and about as close together as you can get.
Yep, that's what I was saying - we can't quite get two timestamps at the
*same*, but getting them within a single atomic block of instructions
gives reasonable accuracy.
Thanks!
Pawel
next prev parent reply other threads:[~2014-09-29 14:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 17:03 [PATCH v2 0/2] perf: User/kernel time correlation and event generation Pawel Moll
2014-09-23 17:03 ` [PATCH v2 1/2] perf: Add sampling of the raw monotonic clock Pawel Moll
[not found] ` <1411491787-25938-2-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-09-24 5:41 ` Namhyung Kim
[not found] ` <87sijhk21x.fsf-vfBCOVm4yAnB69T4xOojN9BPR1lH4CV8@public.gmane.org>
2014-09-25 10:49 ` Pawel Moll
2014-09-26 6:16 ` Namhyung Kim
[not found] ` <8738bekith.fsf@sejong.aot.lge.com>
[not found] ` <8738bekith.fsf-vfBCOVm4yAnB69T4xOojN9BPR1lH4CV8@public.gmane.org>
2014-09-26 10:58 ` Pawel Moll
2014-09-26 14:38 ` Namhyung Kim
2014-09-26 15:05 ` Pawel Moll
2014-09-26 19:25 ` David Ahern
2014-09-29 14:47 ` Pawel Moll [this message]
2014-09-23 17:03 ` [PATCH v2 2/2] perf: Userspace event Pawel Moll
[not found] ` <1411491787-25938-3-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-09-24 6:07 ` Namhyung Kim
[not found] ` <87oau5k0u9.fsf-vfBCOVm4yAnB69T4xOojN9BPR1lH4CV8@public.gmane.org>
2014-09-24 7:20 ` Ingo Molnar
[not found] ` <20140924072017.GC990-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-26 6:21 ` Namhyung Kim
2014-09-26 10:59 ` Pawel Moll
2014-09-26 11:24 ` Ingo Molnar
2014-09-25 12:45 ` Pawel Moll
2014-09-26 6:23 ` Namhyung Kim
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=1412002056.3817.10.camel@hornet \
--to=pawel.moll@arm.com \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=john.stultz@linaro.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=richardcochran@gmail.com \
--cc=rostedt@goodmis.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).