Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbbKIOCb (ORCPT ); Mon, 9 Nov 2015 09:02:31 -0500 Received: from mail.kernel.org ([198.145.29.136]:33142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbbKIOC2 (ORCPT ); Mon, 9 Nov 2015 09:02:28 -0500 Date: Mon, 9 Nov 2015 11:02:24 -0300 From: Arnaldo Carvalho de Melo To: Taeung Song Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Namhyung Kim , Jiri Olsa Subject: Re: [PATCH v10 01/22] perf tools: Add 'perf-config' command Message-ID: <20151109140224.GJ13236@kernel.org> References: <1447036395-18911-1-git-send-email-treeze.taeung@gmail.com> <1447036395-18911-2-git-send-email-treeze.taeung@gmail.com> <20151109135806.GI13236@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151109135806.GI13236@kernel.org> 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 Content-Length: 3125 Lines: 102 Em Mon, Nov 09, 2015 at 10:58:06AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Nov 09, 2015 at 11:32:54AM +0900, Taeung Song escreveu: > > The perf configuration file contains many variables to change various > > aspects of each of its tools, including output, disk usage, etc. > > But looking through state of configuration is difficult and > > there's no knowing what kind of other variables except variables > > in perfconfig.example exist. So This patch adds 'perf-config' > > command with '--list' option. > > > > perf config [options] > > > > display current perf config variables. > > # perf config > > or > > # perf config -l | --list > > So, trying to use it: > > $ perf config > $ > > It does nothing, it should either list the configuration values, I think And if I go ahead and do: $ perf config -h Usage: perf config [options] -l, --list show current config variables $ Cool, tells me what is available, but then: $ perf config -l $ I suggest you print instead: $ perf config -l # Nothing configured, please check your ~/.perfconfig file $ This way you can redirect the output and it will always produce something that can be used as a ~/.perfconfig file. It will furthermore inform the user that ~/.perfconfig is the place to add its configs. I haven't checked, but do you have something like a : $ perf config --skel > ~/.perfconfig That would produce an skeleton with the possible config variables so that one could then use $EDITOR ~/.perfconfig and go on setting the knobs? Ideally that would produce something with comments over the variables explaining what each of those options configures. > probably showing just what is in the ~/.perfconfig files, i.e. things > the user explicitely changed, or show an usage message, like all the > other tools, for instance: > > $ perf stat > > Usage: perf stat [] [] > > -a, --all-cpus system-wide collection from all CPUs > -A, --no-aggr disable CPU count aggregation > -B, --big-num print large numbers with thousands' separators > -C, --cpu list of cpus to monitor in system-wide > > > 'perf evlist' alternatively does, like perf list, show what a default > action: > > $ perf evlist > cycles:pp > $ > > And: > > $ perf list | head -5 > branch-instructions OR branches [Hardware event] > branch-misses [Hardware event] > bus-cycles [Hardware event] > cache-misses [Hardware event] > cache-references [Hardware event] > $ > > While 'perf config' does nothing :-\ > > I suggest you do just like 'perf evlist' and 'perf list'. > > - 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/