mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Taeung <treeze.taeung@gmail.com>
Cc: linux-kernel@vger.kernel.org, namhyung@kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH] perf config : Adding a command 'config' with a option '--list' and a document for it.
Date: Mon, 9 Mar 2015 10:18:33 +0100	[thread overview]
Message-ID: <20150309091833.GE27885@krava.brq.redhat.com> (raw)
In-Reply-To: <1425731405-12664-1-git-send-email-treeze.taeung@gmail.com>

On Sat, Mar 07, 2015 at 09:30:05PM +0900, Taeung 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 a command 'config --list' and a document for it.

this looks quite usefull, thanks for doing this!
some comments below..


missing Signed-off-by: tag


also please remove the trailing whitespace:

[jolsa@krava perf]$ git am /tmp/c/
Applying: perf config : Adding a command 'config' with a option '--list' and a document for it.
/home/jolsa/kernel.org/linux-perf/.git/rebase-apply/patch:79: trailing whitespace.
        # Color variables 
/home/jolsa/kernel.org/linux-perf/.git/rebase-apply/patch:84: trailing whitespace.
        code = blue, default 
/home/jolsa/kernel.org/linux-perf/.git/rebase-apply/patch:124: trailing whitespace.
        Color variables can appoint colors of the output which is printed out 
/home/jolsa/kernel.org/linux-perf/.git/rebase-apply/patch:127: trailing whitespace.
        and should have two values for them. If you want to set as colors 
/home/jolsa/kernel.org/linux-perf/.git/rebase-apply/patch:131: trailing whitespace.

warning: squelched 22 whitespace errors
warning: 27 lines add whitespace errors.

> ---
>  tools/perf/Build                            |   1 +
>  tools/perf/Documentation/perf-config.txt    | 350 ++++++++++++++++++++++++++++
>  tools/perf/Documentation/perfconfig.example |  63 ++++-
>  tools/perf/builtin-config.c                 |  56 +++++
>  tools/perf/builtin.h                        |   1 +
>  tools/perf/command-list.txt                 |   1 +
>  tools/perf/perf.c                           |   1 +
>  7 files changed, 462 insertions(+), 11 deletions(-)
>  create mode 100644 tools/perf/Documentation/perf-config.txt
>  create mode 100644 tools/perf/builtin-config.c
> 



> +		│1 1382:   movb   $0x1,-0x270(%rbp)
> +
> +help.*::
> +	help.format:: = man
> +		A format of manual page can be ‘man’, ‘info’, ‘web’ or ‘html’.
> +		’man’ is default.
> +	help.autocorrect:: = 0
> +		Automatically correct and execute mistyped commands after
> +		waiting for the given number of deciseconds (0.1 sec).
> +		When this option is 0 if execute a mistyped sub-command instead of ‘top’,
> +
> +		perf: 'ttop' is not a perf-command. See 'perf --help’.

please use some king of spell check, it'd catch things
like above 's/ttop/top/'

> +
> +		If this option is more than 1, the output can be such as.
> +
> +		WARNING: You called a perf program named 'ttop', which does not exist.
> +		Continuing under the assumption that you meant 'with-kcore'
> +		in 0.1 seconds automatically...
> +		Usage: perf-with-kcore <perf sub-command> <perf.data directory> [<sub-command options> [ -- <workload>]]
> +       		<perf sub-command> can be record, script, report or inject		
> +		    or: perf-with-kcore fix_buildid_cache_permissions
> +
> +hist.*::
> +	hist.percentage::
> +		A value of 'percentage' can be 'relative' or 'absolute'
> +
> +ui.*::
> +	ui.show-headers::
> +		There’re columns as header ‘Overhead’, ‘Children’, ‘Shared Object’, ‘Symbol’, ’self’.
> +		If this option is negative, they is hided.

          s/^^^/If this option is not set, they are hidden./

> +
> +call-graph.*::
> +	When sub-commands ‘top’ and ‘report’ work with -g/—-children 
> +	there’re options in control of call-graph.
> +
> +	call-graph.record-mode::
> +		The record-mode can be ‘fp’ (frame pointer) and ‘dwarf’.
> +		If using 'Dwarf style', it requires dump-size has a value.
> +
> +	call-graph.dump-size::
> +		When using dwarf into record-mode this option should have a value.
> +
> +	call-graph.print-type::
> +		The print-types can be graph (graph absolute), flat, fractal (graph relative).
SNIP


missing following variables:

man.viewer::
    ...

report.queue-size::
    option to setup the maximum allocation size for session's
    ordered events queue, if not set there's no default limit


SNIP

>  	show_nr_jumps = false
> +
> +[gtk]
> +	report = off
> +	annotate = off
> +	#top = off
> +
> +[pager]
> +	# That a 'cmd' is true mean to use "pager or less"
> +	cmd = true

hum, should this work more like:

[pager]
	report = false
	diff = true

but I've never used it, so I'm not sure ;-)


SNIP

> +
> +int cmd_config(int argc, const char **argv, const char *prefix __maybe_unused)
> +{
> +	int ret = 0;
> +	const char * const config_usage[] = {
> +		"perf config --list",
> +		NULL
> +	};
> +	const struct option options[] = {
> +		OPT_BOOLEAN('l', "list", &params.list_action, "list up current configurations"),
> +		OPT_END()

setting and getting options would be nice I guess

thanks,
jirka

  parent reply	other threads:[~2015-03-09  9:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-07 12:30 Taeung
2015-03-09  8:17 ` Namhyung Kim
2015-03-09  9:18 ` Jiri Olsa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-05  8:05 Taeung Song
2015-02-09  2:31 ` Namhyung Kim
     [not found]   ` <85D86691-A0FB-4E36-B746-48516EFDDDD0@gmail.com>
2015-02-15 14:00     ` Namhyung Kim

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=20150309091833.GE27885@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=linux-kernel@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

Powered by JetHome