From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751933AbbJTMAv (ORCPT ); Tue, 20 Oct 2015 08:00:51 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:56072 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbbJTMAu (ORCPT ); Tue, 20 Oct 2015 08:00:50 -0400 Date: Tue, 20 Oct 2015 09:00:34 -0300 From: Arnaldo Carvalho de Melo To: Brendan Gregg Cc: Ingo Molnar , LKML , Adrian Hunter , Borislav Petkov , Chandler Carruth , David Ahern , Frederic Weisbecker , Jiri Olsa , Namhyung Kim , Stephane Eranian , Wang Nan Subject: Re: [PATCH 13/16] perf callchain: Switch default to 'graph,0.5,caller' Message-ID: <20151020120033.GB5119@kernel.org> References: <1444079018-31421-1-git-send-email-acme@kernel.org> <1444079018-31421-14-git-send-email-acme@kernel.org> <20151009215626.GM14409@kernel.org> <20151009222504.GN14409@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Oct 19, 2015 at 05:16:53PM -0700, Brendan Gregg escreveu: > On Fri, Oct 9, 2015 at 3:25 PM, Arnaldo Carvalho de Melo > wrote: > > Em Fri, Oct 09, 2015 at 03:10:29PM -0700, Brendan Gregg escreveu: > >> On Fri, Oct 9, 2015 at 2:56 PM, Arnaldo Carvalho de Melo > >> wrote: > >> > Em Fri, Oct 09, 2015 at 01:34:33PM -0700, Brendan Gregg escreveu: > >> > > On Mon, Oct 5, 2015 at 2:03 PM, Arnaldo Carvalho de Melo > >> > > wrote: > >> > > > From: Arnaldo Carvalho de Melo > >> > > > Which is the most common default found in other similar tools. > >> > > Interactive tools, sure, like the perf report TUI. > >> > > But this also changes the ordering of the non-interactive tools which > >> > > dump stacks: "perf report -n --stdio" and "perf script". The most > >> > > common default for dumping stacks is caller. Eg: > >> > And you use that for scripting? > >> Yes; how I typically CPU profile: > >> git clone https://github.com/brendangregg/FlameGraph > >> cd FlameGraph > >> perf record -F 99 -a -g -- sleep 60 > >> perf script | ./stackcollapse-perf.pl | /flamegraph.pl > flame.svg > >> Then open flame.svg in a browser and click around. Try it. :) > > Should've already, guess there are things to merge and save you some > > time :) > >> But it's not just scripting; We often email around "perf report -n > >> --stdio" output, or attach it to tickets, when working on an issue. > >> Easier than trying to grab the right TUI screenshot. > > Well, that is something we need to change... But then, are you aware of > > 'P' in the TUI? It allows you to go, expand whatever callchains you deem > > necessary and then press P and the current state of the UI will be > > dumped to a perf.hist. file. I.e. no need to get a png screenshot nor > > to copy things with gpm like stuff. > > [...] > I didn't know about 'P', thanks. I still find it quicker to "perf > report -n --stdio", then browse with my eyes and the scroll wheel. > (Then use a flame graph if the output isn't trivial to understand.) > ... Just to express a callee order preference differently (at least > for the text dumping outputs), it's showing what's running (first few > frames) followed by how we got there. And that's the order I'm usually > wanting to know them... I still think it's the order printed by most > other text-based tools, although GUIs (like those with tree views) are > probably more usually caller order. So are you advocating different defaults, one for --stdio (callee), another for --tui, --gtk (caller)? This is all configurable via ~/.perfconfig :-\ Indeed, finding a default that is deemed adequate for most people is, ho-hum, difficult 8-) Ingo, what do you think? - Arnaldo