25 Apr, 2017
2 commits
-
Not needed in this header, added to the places that need FILE,
putchar(), access() and a few other prototypes.Link: http://lkml.kernel.org/n/tip-xxtdsl6nsna82j7puwbdjqhs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
As it is going away from util.h, where it is not needed.
This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later
two probably should go away in favor of its kernel sources replacements.Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 Apr, 2017
2 commits
-
Removing it from util.h, part of an effort to disentangle the includes
hell, that makes changes to util.h or something included by it to cause
a complete rebuild of the tools.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
More stuff that came from git, out of the hodge-podge that is util.h
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-e3lana4gctz3ub4hn4y29hkw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
31 Mar, 2017
1 commit
-
Currently we fail in the following case:
$ unset HOME
$ ./perf record ls
$ echo $?
255It's because the config code init fails due to a missing HOME variable
value. Fix this by skipping the user config init if there's no HOME
variable value.Reported-by: Jan Stancek
Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/20170330144637.7468-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
27 Jan, 2017
2 commits
-
Previously these were being ignored, sometimes silently.
Stop doing that, emitting debug messages and handling the errors.
Testing it:
$ cat ~/.perfconfig
cat: /home/acme/.perfconfig: No such file or directory
$ perf stat -e cycles usleep 1Performance counter stats for 'usleep 1':
938,996 cycles:u
0.003813731 seconds time elapsed
$ perf top --stdio
Error:
You may not have permission to collect system-wide stats.Consider tweaking /proc/sys/kernel/perf_event_paranoid,
[ perf record: Captured and wrote 0.019 MB perf.data (7 samples) ]
[acme@jouet linux]$ perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
# Overhead Command Shared Object Symbol
# ........ ....... ................. .........................
71.77% usleep libc-2.24.so [.] _dl_addr
27.07% usleep ld-2.24.so [.] _dl_next_ld_env_entry
1.13% usleep [kernel.kallsyms] [k] page_fault
$
$ touch ~/.perfconfig
$ ls -la ~/.perfconfig
-rw-rw-r--. 1 acme acme 0 Jan 27 12:14 /home/acme/.perfconfig
$
$ perf stat -e instructions usleep 1Performance counter stats for 'usleep 1':
244,610 instructions:u
0.000805383 seconds time elapsed
$
[root@jouet ~]# chown acme.acme ~/.perfconfig
[root@jouet ~]# perf stat -e cycles usleep 1
Warning: File /root/.perfconfig not owned by current user or root, ignoring it.Performance counter stats for 'usleep 1':
937,615 cycles
0.000836931 seconds time elapsed
#Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-j2rq96so6xdqlr8p8rd6a3jx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
While propagating the errors from perf_config(), which were being
completely ignored, everything stopped working for people without a
~/.perfconfig file, because the perf_config_set__init() was considering
an error not to have a .perfconfig file, duh, fix it by checking the
errno after the failed stat() call.It should also not return an error when it says it is ignoring the file,
and also a empty file should not return an error either.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Taeung Song
Cc: Wang Nan
Fixes: 8beeb00f2c84 ("perf config: Use new perf_config_set__init() to initialize config set")
Link: http://lkml.kernel.org/n/tip-ygpbab3apbs6l8wr97xedwks@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
15 Nov, 2016
2 commits
-
To write config items to a particular config file, we should know where
is each config section and item from.Current setting functionality of perf-config use autogenerating way by
overwriting collected config items to a config file.For example, when collecting config items from user and system config
files (i.e. ~/.perfconfig and $(sysconf)/perfconfig), perf_config_set
can contain both user and system config items. So we should know where
each value is from to avoid merging user and system config items on user
config file.Signed-off-by: Taeung Song
Cc: Jiri Olsa
Cc: Nambong Ha
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Cc: Wookje Kwon
Link: http://lkml.kernel.org/r/1478241862-31230-7-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
Add setting feature that can add config variables with their values to a
config file (i.e. user or system config file) or modify config key-value
pairs in a config file. For the syntax examples:perf config [] [section.name[=value] ...]
e.g. You can set the ui.show-headers to false with
# perf config ui.show-headers=false
If you want to add or modify several config items, you can do like
# perf config annotate.show_nr_jumps=false kmem.default=slab
Committer notes:
Testing it:
$ perf config -l
top.children=true
report.children=false
$
$ perf config top.children=false
$ perf config -l
top.children=false
report.children=false
$
$ perf config kmem.default=slab
$ perf config -l
top.children=false
report.children=false
kmem.default=slab
$Signed-off-by: Taeung Song
Tested-by: Arnaldo Carvalho de Melo
Cc: Jiri Olsa
Cc: Nambong Ha
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Cc: Wookje Kwon
Link: http://lkml.kernel.org/r/1478241862-31230-5-git-send-email-treeze.taeung@gmail.com
[ Combined patch with docs update with this one ]
Signed-off-by: Arnaldo Carvalho de Melo
24 Jun, 2016
1 commit
-
Many sub-commands use perf_config() but everytime perf_config() is
called, perf_config() always read config files. (i.e. user config
'~/.perfconfig' and system config '$(sysconfdir)/perfconfig')But it is better to use the config set that already contains all config
key-value pairs to avoid this repetitive work reading the config files
in perf_config(). (the config set mean a static variable 'config_set')In other words, if new perf_config__init() is called, only first time
'config_set' is initialized collecting all configs from the config
files. And then we could use new perf_config() like old perf_config().
When a sub-command finished, free the config set by perf_config__exit()
at run_builtin().If we do, 'config_set' can be reused wherever perf_config() is called
and a feature of old perf_config() is the same as new perf_config() work
without the repetitive work that read the config files.In summary, in order to use features about configuration,
we can call the functions at perf.c and other source files as below.# initialize a config set
perf_config__init()# configure actual variables from a config set
perf_config()# eliminate allocated config set
perf_config__exit()# destroy existing config set and initialize a new config set.
perf_config__refresh()Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1466691272-24117-3-git-send-email-treeze.taeung@gmail.com
[ 'init' counterpart is 'exit', not 'finish' ]
Signed-off-by: Arnaldo Carvalho de Melo
22 Jun, 2016
1 commit
-
Probably are there since the beginning, taken from git but never used.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-lr65jeefffjeaywoapps9a6i@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
14 Jun, 2016
1 commit
-
perf_config_set__delete() purge and free the config set that contains
all config key-value pairs. But if the config set (i.e. 'set' variable
at the function) is NULL, this is wrong so handle it.Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1465389413-8936-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
07 Jun, 2016
4 commits
-
Instead of perf_config(), this function initializes config set by
reading various files: user config ~/.perfconfig and system config
$(sysconfdir)/perfconfig).If there are the same config variable in both user and system config
files, user config has higher priority than system config.Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1465291577-20973-3-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
Because of die() at perf_parse_file() a config set was freed in
collect_config(), if failed. But it is natural to free a config set
after collect_config() is done when some problems happened.So, in case of failure, lastly free a config set at perf_config_set__new()
instead of freeing the config set in collect_config().Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1465291577-20973-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
collect_config() collect all config key-value pairs from config files
and put each config info in config set. But if config set (i.e. 'set'
variable at collect_config()) is NULL, this is wrong so handle it.Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1465210380-26749-4-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
If a config file has wrong key-value pairs, the perf process will be
forcibly terminated by die() at perf_parse_file() called by
perf_config() so terminal settings can be crushed because of unusual
termination.For example:
If user config file has a wrong value 'red;default' instead of a normal
value like 'red, default' for a key 'colors.top',# cat ~/.perfconfig
[colors]
medium = red;default # wrong valueand if running sub-command 'top',
# perf top
perf process is dead by force and terminal setting is broken
with a messge like below.Fatal: bad config file line 2 in /root/.perfconfig
So fix it.
If perf_config() can return on failure without calling die()
at perf_parse_file(), this problem can be solved.
And if a config file has wrong values, show the error message
and then use default config values instead of wrong config values.Signed-off-by: Taeung Song
Tested-by: Arnaldo Carvalho de Melo
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1465210380-26749-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
14 Apr, 2016
1 commit
-
This infrastructure code was designed for upcoming features of
'perf config'.That collect config key-value pairs from user and system config files
(i.e. user wide ~/.perfconfig and system wide $(sysconfdir)/perfconfig)
to manage perf's configs.Reviewed-by: Masami Hiramatsu
Signed-off-by: Taeung Song
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1460620401-23430-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
06 Apr, 2016
1 commit
-
Fix build error on Ubuntu 12.04.5 with GCC 4.6.3.
CC util/config.o
util/config.c: In function ‘perf_buildid_config’:
util/config.c:384:15: error: declaration of ‘dirname’ shadows a global declaration [-Werror=shadow]Signed-off-by: Vinson Lee
Cc: Alexander Shishkin
Cc: Alexei Starovoitov
Cc: Jiri Olsa
Cc: Josh Poimboeuf
Cc: Peter Zijlstra
Cc: Taeung Song
Cc: Wang Nan
Fixes: 9cb5987c8227 ("perf config: Rework buildid_dir_command_config to perf_buildid_config")
Link: http://lkml.kernel.org/r/1459807659-9020-1-git-send-email-vlee@freedesktop.org
Signed-off-by: Arnaldo Carvalho de Melo
30 Mar, 2016
2 commits
-
Change the variable name 'v' to 'home' to make it more readable.
Signed-off-by: Taeung Song
Acked-by: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1459099340-16911-3-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
To avoid repeated calling perf_config() remove
buildid_dir_command_config() and add new perf_buildid_config into
perf_default_config.Because perf_config() is already called with perf_default_config at
main().Signed-off-by: Taeung Song
Acked-by: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1459099340-16911-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
12 Feb, 2016
1 commit
-
The '--system' option means $(sysconfdir)/perfconfig and '--user' means
$HOME/.perfconfig. If none is used, both system and user config file are
read. E.g.:# perf config [] [options]
With an specific config file:
# perf config --user | --system
or both user and system config file:
# perf config
Signed-off-by: Taeung Song
Cc: Jiri Olsa
Cc: Namhyung Kim
Link: http://lkml.kernel.org/r/1455126685-32367-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
18 Dec, 2015
1 commit
-
Move the subcommand-related files from perf to a new library named
libsubcmd.a.Since we're moving files anyway, go ahead and rename 'exec_cmd.*' to
'exec-cmd.*' to be consistent with the naming of all the other files.Signed-off-by: Josh Poimboeuf
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/c0a838d4c878ab17fee50998811612b2281355c1.1450193761.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
07 Aug, 2015
1 commit
-
This patch introduces [llvm] config section with 5 options. Following
patches will use then to config llvm dynamica compiling.'llvm-utils.[ch]' is introduced in this patch for holding all
llvm/clang related stuffs.Example:
[llvm]
# Path to clang. If omit, search it from $PATH.
clang-path = "/path/to/clang"# Cmdline template. Following line shows its default value.
# Environment variable is used to passing options.
#
# *NOTE*: -D__KERNEL__ MUST appears before $CLANG_OPTIONS,
# so user have a chance to use -U__KERNEL__ in $CLANG_OPTIONS
# to cancel it.
clang-bpf-cmd-template = "$CLANG_EXEC -D__KERNEL__ $CLANG_OPTIONS \
$KERNEL_INC_OPTIONS -Wno-unused-value \
-Wno-pointer-sign -working-directory \
$WORKING_DIR -c $CLANG_SOURCE -target \
bpf -O2 -o -"# Options passed to clang, will be passed to cmdline by
# $CLANG_OPTIONS.
clang-opt = "-Wno-unused-value -Wno-pointer-sign"# kbuild directory. If not set, use /lib/modules/`uname -r`/build.
# If set to "" deliberately, skip kernel header auto-detector.
kbuild-dir = "/path/to/kernel/build"# Options passed to 'make' when detecting kernel header options.
kbuild-opts = "ARCH=x86_64"Signed-off-by: Wang Nan
Acked-by: Alexei Starovoitov
Cc: Brendan Gregg
Cc: Daniel Borkmann
Cc: David Ahern
Cc: He Kuang
Cc: Jiri Olsa
Cc: Kaixu Xia
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1437477214-149684-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
09 Dec, 2014
2 commits
-
Adding --buildid-dir to be able to set specific cache directory. It's
going to be handy for buildid tests coming in shortly.Signed-off-by: Jiri Olsa
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1417460789-13874-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
There's no need to use 2 strcmp calls, one is enough.
Signed-off-by: Jiri Olsa
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1417460789-13874-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
26 Sep, 2014
2 commits
-
If we fail to parse the config file within the callback function,
the line number counter 'could be' already on the next line.This results in wrong line number report like:
$ cat ~/.perfconfig
[call-graph]
sort-key = krava
$ perf record ls
Fatal: bad config file line 3 in /home/jolsa/.perfconfigFixing this by saving the current line number for this case.
Signed-off-by: Jiri Olsa
Acked-by: Namhyung Kim
Cc: Corey Ashford
Cc: David Ahern
Cc: Ingo Molnar
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/20140923115656.GC2979@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo -
This patch adds support for following config options to ~/.perfconfig file.
[call-graph]
record-mode = dwarf
dump-size = 8192
print-type = fractal
order = callee
threshold = 0.5
print-limit = 128
sort-key = functionReviewed-by: David Ahern
Signed-off-by: Namhyung Kim
Acked-by: Jiri Olsa
Cc: David Ahern
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1411434104-5307-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
12 Aug, 2014
1 commit
-
Adding perf_config_u64 function to be able to parse 'llong' values out
of config file.Signed-off-by: Jiri Olsa
Acked-by: David Ahern
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jean Pihet
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/n/tip-ni6gqdlvw7khp74r9htvklkb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
08 Jul, 2014
1 commit
-
Adding ui.show-headers config file option to define if the histogram
entries headers will start visible or not.Currently columns headers are displayed by default, following
lines in ~/.perfconfig file will disable that:[ui]
show-headers = falseSigned-off-by: Jiri Olsa
Cc: Corey Ashford
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1403886418-5556-4-git-send-email-jolsa@kernel.org
[ renamed symbol_conf.show_headers to .show_hist_headers ]
Signed-off-by: Arnaldo Carvalho de Melo
16 Apr, 2014
1 commit
-
Add hist.percentage option for setting default value of the
symbol_conf.filter_relative. It affects the output of various perf
commands (like perf report, top and diff) only if filter(s) applied.An user can write .perfconfig file like below to show absolute
percentage of filtered entries by default:$ cat ~/.perfconfig
[hist]
percentage = absoluteAnd it can be changed through command line:
$ perf report --percentage relative
Signed-off-by: Namhyung Kim
Link: http://lkml.kernel.org/r/1397145720-8063-6-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa
11 Sep, 2012
1 commit
-
perf defines both __used and __unused variables to use for marking
unused variables. The variable __used is defined to
__attribute__((__unused__)), which contradicts the kernel definition to
__attribute__((__used__)) for new gcc versions. On Android, __used is
also defined in system headers and this leads to warnings like: warning:
'__used__' attribute ignored__unused is not defined in the kernel and is not a standard definition.
If __unused is included everywhere instead of __used, this leads to
conflicts with glibc headers, since glibc has a variables with this name
in its headers.The best approach is to use __maybe_unused, the definition used in the
kernel for __attribute__((unused)). In this way there is only one
definition in perf sources (instead of 2 definitions that point to the
same thing: __used and __unused) and it works on both Linux and Android.
This patch simply replaces all instances of __used and __unused with
__maybe_unused.Signed-off-by: Irina Tirdea
Acked-by: Pekka Enberg
Cc: David Ahern
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
[ committer note: fixed up conflict with a116e05 in builtin-sched.c ]
Signed-off-by: Arnaldo Carvalho de Melo
30 May, 2012
1 commit
-
For annotate I want to be able to have variables that are the same as
the ones representing feature toggles.Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-7rhhf6m0a72p2wja4tgv1itg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 Dec, 2011
1 commit
-
These files are part of PERF not GIT although they're come from there :)
Cc: Ingo Molnar
Cc: Johannes Schindelin
Cc: Linus Torvalds
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1323784323-2150-1-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim
Signed-off-by: Arnaldo Carvalho de Melo
28 Sep, 2011
1 commit
-
There are numerous broken references to Documentation files (in other
Documentation files, in comments, etc.). These broken references are
caused by typo's in the references, and by renames or removals of the
Documentation files. Some broken references are simply odd.Fix these broken references, sometimes by dropping the irrelevant text
they were part of.Signed-off-by: Paul Bolle
Signed-off-by: Jiri Kosina
09 Aug, 2011
1 commit
-
Just like we do already for perf.data files.
Requested-by: Ingo Molnar
Cc: Ben Hutchings
Cc: Christian Ohm
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jonathan Nieder
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-qgokmxsmvppwpc5404qhyk7e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
08 Aug, 2011
1 commit
-
In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for
configuration in the file ./config, imitating git which looks at
$GIT_DIR/config. If ./config is not a perf configuration file, it
fails, or worse, treats it as a configuration file and changes behavior
in some unexpected way."config" is not an unusual name for a file to be lying around and perf
does not have a private directory dedicated for its own use, so let's
just stop looking for configuration in the cwd. Callers needing
context-sensitive configuration can use the PERF_CONFIG environment
variable.Requested-by: Christian Ohm
Cc: 632923@bugs.debian.org
Cc: Ben Hutchings
Cc: Christian Ohm
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/20110805165838.GA7237@elie.gateway.2wire.net
Signed-off-by: Jonathan Nieder
Signed-off-by: Arnaldo Carvalho de Melo
05 Jun, 2010
1 commit
-
This patch adds the ability to specify an alternate directory to store the
buildid cache (buildids, copy of binaries). By default, it is hardcoded to
$HOME/.debug. This directory contains immutable data. The layout of the
directory is such that no conflicts in filenames are possible. A modification
in a file, yields a different buildid and thus a different location in the
subdir hierarchy.You may want to put the buildid cache elsewhere because of disk space
limitation or simply to share the cache between users. It is also useful for
remote collect vs. local analysis of profiles.This patch adds a new config option to the perfconfig file. Under the tag
'buildid', there is a dir option. For instance, if you have:$ cat /etc/perfconfig
[buildid]
dir = /var/cache/perf-buildidAll buildids and binaries are be saved in the directory specified. The perf
record, buildid-list, buildid-cache, report, annotate, and archive commands
will it to pull information out.The option can be set in the system-wide perfconfig file or in the
$HOME/.perfconfig file.Cc: David S. Miller
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Stephane Eranian
Signed-off-by: Arnaldo Carvalho de Melo
19 May, 2010
1 commit
-
Without the bloated cplus_demangle from binutils, i.e building with:
$ make NO_DEMANGLE=1 O=~acme/git/build/perf -j3 -C tools/perf/ install
Before:
text data bss dec hex filename
471851 29280 4025056 4526187 45106b /home/acme/bin/perfAfter:
[acme@doppio linux-2.6-tip]$ size ~/bin/perf
text data bss dec hex filename
446886 29232 4008576 4484694 446e56 /home/acme/bin/perfSo its a 5.3% size reduction in code, but the interesting part is in the git
diff --stat output:19 files changed, 20 insertions(+), 1909 deletions(-)
If we ever need some of the things we got from git but weren't using, we just
have to go to the git repo and get fresh, uptodate source code bits.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
16 Aug, 2009
1 commit
-
Related to a shadowed variable bug fix Valdis Kletnieks noticed
that perf does not get built with -Wshadow, which could have
helped us avoid the bug.So enable -Wshadow and also enable the following warnings on
perf builds, in addition to the already enabled -Wall -Wextra
-std=gnu99 warnings:-Wcast-align
-Wformat=2
-Wshadow
-Winit-self
-Wpacked
-Wredundant-decls
-Wstack-protector
-Wstrict-aliasing=3
-Wswitch-default
-Wswitch-enum
-Wno-system-headers
-Wundef
-Wvolatile-register-var
-Wwrite-strings
-Wbad-function-cast
-Wmissing-declarations
-Wmissing-prototypes
-Wnested-externs
-Wold-style-definition
-Wstrict-prototypes
-Wdeclaration-after-statementAnd change/fix the perf code to build cleanly under GCC 4.3.2.
The list of warnings enablement is rather arbitrary: it's based
on my (quick) reading of the GCC manpages and trying them on
perf.I categorized the warnings based on individually enabling them
and looking whether they trigger something in the perf build.
If i liked those warnings (i.e. if they trigger for something
that arguably could be improved) i enabled the warning.If the warnings seemed to come from language laywers spamming
the build with tons of nuisance warnings i generally kept them
off. Most of the sign conversion related warnings were in
this category. (A second patch enabling some of the sign
warnings might be welcome - sign bugs can be nasty.)I also kept warnings that seem to make sense from their manpage
description and which produced no actual warnings on our code
base. These warnings might still be turned off if they end up
being a nuisance.I also left out a few warnings that are not supported in older
compilers.[ Note that these changes might break the build on older
compilers i did not test, or on non-x86 architectures that
produce different warnings, so more testing would be welcome. ]Reported-by: Valdis.Kletnieks@vt.edu
Cc: Peter Zijlstra
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar
01 Jul, 2009
1 commit
-
Enable -Wextra. This found a few real bugs plus a number
of signed/unsigned type mismatches/uncleanlinesses. It
also required a few annotationsAll things considered it was still worth it so lets try with
this enabled for now.Cc: Peter Zijlstra
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar