From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932633AbbJIV4d (ORCPT ); Fri, 9 Oct 2015 17:56:33 -0400 Received: from mail.kernel.org ([198.145.29.136]:43414 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457AbbJIV4c (ORCPT ); Fri, 9 Oct 2015 17:56:32 -0400 Date: Fri, 9 Oct 2015 18:56:26 -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: <20151009215626.GM14409@kernel.org> References: <1444079018-31421-1-git-send-email-acme@kernel.org> <1444079018-31421-14-git-send-email-acme@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 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? > # perf report -n --stdio > [...] > 16.87% 334 iperf [kernel.kallsyms] [k] copy_user_enhanced_fast_string > | > --- 0x7f0683ba1ccd > system_call_fastpath > sys_write > vfs_write > do_sync_write > sock_aio_write > do_sock_write.isra.10 > inet_sendmsg > copy_user_enhanced_fast_string > [...] > > That's upside down. The current default preserves ordering from the > informational line onwards: > > # perf report -n --stdio -g fractal,0.5,callee > [...] > 16.87% 334 iperf [kernel.kallsyms] [k] copy_user_enhanced_fast_string > | > --- copy_user_enhanced_fast_string > | > |--64.37%-- inet_sendmsg > | do_sock_write.isra.10 > | sock_aio_write > | do_sync_write > | vfs_write > | sys_write > | system_call_fastpath > | 0x7f0683ba1ccd > > ... Those are just short examples. Another profile I'm working on now > gets really messy on "perf report -n --stdio"; eg: > > perf report -n --stdio -g graph,0.5,caller > 94.80% 0.10% 2 iperf [kernel.vmlinux] [k] > entry_SYSCALL_64_fastpath > | > |--94.70%-- entry_SYSCALL_64_fastpath > | | > > The current default never gets beyond 5 levels deep. The new default > goes to 25 levels. At least with perf report I can override the > default using "-g". perf script doesn't support that. Ok, so changing defaults is not nice, but in this case looked sensible, ends up not being for you... > Can this patch please preserve the callee ordering for non-interactive > output? (perf script, perf report -n --stdio). Thanks, If this is because you do scripting on it? Wouldn't it be better to not depend on defaults, always specify what you want and then the bug would be constrained to 'perf script' where we need to provide a way to change the default? - Arnaldo