Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754036AbbKCDRQ (ORCPT ); Mon, 2 Nov 2015 22:17:16 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:34503 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751188AbbKCDRN (ORCPT ); Mon, 2 Nov 2015 22:17:13 -0500 Date: Tue, 3 Nov 2015 12:17:01 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Brendan Gregg , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Frederic Weisbecker , Andi Kleen , Kan Liang Subject: Re: [RFC/PATCH 0/4] perf report: Support folded callchain output (v2) Message-ID: <20151103031701.GE11498@danjae.kornet> References: <20151102213021.GA21609@kernel.org> <20151102221204.GB10949@danjae.kornet> <20151102222842.GB21609@kernel.org> <20151102224927.GA11498@danjae.kornet> <20151102230436.GD21609@kernel.org> <20151102234606.GB11498@danjae.kornet> <20151103004647.GE21609@kernel.org> <20151103013535.GD11498@danjae.kornet> <20151103014600.GH21609@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151103014600.GH21609@kernel.org> 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 Content-Length: 3128 Lines: 88 On Mon, Nov 02, 2015 at 10:46:00PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Nov 03, 2015 at 10:35:35AM +0900, Namhyung Kim escreveu: > > On Mon, Nov 02, 2015 at 09:46:47PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Tue, Nov 03, 2015 at 08:46:06AM +0900, Namhyung Kim escreveu: > > > > On Mon, Nov 02, 2015 at 08:04:36PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > I still think that this is a 'perf report' thing, but one that is > > > > > centered in callchains, and that is to be consumed by scripts, not > > > > > humans. > > > > > > > Agreed. > > > > > > > I'm just looking for a way to support it with minimal change. :) > > > > > > Hey, me too. A --no-hists flag looks like a quickie, no need to isolate > > > callchain code, or anything like that, just one long option switch and > > > we get what we need. > > > > Hmm.. okay. Let me think about the --no-hists flags then. > > > > What do you want to do if the --no-hists flags is used without folded > > callchain mode or other than --stdio? > > What the user asked it to, to not show what hist_entry__snprintf() > produces, i.e. just the callchains. > > Its left to the user to decide if that output is good for whatever > purpose it has in mind. OK, will add it in a follow-up patch after checking TUI and GTK. > > We, from this discussion, know that suppressing it when using with > folded callchains, is useful at least for Brendan's scripts :-) OK > > > And if you want to print other info in the callchains, what would be > > the output of non-folded mode? > > > I think the simplest solution would be supporting the folded mode only > > and error out other cases. Is it ok to you? > > Well, the other info, if it comes at the end, may even be useful in non > folded mode, no? At the end? Brendan wanted to have it first and I think it'd be better to show first. Anyway, this other info depends on the sort keys - IOW it cannot show task comm name if user gave sort keys without comm like '-s cpu'. So how about adding 'info' or 'context' (or whatever name it) option to -g/--call-graph to show info selected by sort keys. For example, $ perf report --no-children --stdio -s comm,dso -g folded,info --no-hists 28.63% swapper,[kernel.vmlinux] intel_idle;cpuidle_enter_state;... 11.30% swapper,[kernel.vmlinux] intel_idle;cpuidle_enter_state;... $ perf report --no-children --stdio -s pid,sym -g info ... 39.93% swapper [k] intel_idle <0:swapper,intel_idle> | |---intel_idel cpuidle_enter_state ... What do you think? Thanks, Namhyung > > If it is not, then the user will not use it, i.e. some combinations may > not produce useful results, but if we want to have more flexibility to > support usecases like Brendan's, and I think we want, without making the > existing code overly complex, then why not? > > - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/