From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753906AbbJUQ1Y (ORCPT ); Wed, 21 Oct 2015 12:27:24 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:32915 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755429AbbJUQ1V (ORCPT ); Wed, 21 Oct 2015 12:27:21 -0400 Date: Wed, 21 Oct 2015 18:27:19 +0200 From: Frederic Weisbecker To: Chandler Carruth Cc: Arnaldo Carvalho de Melo , Brendan Gregg , Ingo Molnar , LKML , Adrian Hunter , Borislav Petkov , David Ahern , Jiri Olsa , Namhyung Kim , Stephane Eranian , Wang Nan Subject: Re: [PATCH 13/16] perf callchain: Switch default to 'graph,0.5,caller' Message-ID: <20151021162718.GB19764@lerouge> References: <1444079018-31421-14-git-send-email-acme@kernel.org> <20151009215626.GM14409@kernel.org> <20151009222504.GN14409@kernel.org> <20151020120033.GB5119@kernel.org> <20151020121948.GA29289@lerouge> <20151020130651.GC5119@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2015 at 02:21:12AM +0000, Chandler Carruth wrote: > On Tue, Oct 20, 2015 at 3:06 AM Arnaldo Carvalho de Melo < > arnaldo.melo@gmail.com> wrote: > > > > IMHO changing that order is not a good idea. Unless many users complained > > > about it. > > > > Perhaps there are not that many users of callchains because the default > > is not what they're used to see? > > > > Motivation for the change came from a video from Chandler, that > > resurfaced the callchain default issue, Chandler? > > > > So, first and foremost, thanks for fixing some of my gripes about the > usability of the perf tool, I'm super excited about the changes you're > making, even if this one isn't among them. > > I think the default of caller vs. callee is probably the hardest judgement > call to make about the right defaults. I can see it going both ways. > > When profiling my *system*, or a diverse group of programs or tasks, I > often find callee useful. Were I a kernel developer, I suspect callee would > be *dramatically* more common than caller. > > For me, what makes the caller view much more frequently desired is that I'm > usually profiling a fairly isolated application, or benchmark for an > isolated library. While I always start off with some more system-level > performance problem, I rarely need a detailed profile to get a reasonable > idea of what subsystem to stare at, and then I spend days looking at a > relatively isolated reproduction. I understand it that way: callee based is good when you look for a specific issue to resolve and caller based is better when you want an overview of an object. That makes sense. > > Anyways, for profiling user-land applications, I suspect from my > conversations with users that "caller" is the more common expectation. I wonder what would be the result if people were to use callchains that only involve the user part. Maybe they prefer caller based because they don't care about the kernel part. > > What about providing a hotkey, in the tui, to toggle caller/callee > > views, and another hotkey to save that in ~/.perfconfig so that becomes > > the new default? > > > > OMG, being able to toggle between caller and callee in the tui would be > *awesome*. Regardless of which default you end up with, I'd love to have > this feature. Indeed it could be interesting. I we want that toggling to be fast enough, we need to process both callee and caller trees on hists processing, and not rebuild the entire tree each time we toggle (which would be costly). That's fairly possible to do and it might not even impact much the loading time if we do this in multithread. Thanks!