[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150410085334.GA31326@krava.brq.redhat.com>
Date: Fri, 10 Apr 2015 10:53:34 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Taeung Song <treeze.taeung@...il.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, namhyung@...nel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [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@...il.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@...va perf]$ ./perf config -
Error: '-' is not supported.
usage: perf config [options]
Action
-a, --all print all configurations
[jolsa@...va perf]$ ./perf config krava
[jolsa@...va perf]$
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists