Re: [PATCH 13/16] perf callchain: Switch default to 'graph,0.5,caller'

From: Arnaldo Carvalho de Melo
Date: Tue Oct 20 2015 - 08:01:23 EST


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
> <arnaldo.melo@xxxxxxxxx> 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
> >> <arnaldo.melo@xxxxxxxxx> 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
> >> > > <acme@xxxxxxxxxx> wrote:
> >> > > > From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

> >> > > > 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.<N> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/