linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Taeung Song <treeze.taeung@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org, namhyung@kernel.org,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Add 'perf-config' command
Date: Fri, 10 Apr 2015 10:53:34 +0200	[thread overview]
Message-ID: <20150410085334.GA31326@krava.brq.redhat.com> (raw)
In-Reply-To: <1428589591-22838-1-git-send-email-treeze.taeung@gmail.com>

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]$ 

      parent reply	other threads:[~2015-04-10  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 14:26 [PATCH 1/2] perf tools: Add 'perf-config' command Taeung Song
2015-04-09 14:26 ` [PATCH 2/2] perf tools: Add a option 'remove' to perf-config and features which get or set a config variable Taeung Song
2015-04-10  9:31   ` Jiri Olsa
2015-04-12 14:45     ` Taewoong Song
2015-04-09 15:57 ` [PATCH 1/2] perf tools: Add 'perf-config' command Arnaldo Carvalho de Melo
2015-04-10  8:53 ` Jiri Olsa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410085334.GA31326@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=treeze.taeung@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).