Messages in this thread | | | Date | Wed, 3 Apr 2013 16:22:47 +0200 | Subject | Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples | From | Stephane Eranian <> |
| |
On Wed, Apr 3, 2013 at 4:14 PM, David Ahern <dsahern@gmail.com> wrote: > On 4/3/13 8:00 AM, Stephane Eranian wrote: >>> >>> What's the advantage of changing apps -- like the JIT compiler -- to emit >>> perf based timestamps versus having perf emit existing timestamps? ie., >>> monotonic and realtime clocks already have vdso mappings for userspace >>> with >>> well known performance characteristics. Why not have perf convert its >>> perf_clock timestamps into monotonic or realtime when dumping events? >>> >> Can monotonic timestamps be obtained from NMI context in the kernel? > > > I don't understand the context of the question. > > I am not suggesting perf_clock be changed. I am working on correlating > existing perf_clock timestamps to clocks typically used by apps (REALTIME > and time-of-day but also applies to MONOTONIC). > But for that, you'd need to expose to users the correlation between the two clocks. And now you'd fixed two clock sources definitions not just one.
> You are wanting the reverse -- have apps emit perf_clock timestamps. I was > just wondering what is the advantage of this approach? > Well, that's how I interpreted your question ;-<
If you could have perf_clock use monotonic then we would not have this discussion. The correlation would be trivial.
| |