lkml.org 
[lkml]   [2015]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf tools: Add 'perf-config' command
On Thu, Apr 09, 2015 at 11:26:30PM +0900, Taeung Song wrote:
> The perf configuration file contain many variables which can make
> the perf command's action more effective and more skilful.
> 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 '--all' option and a document for it.

hi,
any chance the 'perf config -a' would display current config PLUS
all possible keys with their default values? Like total overview
of the config options.. I mean all the options you described in
the doc.

While 'perf config' would display only those options you have
defined in the config file..

It could be part as next patch of course as it might need
more coding.

one nit below

thanks,
jirka

>
> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
> ---
> tools/perf/Build | 1 +
> tools/perf/Documentation/perf-config.txt | 433 ++++++++++++++++++++++++++++
> tools/perf/Documentation/perfconfig.example | 65 ++++-
> tools/perf/builtin-config.c | 68 +++++

SNIP

> + return 0;
> +}
> +
> +int cmd_config(int argc, const char **argv, const char *prefix __maybe_unused)
> +{
> + int ret = 0;
> +
> + argc = parse_options(argc, argv, config_options, config_usage,
> + PARSE_OPT_STOP_AT_NON_OPTION);
> + if (argc > 0) {
> + if (strcmp(argv[0], "-") == 0) {
> + pr_warning(" Error: '-' is not supported.\n");
> + usage_with_options(config_usage, config_options);
> + }
> + }

for some reason you display error only for '-', and not for unknow argument

[jolsa@krava perf]$ ./perf config -
Error: '-' is not supported.

usage: perf config [options]

Action
-a, --all print all configurations

[jolsa@krava perf]$ ./perf config krava
[jolsa@krava perf]$


\
 
 \ /
  Last update: 2015-04-10 11:21    [W:0.079 / U:1.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site