From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbbEZRDW (ORCPT ); Tue, 26 May 2015 13:03:22 -0400 Received: from one.firstfloor.org ([193.170.194.197]:52296 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbbEZRDR (ORCPT ); Tue, 26 May 2015 13:03:17 -0400 Date: Tue, 26 May 2015 19:03:16 +0200 From: Andi Kleen To: Martin =?utf-8?B?TGnFoWth?= Cc: Andi Kleen , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: Re: [RFC] Add --show-total-period for perf annotate Message-ID: <20150526170316.GO19417@two.firstfloor.org> References: <555F3F8A.6000204@suse.cz> <87mw0wc4vt.fsf@tassilo.jf.intel.com> <5562D33F.70706@suse.cz> <20150525151450.GK19417@two.firstfloor.org> <5564685D.1020204@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5564685D.1020204@suse.cz> 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 > Anyway, attached patch is capable of displaying milliseconds approximation for each instruction. You realize that the events perf is not counting do not directly map to wall time? Even if you count cycles, the cycles are either stopping in idle or changing unit as the CPU's frequencies change. For other events the relationship is even more remote, think what happens when counting cache or TLB misses. Also even if it was mapping to time somehow, it's just a hit, not a duration, so it cannot say how long a individual instruction took. So you cannot map a sample event to time. To do what you want you would need to use something like processor trace, which can do exact accounting. I think the only thing that makes sense is to account it relative to the event counts. -Andi