From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757997AbbJVOei (ORCPT ); Thu, 22 Oct 2015 10:34:38 -0400 Received: from mail-io0-f177.google.com ([209.85.223.177]:33643 "EHLO mail-io0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757781AbbJVOed (ORCPT ); Thu, 22 Oct 2015 10:34:33 -0400 MIME-Version: 1.0 In-Reply-To: References: <1445495330-25416-1-git-send-email-namhyung@kernel.org> <1445495330-25416-2-git-send-email-namhyung@kernel.org> <20151022082301.GB18916@gmail.com> From: Namhyung Kim Date: Thu, 22 Oct 2015 23:34:13 +0900 X-Google-Sender-Auth: nvMLT1ACYEwUY0LhBvvtWibR_Lo Message-ID: Subject: Re: [PATCH 2/3] perf top: Support call-graph display options also To: Taeung Song Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Peter Zijlstra , Jiri Olsa , "linux-kernel@vger.kernel.org" , David Ahern , Adrian Hunter , Borislav Petkov , Chandler Carruth , Frederic Weisbecker , Stephane Eranian , Wang Nan , Brendan Gregg Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2015 at 10:57 PM, Taeung Song wrote: > Hi, Namhyung and Ingo > >> On Oct 22, 2015, at 9:20 PM, Namhyung Kim wrote: >> >> On Thu, Oct 22, 2015 at 5:23 PM, Ingo Molnar wrote: >>> >>> * Namhyung Kim wrote: >>> >>>> Currently 'perf top --call-graph' option is same as 'perf record'. But >>>> 'perf top' also need to receive display options in 'perf report'. To do >>>> that, change parse_callchain_report_opt() to allow record options too. >>>> >>>> Now perf top can receive display options like below: >>>> >>>> $ perf top --call-graph >>>> Error: option `call-graph' requires a value >>>> >>>> Usage: perf top [] >>>> >>>> --call-graph >>>> >>>> setup and enables call-graph (stack chain/backtrace) >>>> recording: fp dwarf lbr, output_type (graph, flat, >>>> fractal, or none), min percent threshold, optional >>>> print limit, callchain order, key (function or >>>> address), add branches >>> >>> Yeah, so this fix is nice, and I think we should also do another patch to fix the >>> help text output to be the following: >>> >>> --call-graph >>> >>> >>> Set up and enable call graph (call chain, stack backtrace) recording: >>> >>> record_mode: call graph recording mode (fp|dwarf|lbr) >>> record_size: if rec_mode == dwarf, maximum depth of stack recording (bytes), >>> default: 8192 bytes. >>> print_style: call graph printing style (graph|flat|fractal|none) >>> limit: minimum call graph inclusion threshold (percent) >>> print_limit: printing threshold (percent) >>> call_order: call graph order (caller|callee) >>> sort_key: sorting key (function|address|branch) >>> >>> Default: fp,graph,0.5,0.0,caller,function >>> >>> Note that this text evolved a bit over what I sent in my previous mail. >> >> OK. I'll cook a patch to improve help message like this as well as man page. >> >> >>> >>> Also note that I think we should sync up the perf config options to be the same as >>> the option name shortcuts used in this help text. >> >> Ah, good idea. >> >>> >>> Side note: to improve perf config usability, we should probably also recognize >>> underscores in perf config entries, i.e. the following variants should both work: >>> >>> print_percent = 1 >>> print-percent = 1 >>> >>> Right now only the second one will match. >> >> Taeung, could you consider fixing this in your config patchiest? >> > > Sure, no problem. > > I thought as below. > Even if one use a print_percent variable, it will be handled like print-percent. > > Also if a user change print_percent variable by perf-config command, > print-percent variable will remain in perfconfig file. > (Because perf-config command will rewrite perfconfig file.) > > Is anything wrong ? Nop, looks good to me! Thanks, Namhyung