From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Subject: Re: [PATCH 0/2] perf: add sort by inclusive time functionality (v2) Date: Thu, 8 Mar 2012 16:31:34 +0100 Message-ID: <20120308153130.GC7976@somewhere.redhat.com> References: <1331160079-13821-1-git-send-email-asharma@fb.com> <20120308072901.GC20784@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wi0-f174.google.com ([209.85.212.174]:55011 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756738Ab2CHPbj (ORCPT ); Thu, 8 Mar 2012 10:31:39 -0500 Content-Disposition: inline In-Reply-To: <20120308072901.GC20784@elte.hu> Sender: linux-perf-users-owner@vger.kernel.org List-ID: To: Ingo Molnar Cc: Arun Sharma , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Mike Galbraith , Paul Mackerras , Peter Zijlstra , Stephane Eranian , Namhyung Kim , Tom Zanussi , linux-perf-users@vger.kernel.org On Thu, Mar 08, 2012 at 08:29:01AM +0100, Ingo Molnar wrote: > > * Arun Sharma wrote: > > > This patch series refactors existing code a bit and adds sort by > > inclusive time (time spent in the function + callees). > > > > Sample command lines: > > > > # perf record -ag -- sleep 1 > > # perf report -g graph,0.5,callee -n -s inclusive > > So I tried this out with: > > $ taskset 1 perf record -g git gc > > and got entries above 100% (in the TUI): > > $ perf report -g graph,0.5,callee -n -s inclusive > > + 321.11% 5628 [.] 0x392b609269 > + 142.27% 3774 [.] create_delta > + 78.86% 1248 [.] lookup_object > + 40.54% 1348 [k] system_call_fastpath > [...] > > Is that expected? I think this happens because of this: - hists->stats.total_period += h->period; + if (!h->inclusive) + hists->stats.total_period += h->period; Which I'm not sure why it is needed btw.