Namhyung Kim
84cfac7f05
perf tools: Set and pass DOCDIR to builtin-report.c
...
It'll be used to locate perf document directory to find tips.txt in case
it's not installed on the system.
Signed-off-by: Namhyung Kim <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-01-12 12:42:07 -03:00
Namhyung Kim
14cbfbeb76
perf report: Show random usage tip on the help line
...
Currently perf report only shows a help message "For a higher level
overview, try: perf report --sort comm,dso" unconditionally (even if
the sort keys were used). Add more help tips and show randomly.
Load tips from ${prefix}/share/doc/perf-tip/tips.txt file.
$ perf report | tail
0.10% swapper [kernel.vmlinux] [k] irq_exit
0.09% swapper [kernel.vmlinux] [k] flush_smp_call_function_queue
0.08% swapper [kernel.vmlinux] [k] native_write_msr_safe
0.03% swapper [kernel.vmlinux] [k] group_sched_in
0.01% perf [kernel.vmlinux] [k] native_write_msr_safe
#
# (Tip: Search options using a keyword: perf report -h <keyword>)
#
Signed-off-by: Namhyung Kim <[email protected] >
Acked-by: Ingo Molnar <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Masami Hiramatsu <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Renamed it to perf_tip() and the parameter dirname to dirpath to fix the build on older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2016-01-08 13:15:46 -03:00
Josh Poimboeuf
096d35585b
perf tools: Provide subcmd configuration at runtime
...
Create init functions for exec_cmd.c and pager.c. This allows their
configuration to be specified at runtime so they can be split out into a
separate library which can be used by other programs. Their
configuration is stored in a shared subcmd_config struct.
Signed-off-by: Josh Poimboeuf <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/21f5f6b38da72c985a8dcfa185700d03e7eecd1d.1450193761.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-12-16 16:18:16 -03:00
Josh Poimboeuf
0a4bb5da95
perf tools: Move cmd_version() to builtin-version.c
...
Move cmd_version() to its own file so that help.c can be moved to a
library.
Signed-off-by: Josh Poimboeuf <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/e908b1b68f20ab6d8d33941d5571c23110622e60.1449548395.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-12-09 13:42:03 -03:00
Taeung Song
30862f2c57
perf tools: Add 'perf config' command
...
The perf configuration file contains many variables to change various
aspects of each of its tools, including output, disk usage, etc.
But looking at the state of configuration is difficult and there's no
documentation about config variables except for the variables in
perfconfig.example exist.
So this patch adds a 'perf-config' command with a '--list' option.
perf config [options]
display current perf config variables.
# perf config -l | --list
Signed-off-by: Taeung Song <[email protected] >
Acked-by: Namhyung Kim <[email protected] >
Cc: Jiri Olsa <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-11-23 18:31:24 -03:00
Arnaldo Carvalho de Melo
005438a8ee
perf trace: Support 'strace' syscall event groups
...
I.e.:
$ cat ~/share/perf-core/strace/groups/file
access
chmod
creat
execve
faccessat
getcwd
lstat
mkdir
open
openat
quotactl
readlink
rename
rmdir
stat
statfs
symlink
unlink
$
Then, on a quiet desktop, try running this and then moving your mouse to
see the deluge of mouse related activity:
# perf probe 'vfs_getname=getname_flags:72 pathname=filename:string'
Added new event:
probe:vfs_getname (on getname_flags:72 with pathname=filename:string)
You can now use it in all perf tools, such as:
perf record -e probe:vfs_getname -aR sleep 1
#
# trace --ev probe:vfs_getname --filter-pids 2232 -e file
0.042 (0.042 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.042 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/xterm")
0.100 (0.100 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.142 (0.018 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.142 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/index.theme")
0.192 (0.069 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.230 (0.017 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.230 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/usr/share/icons/Adwaita/cursors/xterm")
0.253 (0.041 ms): mousetweaks/2235 ... [continued]: open()) = 14
0.459 (0.008 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.459 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/left_side")
0.468 (0.017 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
Need to combine that raw_syscalls:sys_enter(open) + probe:vfs_getname +
raw_syscalls:sys_exit(open) sequence...
Now, if you're bored, please write some more syscall groups, like the ones
in 'strace' and send it our way :-)
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Milian Wolff <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-07-20 15:16:32 -03:00
Jiri Olsa
2245bf1410
perf tools: Add new 'perf data' command
...
Adding new 'perf data' command to provide operations over data files.
The 'perf data convert' sub command is coming in following patch, but
there's possibility for other useful commands like 'perf data ls' (to
display perf data file in directory in ls style).
Signed-off-by: Jiri Olsa <[email protected] >
Acked-by: Namhyung Kim <[email protected] >
Reviewed-by: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jeremie Galarneau <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Sebastian Andrzej Siewior <[email protected] >
Cc: Tom Zanussi <[email protected] >
Cc: Wang Nan <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected] >
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-25 12:42:25 -03:00
Jiri Olsa
cb4e67fdee
perf build: Add perf.o object building
...
Move the perf object building under build framework to be included in
the perf build object.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 13:11:37 -03:00
Jiri Olsa
c7355f842b
perf build: Add scripts objects building
...
Move the scripts objects building under build framework to be included
in the libperf build object.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:49:53 -03:00
Jiri Olsa
88aeea06eb
perf build: Add gtk objects building
...
Move the gtk objects building under build framework.
Add new gtk build object so it's separated from the rest of the code and
could be librarized.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:49:12 -03:00
Jiri Olsa
3b939a631b
perf build: Add ui objects building
...
Move the ui objects building under build framework to be included in the
libperf build object.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:47:04 -03:00
Jiri Olsa
709e679193
perf build: Add probe objects building
...
Move the probe objects building under build framework to be included in
the libperf build object.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:44:18 -03:00
Jiri Olsa
9352aabad1
perf build: Add libperf objects building
...
Move the util objects building under build framework.
Add the new libperf build object so it's separated from the rest of the
perf code and could be librarized.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:42:57 -03:00
Jiri Olsa
285ab8bfc6
perf build: Add builtin objects building
...
Move the rest of builtin objects (bench and test are already in)
building under build framework.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:42:09 -03:00
Jiri Olsa
f39e042a13
perf build: Add tests objects building
...
Move test objects building under build framework.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:40:32 -03:00
Jiri Olsa
72965b87c5
perf build: Add bench objects building
...
Move bench objects building under build framework and enable perf-in.o
rule.
Signed-off-by: Jiri Olsa <[email protected] >
Tested-by: Sukadev Bhattiprolu <[email protected] >
Tested-by: Will Deacon <[email protected] >
Cc: Alexis Berlemont <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-02-12 11:32:32 -03:00