From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362Ab3LZPOh (ORCPT ); Thu, 26 Dec 2013 10:14:37 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:50485 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753335Ab3LZPOf (ORCPT ); Thu, 26 Dec 2013 10:14:35 -0500 Date: Thu, 26 Dec 2013 16:14:31 +0100 From: Frederic Weisbecker To: David Ahern Cc: Joseph Schuchart , Ingo Molnar , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , thomas.ilsche@tu-dresden.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Perf: Correct Assumptions about Sample Timestamps in Passes Message-ID: <20131226151429.GA15303@localhost.localdomain> References: <528484CB.7@tu-dresden.de> <20131114083930.GC16543@gmail.com> <528490DE.4080204@tu-dresden.de> <20131114100552.GA5064@gmail.com> <528E1EE6.9040407@tu-dresden.de> <20131127135137.GA24403@gmail.com> <52B437AA.4090102@tu-dresden.de> <52B479E1.7020204@gmail.com> <20131223131051.GB585@localhost.localdomain> <52B84C49.70001@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52B84C49.70001@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 23, 2013 at 09:44:25AM -0500, David Ahern wrote: > On 12/23/13, 8:10 AM, Frederic Weisbecker wrote: > >On Fri, Dec 20, 2013 at 10:09:53AM -0700, David Ahern wrote: > >>On 12/20/13, 5:27 AM, Joseph Schuchart wrote: > >>>I know this comes late, but: As far as I can see, your change does not > >>>preserve the logic of the code I suggested. The idea was to first gather > >>>all the maximum timestamps of all cpus (that is, the last timestamp seen > >>>on each cpu) and then determine the minimum of these maxima. These are > >>>two distinct steps that I think cannot be combined in one update. Your > >> > >> A number of people have reported similar problems -- timestamps > >>below last flush time. This approach would solve that problem for > >>data processed from files, so it would be a good improvement. > > > >Could it be near what you're looking for? > > > >https://lkml.org/lkml/2012/2/18/53 > > > > Forgot about that patch. It is similar to what Joseph wants for > analyzing a file. > > I was carrying that patch while working on perf-kvm-stat-live last > Fall. It does not solve the problem for live commands, so ended up > dropping it and going with local (to the command) hacks. I still > think for live commands getting a perf_clock timestamp at the start > of a round and using that as the flush time will work best. Ok, but how would you fetch this perf clock timestamp, with an explicit read? In the meantime, I can fix and post my old patch, which should solve at least the perf.data based event stream.