Re: [PATCH v10 01/22] perf tools: Add 'perf-config' command
From: Arnaldo Carvalho de Melo
Date: Mon Nov 09 2015 - 09:02:34 EST
Em Mon, Nov 09, 2015 at 10:58:06AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 09, 2015 at 11:32:54AM +0900, Taeung Song escreveu:
> > The perf configuration file contains many variables to change various
> > aspects of each of its tools, including output, disk usage, etc.
> > 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 '--list' option.
> > perf config [options]
> > display current perf config variables.
> > # perf config
> > or
> > # perf config -l | --list
> So, trying to use it:
> $ perf config
> It does nothing, it should either list the configuration values, I think
And if I go ahead and do:
$ perf config -h
Usage: perf config [options]
-l, --list show current config variables
Cool, tells me what is available, but then:
$ perf config -l
I suggest you print instead:
$ perf config -l
# Nothing configured, please check your ~/.perfconfig file
This way you can redirect the output and it will always produce
something that can be used as a ~/.perfconfig file.
It will furthermore inform the user that ~/.perfconfig is the place to
add its configs.
I haven't checked, but do you have something like a :
$ perf config --skel > ~/.perfconfig
That would produce an skeleton with the possible config variables so
that one could then use $EDITOR ~/.perfconfig and go on setting the
Ideally that would produce something with comments over the variables
explaining what each of those options configures.
> probably showing just what is in the ~/.perfconfig files, i.e. things
> the user explicitely changed, or show an usage message, like all the
> other tools, for instance:
> $ perf stat
> Usage: perf stat [<options>] [<command>]
> -a, --all-cpus system-wide collection from all CPUs
> -A, --no-aggr disable CPU count aggregation
> -B, --big-num print large numbers with thousands' separators
> -C, --cpu <cpu> list of cpus to monitor in system-wide
> 'perf evlist' alternatively does, like perf list, show what a default
> $ perf evlist
> $ perf list | head -5
> branch-instructions OR branches [Hardware event]
> branch-misses [Hardware event]
> bus-cycles [Hardware event]
> cache-misses [Hardware event]
> cache-references [Hardware event]
> While 'perf config' does nothing :-\
> I suggest you do just like 'perf evlist' and 'perf list'.
> - Arnaldo
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/