Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760119Ab3DCOWu (ORCPT ); Wed, 3 Apr 2013 10:22:50 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:55854 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759883Ab3DCOWs (ORCPT ); Wed, 3 Apr 2013 10:22:48 -0400 MIME-Version: 1.0 In-Reply-To: <515C393C.8030405@gmail.com> References: <1350408232.2336.42.camel@laptop> <1359728280.8360.15.camel@hornet> <51118797.9080800@linaro.org> <5123C3AF.8060100@linaro.org> <1361356160.10155.22.camel@laptop> <51285BF1.2090208@linaro.org> <1361801441.4007.40.camel@laptop> <1363291021.3100.144.camel@hornet> <51586315.7080006@gmail.com> <5159D221.70304@linaro.org> <515A0A3A.2040105@gmail.com> <515C34BF.6060508@gmail.com> <515C393C.8030405@gmail.com> Date: Wed, 3 Apr 2013 16:22:47 +0200 Message-ID: Subject: Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples From: Stephane Eranian To: David Ahern Cc: John Stultz , Pawel Moll , Peter Zijlstra , Thomas Gleixner , LKML , "mingo@elte.hu" , Paul Mackerras , Anton Blanchard , Will Deacon , "ak@linux.intel.com" , Pekka Enberg , Steven Rostedt Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1536 Lines: 36 On Wed, Apr 3, 2013 at 4:14 PM, David Ahern 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/