Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765253Ab3DDW0p (ORCPT ); Thu, 4 Apr 2013 18:26:45 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:61137 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765206Ab3DDW0o (ORCPT ); Thu, 4 Apr 2013 18:26:44 -0400 Message-ID: <515DFE1F.3010106@linaro.org> Date: Thu, 04 Apr 2013 15:26:39 -0700 From: John Stultz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: Stephane Eranian CC: David Ahern , Pawel Moll , Peter Zijlstra , Thomas Gleixner , LKML , "mingo@elte.hu" , Paul Mackerras , Anton Blanchard , Will Deacon , "ak@linux.intel.com" , Pekka Enberg , Steven Rostedt 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> <515C34BF.6060508@gmail.com> <515C393C.8030405@gmail.com> <515C6D87.2060106@linaro.org> 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: 1428 Lines: 25 On 04/04/2013 01:12 AM, Stephane Eranian wrote: > On Wed, Apr 3, 2013 at 7:57 PM, John Stultz wrote: >> I'm not sure I follow this. If perf exported data came with CLOCK_MONOTONIC >> timestamps, no correlation would need to be exposed. perf would just have >> to do the extra overhead of doing the conversion on export. > There is no explicit export operation in perf. You record a sample when > the counter overflows and generates an NMI interrupt. In the NMI interrupt > handler, the sample record is written to the sampling buffer. That is when > the timestamp is generated. The sampling buffer is directly accessible to > users via mmap(). The perf tool just dumps the raw sampling buffer into > a file, no sample record is modified or even looked at. The processing > of the samples is done offline (via perf report) and could be done on > another machine. In other words, the perf.data file is self-contained. Ah. Ok, I didn't realize perfs buffers were directly mmaped. I was thinking perf could do the translation not at NMI time but when the buffer was later read by the application. That helps explain some of the constraints. thanks -john -- 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/