From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755512AbbCLTxh (ORCPT ); Thu, 12 Mar 2015 15:53:37 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:32919 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754831AbbCLTxg (ORCPT ); Thu, 12 Mar 2015 15:53:36 -0400 Message-ID: <5501EEB9.8000705@gmail.com> Date: Thu, 12 Mar 2015 13:53:29 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stephane Eranian CC: Adrian Hunter , LKML , Arnaldo Carvalho de Melo , Namhyung Kim , Jiri Olsa , Peter Zijlstra , "mingo@elte.hu" Subject: Re: [BUG] perf report: ordered events and flushing bug References: <55015634.6080101@intel.com> <5501E54C.2090107@gmail.com> <5501EA45.8080608@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 On 3/12/15 1:39 PM, Stephane Eranian wrote: > What the point of having all the ordered event logic if you are saying events > must be saved in order. I don't think there is a way to make that guarantee > when monitoring multiple CPUs at the same time. The record command does not analyze the events, it just copies from mmap to file in lumps per mmap. e.g., on a given round the perf data file has events like this: 111112223344444444555566666F111111111 |<------- round --------->|^ | finished round event -| where 11111 are events read from mmap1, 2222 are events from mmap2, etc. F is the finished round event which a pass over all mmaps has been done. So for mmap1 all of the 11111 events are in time order, then jumping to mmap2 events the 2222 times are time sorted relative to mmap2 but not relative to mmap1 events. The ordered events code sorts the clumps into a time based stream: 123141641445124564234645656... David