Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759071Ab3DCNzW (ORCPT ); Wed, 3 Apr 2013 09:55:22 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:61189 "EHLO mail-pb0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757901Ab3DCNzV (ORCPT ); Wed, 3 Apr 2013 09:55:21 -0400 Message-ID: <515C34BF.6060508@gmail.com> Date: Wed, 03 Apr 2013 07:55:11 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Stephane Eranian 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 , Robert Richter Subject: Re: [RFC] perf: need to expose sched_clock to correlate user samples with kernel samples 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1651 Lines: 33 On 4/3/13 3:17 AM, Stephane Eranian wrote: > I haven't done any specific testing with either approach yet. The goal is to > use this perf timestamp to correlate user level events to hardware > events recorded > by the kernel. I would assume there would be situations where those user events > could be on the critical path, and thus the timestamp operation would have to be > as efficient as possible. The vdso approach would be ideal. > >> >> The performance/speed depends on how often is called. I have no idea what >> Stephane's use case is but for me it is to correlate perf_clock timestamps >> to timeofday. In my perf-based daemon that tracks process schedulings, I >> update the correlation every 5-10 minutes. >> > I was more thinking along the lines of runtime environments like Java where > a JIT compiler is invoked frequently and you need to correlate samples in the > native code with Java source. For that, the JIT compiler has to emit mapping > tables which have to be timestamped as address ranges may be re-used. 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? David -- 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/