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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to