Willy Tarreau
fc2be6968e
perf symbols: Add new option --ignore-vmlinux for perf top
...
Running "perf top" on a machine with possibly invalid or non-matching
vmlinux at the various places results in no symbol resolving despite
/proc/kallsyms being present and valid.
Add a new option --ignore-vmlinux to explicitly indicate that we do not
want to use these kernels and just use what we have (kallsyms).
Signed-off-by: Willy Tarreau <w@1wt.eu >
Cc: Ingo Molnar <mingo@redhat.com >
Link: http://lkml.kernel.org/r/20130914083259.GA3418@1wt.eu
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:42:20 -03:00
Jiri Olsa
dd96c46b5c
perf tools: Adding throttle event data struct support
...
Moving 'struct throttle_event' out of python code and making it global
as any other event.
There's no usage of throttling events in any perf commands so far
(besides python support), but we'll need this event data backup for
upcoming test.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1378031796-17892-5-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:39:18 -03:00
Jiri Olsa
b22d54b09a
perf evlist: Introduce perf_evlist__new_default function
...
Adding new common function to create evlist with default event. It
spares some code lines in automated tests.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1378031796-17892-4-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:24:34 -03:00
Jiri Olsa
27050f530d
perf tools: Add possibility to specify mmap size
...
Adding possibility to specify mmap size via -m/--mmap-pages
by appending unit size character (B/K/M/G) to the
number, like:
$ perf record -m 8K ls
$ perf record -m 2M ls
The size is rounded up appropriately to follow perf
mmap restrictions.
If no unit is specified the number provides pages as
of now, like:
$ perf record -m 8 ls
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1378031796-17892-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:24:20 -03:00
Jiri Olsa
994a1f78b1
perf tools: Check mmap pages value early
...
Move the check of the mmap_pages value to the options parsing time, so
we could rely on this value on other parts of code.
Related changes come in the next patches.
Also changes perf_evlist::mmap_len to proper size_t type.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1378031796-17892-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:24:10 -03:00
Davidlohr Bueso
f37376cd72
perf lock: Account for lock average wait time
...
While perf-lock currently reports both the total wait time and the
number of contentions, it doesn't explicitly show the average wait time.
Having this value immediately in the report can be quite useful when
looking into performance issues.
Furthermore, allowing report to sort by averages is another handy
feature to have - and thus do not only print the value, but add it to
the lock_stat structure.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-8-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:24:01 -03:00
Davidlohr Bueso
60a25cbc4a
perf lock: Limit bad rate precision
...
Two decimal precision should be enough for this.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-7-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:23:54 -03:00
Davidlohr Bueso
375eb2be55
perf lock: Redo __cmd_report
...
This function should be straightforward, and we can remove some trivial
logic by moving the functionality of read_events() into __cmd_report() -
thus allowing a new session to be properly deleted.
Since the 'info' subcommand also needs to process the recorded events,
add a 'display_info' flag to differentiate between report and info
commands.
Furthermore, this patch also calls perf_session__has_traces(), making
sure that we don't compare apples and oranges, fixing a segfault when
using an perf.data file generated by a different subcommand. ie:
./perf mem record sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.017 MB perf.data (~724 samples) ]
./perf lock report
Segmentation fault (core dumped)
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-5-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:23:48 -03:00
Davidlohr Bueso
0a98c7febf
perf lock: Plug some memleaks
...
Address some trivial leaks.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-4-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:23:39 -03:00
Davidlohr Bueso
b33492ade4
perf lock: Return proper code in report_lock_*_event
...
The report_lock_*_event() functions return -1 when lock_stat_findnew(),
thread_stat_findnew() or get_seq() return NULL. These functions only
return this value when failing to allocate memory, this return -ENOMEM
instead.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-3-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:23:32 -03:00
Davidlohr Bueso
02ad0702e5
perf lock: Remove dead code
...
No need for break statements after goto jumps.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com >
Cc: Aswin Chandramouleeswaran <aswin@hp.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1378693159-8747-2-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:23:21 -03:00
Jiri Olsa
918512b435
perf tools: Unify page_size usage
...
Making page_size global from the util object.
Removing the not needed one.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1379003976-5839-4-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:22:55 -03:00
Jiri Olsa
5283ec23a0
perf tools: Remove unused trace-event-* code
...
Removing unused trace-event-* code.
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1379003976-5839-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:15:28 -03:00
Ricardo Ribalda Delgado
9cd00941f8
perf symbols: Support for Openembedded/Yocto -dbg packages
...
On OpenEmbedded the symbol files are located under a .debug folder on
the same folder as the binary file.
This patch adds support for such files.
Without this patch on perf top you can see:
no symbols found in /usr/lib/gstreamer-1.0/libtheoraenc.so.1.1.2, maybe
install a debug package?
84.56% libtheoraenc.so.1.1.2 [.] 0x000000000000b346
With this patch symbols are shown:
19.06% libtheoraenc.so.1.1.2 [.] oc_int_frag_satd_thresh_mmxext
9.76% libtheoraenc.so.1.1.2 [.] oc_analyze_mb_mode_luma
5.58% libtheoraenc.so.1.1.2 [.] oc_qii_state_advance
4.84% libtheoraenc.so.1.1.2 [.] oc_enc_tokenize_ac
...
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com >
Acked-by: Ingo Molnar <mingo@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Waiman Long <Waiman.Long@hp.com >
Link: http://lkml.kernel.org/r/1379512574-25912-1-git-send-email-ricardo.ribalda@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:12:41 -03:00
Ramkumar Ramachandra
6e0dc374a2
perf completion: Use more comp words
...
The completion words $words and $cword are available, so we might as
well use them instead of directly accessing COMP_WORDS.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Link: http://lkml.kernel.org/r/1372941691-14684-8-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:12:31 -03:00
Ramkumar Ramachandra
c3fb6717e9
perf completion: Strip dependency on bash-completion
...
The bash-completion package defines the _get_comp_words_by_ref function.
There is no need to depend on it, as we can reimplement it like git.git
has.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Namhyung Kim <namhyung.kim@lge.com >
Link: http://lkml.kernel.org/r/1372941691-14684-7-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:12:24 -03:00
Ramkumar Ramachandra
4685a6cfae
perf completion: Strip function_exists ()
...
Use "type" to check existence consistently.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Link: http://lkml.kernel.org/r/1372941691-14684-6-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:12:06 -03:00
Ramkumar Ramachandra
7b6c48e16e
perf completion: Strip dependency on _filedir
...
_filedir is defined in the bash-completion package, but there is no need
to depend on it. Instead, call complete with multiple -o arguments
before the -F argument like in git.git's completion script.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Link: http://lkml.kernel.org/r/1372941691-14684-4-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:55 -03:00
Ramkumar Ramachandra
30079d1d5e
perf completion: Update __ltrim_colon_completions
...
The function is taken from the bash-completion package; update it to use
the latest version where colon_word doesn't miss quoting.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Link: http://lkml.kernel.org/r/1372941691-14684-3-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:48 -03:00
Ramkumar Ramachandra
1ba6e01782
perf completion: Don't dictate perf install location
...
The statement
have perf
limits the locations in which to look for the perf program. Moreover,
it depends on the bash-completion package to be installed. Replace it
with a call to `type perf`.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Link: http://lkml.kernel.org/r/1372941691-14684-2-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:40 -03:00
Arnaldo Carvalho de Melo
50c95cbd70
perf trace: Add option to show process COMM
...
Enabled by default, disable with --no-comm, e.g.:
181.821 (0.001 ms): deja-dup-monit/10784 recvmsg(fd: 8, msg: 0x7fff4342baf0, flags: PEEK|TRUNC|CMSG_CLOEXEC ) = 20
181.824 (0.001 ms): deja-dup-monit/10784 geteuid( ) = 1000
181.825 (0.001 ms): deja-dup-monit/10784 getegid( ) = 1000
181.834 (0.002 ms): deja-dup-monit/10784 recvmsg(fd: 8, msg: 0x7fff4342baf0, flags: CMSG_CLOEXEC ) = 20
181.836 (0.001 ms): deja-dup-monit/10784 geteuid( ) = 1000
181.838 (0.001 ms): deja-dup-monit/10784 getegid( ) = 1000
181.705 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: PEEK|TRUNC|CMSG_CLOEXEC) = 1256
181.710 (0.002 ms): evolution-addr/10924 geteuid( ) = 1000
181.712 (0.001 ms): evolution-addr/10924 getegid( ) = 1000
181.727 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: CMSG_CLOEXEC ) = 1256
181.731 (0.001 ms): evolution-addr/10924 geteuid( ) = 1000
181.734 (0.001 ms): evolution-addr/10924 getegid( ) = 1000
181.908 (0.002 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: PEEK|TRUNC|CMSG_CLOEXEC) = 20
181.913 (0.001 ms): evolution-addr/10924 geteuid( ) = 1000
181.915 (0.001 ms): evolution-addr/10924 getegid( ) = 1000
181.930 (0.003 ms): evolution-addr/10924 recvmsg(fd: 10, msg: 0x7fff17dc6990, flags: CMSG_CLOEXEC ) = 20
181.934 (0.001 ms): evolution-addr/10924 geteuid( ) = 1000
181.937 (0.001 ms): evolution-addr/10924 getegid( ) = 1000
220.718 (0.010 ms): at-spi2-regist/10715 sendmsg(fd: 3, msg: 0x7fffdb8756c0, flags: NOSIGNAL ) = 200
220.741 (0.000 ms): dbus-daemon/10711 ... [continued]: epoll_wait()) = 1
220.759 (0.004 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC ) = 200
220.780 (0.002 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC ) = 200
220.788 (0.001 ms): dbus-daemon/10711 recvmsg(fd: 11, msg: 0x7ffff94594d0, flags: CMSG_CLOEXEC ) = -1 EAGAIN Resource temporarily unavailable
220.760 (0.004 ms): at-spi2-regist/10715 sendmsg(fd: 3, msg: 0x7fffdb8756c0, flags: NOSIGNAL ) = 200
220.771 (0.023 ms): perf/26347 open(filename: 0xf2e780, mode: 15918976 ) = 19
220.850 (0.002 ms): perf/26347 close(fd: 19 ) = 0
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-6be5jvnkdzjptdrebfn5263n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:33 -03:00
Arnaldo Carvalho de Melo
49af9e93ad
perf trace: Beautify eventfd2 'flags' arg
...
61.168 ( 0.004 ms): 24267 eventfd2(flags: CLOEXEC|NONBLOCK) = 9
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-3hg8eajdzil077501c8f5jkw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:21 -03:00
Arnaldo Carvalho de Melo
b2cc99fdaa
perf trace: Beautify send/recv syscall 'flags' arg
...
[root@sandy ~]# perf trace -a -e recvmmsg,recvmsg,recvfrom,sendto,sendmsg,sendmmsg
6.901 (0.002 ms): 589 recvmsg(fd: 51, msg: 0x7fff35673420, flags: CMSG_CLOEXEC) = -1 EAGAIN Resource temporarily unavailable
6.966 (0.008 ms): 589 sendmsg(fd: 50, msg: 0x7fff35673230, flags: NOSIGNAL ) = 961
6.984 (0.004 ms): 979 sendmsg(fd: 3, msg: 0x7fff5b484940, flags: NOSIGNAL ) = 945
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-h25k5k50nac0ej5cl5iwgvae@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:13 -03:00
Arnaldo Carvalho de Melo
22ae5cf1c9
perf trace: Don't print zeroed args
...
This way we make the output more compact.
If somebody complain (and provide a sane reason why we would like to see
zeroes) we can make it an optional, ~/.perfconfig configurable knob.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-myqozw43hk8z2r5hsupzdk82@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:11:06 -03:00
David Ahern
7704805920
perf trace: Remove duplicate mmap entry in syscall_fmts array
...
Entries in syscall_fmts need to be in alphabetical order, and the
duplicate entry breaks bsearch on new entries around this duplicate
entry.
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/r/1378319865-55695-2-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:56 -03:00
David Ahern
4bb09192d3
perf trace: Add option to show full timestamp
...
Current timestamp shown for output is time relative to firt sample. This
patch adds an option to show the absolute perf_clock timestamp which is
useful when comparing output across commands (e.g., perf-trace to
perf-script).
Signed-off-by: David Ahern <dsahern@gmail.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/r/1378319865-55695-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:49 -03:00
Arnaldo Carvalho de Melo
c045bf02e4
perf trace: Beautify rlmimit resources
...
On the getrlimit, setrlimit and prlimit64 syscalls.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-pups75313afhn7p96qwhzs9v@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:42 -03:00
Arnaldo Carvalho de Melo
511089994e
perf trace: Beautify access 'mode' arg
...
Removing the _OK suffix and using RWX when all three bits are set, for
instance.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-ypaz9k43lyqy94679feqnv8x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:35 -03:00
Arnaldo Carvalho de Melo
a28b24b278
perf trace: Beautify socket 'type' arg
...
Taking into account the fact that the SOCK_ types can be overriden for
ABI reasons on MIPS and also masking and interpreting the socket flags
(NONBLOCK and CLOEXEC), printing whatever is left in the flags bits
as an hex number, or'ed.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-cbn57082gq9v0sbsd67edwjq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:28 -03:00
Arnaldo Carvalho de Melo
e10bce815d
perf trace: Beautify socket 'family' arg
...
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-8xuaupgmy82v7sha3l09oaux@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:20 -03:00
Arnaldo Carvalho de Melo
8bad5b0abf
perf trace: Beautify signal number arg in several syscalls
...
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-ek8w714ramabyl5jqqvjlbyb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:14 -03:00
Arnaldo Carvalho de Melo
eb5b1b1475
perf trace: Beautify rt_sigprocmask 'how' arg
...
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-e2epkc38e3x0uqmi1xie4tgc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:10:06 -03:00
Arnaldo Carvalho de Melo
80f587d5f9
perf trace: Beautify fcntl 'cmd' arg
...
This is just for the low hanging fruit 'cmd' arg, a proper beautifier
will as well use arg->mask to ignore the third arg for some of the
cmds.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-phhvcyi9vdnxw9l11tbquvru@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:09:58 -03:00
Arnaldo Carvalho de Melo
efe6b882cd
perf trace: Use strarray for ltrace's whence arg
...
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-5f9jhbq8my4ojarhtlygveox@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:09:46 -03:00
Arnaldo Carvalho de Melo
1f115cb72e
perf trace: Allow passing parms to arg formatters
...
So that we can have generic formatters that act upon specific
parameters.
Start using them with a simple string table that assumes entries
will be indexes to a string table, like with the 'which' parm
for the set and getitimer syscalls
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-r0dqhapr8j6150v1wctgg340@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:09:28 -03:00
Arnaldo Carvalho de Melo
01533e9720
perf trace: Put syscall formatter parms into struct
...
So that we can add more state to formatters without having to modify
all of them.
Example is to pass a table to a generic string formatter, like for
setitimer 'which' arg.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-zyi2esmas5wfrxznh0x0fkiz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-10-09 11:08:15 -03:00
Jiri Olsa
165108a92f
tools/perf/build: Clean up feature_print_code()
...
Remove DUMMY by making sure 'feature_print' is evaluated and thus
all messages are printed.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Link: http://lkml.kernel.org/r/20131008155110.GA15558@krava.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:04 +02:00
Ingo Molnar
aa4acf6cf1
tools/perf/build: Pass through LDFLAGS to feature tests
...
David Ahern reported that when passing in LDFLAGS=-static then
the feature checks still succeed - causing build failures down
the line because the static libraries are missing.
Solve this by passing through LDFLAGS to the feature-check
Makefile.
Reported-by: David Ahern <dsahern@gmail.com >
Tested-by: David Ahern <dsahern@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/r/20131007155129.GA1066@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:03 +02:00
Ingo Molnar
20c99e8217
tools/perf/build: Harmonize the style of the feature testcases
...
The various testcases used different styles, which was not really
visible as long as they hid in feature-tests.mak. Now that they
are out in the open make them prettier.
( Also delete the leftover, empty feature-tests.mak file. )
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-drDWk8xltndjdsespzjbhu6w@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:03 +02:00
Ingo Molnar
1f7c645ab4
tools/perf/build: Fix O=/some/dir perf.o type of targets
...
If someone specifies a single target, mixed with O=, the following way:
hubble:~/tip/tools/perf> make O=/tmp/perf util/stat.o
BUILD: Doing 'make -j8' parallel build
gcc -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k [...]
The build might even fail, if a target depends on other targets:
hubble:~/tip/tools/perf> make O=/tmp/perf perf.o
...
perf.c: In function ‘handle_options’:
perf.c:155:21: error: ‘PERF_HTML_PATH’ undeclared (first use in this function)
The correct way to invoke such targets is:
hubble:~/tip/tools/perf> make O=/tmp/perf /tmp/perf/perf.o
BUILD: Doing 'make -j8' parallel build
GEN /tmp/perf/common-cmds.h
CC /tmp/perf/perf.o
But that's unnecessary typing and it's also easy to mistakenly build into the
source directory.
To fix this remove the generic suffix rules and add redirection to $(OUTPUT)
for the most popular .o targets.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-mk0oiukmhgSbrll6chrPkkqr@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:02 +02:00
Ingo Molnar
b102420b50
tools/perf/build: Fix non-canonical directory names in O=
...
This was a long-standing bug, relative pathnames like O=dir did not fully
work in the build system:
$ make O=localdir clean
SUBDIR Documentation
../../scripts/Makefile.include:3: *** O=localdir does not exist. Stop.
make[1]: *** [clean] Error 2
make: *** [clean] Error 2
Fix this by canonizing the directory before passing it to Makefile.perf.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-hchMp1hozn9tqgswWcooxcru@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:01 +02:00
Ingo Molnar
684f434cc0
tools/perf/build: Exclude MAKEFLAGS from nested invocation
...
In case the user specifies MAKEFLAGS as an environment variable,
or uses 'make -jN' explicitly, the options can conflict and result in:
BUILD: Doing 'make -j8' parallel build
make[1]: warning: -jN forced in submake: disabling jobserver mode.
GEN common-cmds.h
make[1]: *** write jobserver: Bad file descriptor. Stop.
Make sure we invoke the main makefile in a pristine state.
Users who want to do something non-standard can use the:
make -f Makefile.perf
method to invoke the makefile.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-uen6hzTvkqqngqwjma9yoEgw@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:01 +02:00
Ingo Molnar
1c2d1d8cf4
tools/perf/build: Make sure autodep feature binaries honor the O= setting
...
Arnaldo noticed that the feature-check binaries are generated in the
config/check-features/ directory even if O= is specified.
Implement $(OUTPUT) logic for config/check-features/Makefile.
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-NLwlnv5prsubuey0vfocebym@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:49:00 +02:00
Ingo Molnar
b016a0dd08
tools/perf/build: Pass through all targets to Makefile.perf
...
Jiri reported that 'make .o' stopped working:
> [jolsa@krava perf]$ make -f Makefile perf.o
> cc -c -o perf.o perf.c
> In file included from builtin.h:4:0,
> from perf.c:9:
> util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
> compilation terminated.
> make: *** [perf.o] Error 1
This is due to GNU make having built-in rules for popular targets such
as *.o. Clear them out so that all targets as passed through to Makefile.perf.
Reported-by: Jiri Olsa <jolsa@redhat.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Link: http://lkml.kernel.org/n/tip-5wkuvmlaaxtfgepKcvRij8sh@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:59 +02:00
Ingo Molnar
3ca576a481
tools/perf/build: Collapse the test-all.c testcase
...
Simplify test-all.c by including it all the testcases via #include.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-pcZlwqq5ou7Ebvkekvhtzfbm@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:59 +02:00
Ingo Molnar
1e3f30fae7
tools/perf/build: Clean up various testcases
...
Prepare to include them into test-all.c directly, by making sure
that they build cleanly and without warnings.
Also make sure they make a certain amount of sense and don't crash
when executed.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-Mn9gsdutzopoowk3xurqpsxE@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:58 +02:00
Ingo Molnar
0648f839ff
tools/perf/build: Remove unused config/feature-tests.mak
...
Also remove try-cc et al. These got obsoleted by the split-out feature checks in
config/feature-checks/.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-Y6ailbiranadqlrl8Dfivjbi@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:57 +02:00
Ingo Molnar
1c47661a93
tools/perf/build: Split out feature checks: 'liberty', 'liberty-z', 'cplus-demangle'
...
Note that these are rarely executed tests, so we call feature_check() explicitly
and don't have them in CORE_FEATURE_CHECKS.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-pvumlx6mbtfxffgrlwO2mRcx@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:56 +02:00
Ingo Molnar
73a725f000
tools/perf/build: Standardize the various messages output by parallel make
...
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-mky0rtpwxi3ivxsvdjoOEmhr@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:56 +02:00
Ingo Molnar
bd69cc286d
tools/perf/build: Flip Makefile.parallel and Makefile.perf
...
To make it more apparent that there is not change in functionality we introduced
Makefile.parallel separately and now flip it with the main Makefile, which
moves into Makefile.perf.
The renames are:
Makefile.parallel => Makefile
Makefile => Makefile.perf
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Link: http://lkml.kernel.org/n/tip-igRfuw9ugbnnpixLd6wpptzl@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2013-10-09 08:48:55 +02:00