Masami Hiramatsu
631c9def80
perf probe: Support --line option to show probable source-code lines
...
Add --line option to support showing probable source-code lines.
perf probe --line SRC:LN[-LN|+NUM]
or
perf probe --line FUNC[:LN[-LN|+NUM]]
This option shows source-code with line number if the line can
be probed. Lines without line number (and blue color) means that
the line can not be probed, because debuginfo doesn't have the
information of those lines.
The argument specifies the range of lines, "source.c:100-120"
shows lines between 100th to l20th in source.c file. And
"func:10+20" shows 20 lines from 10th line of func function.
e.g.
# ./perf probe --line kernel/sched.c:1080
<kernel/sched.c:1080>
*
* called with rq->lock held and irqs disabled
*/
static void hrtick_start(struct rq *rq, u64 delay)
{
struct hrtimer *timer = &rq->hrtick_timer;
1086 ktime_t time = ktime_add_ns(timer->base->get_time(), delay);
hrtimer_set_expires(timer, time);
1090 if (rq == this_rq()) {
1091 hrtimer_restart(timer);
1092 } else if (!rq->hrtick_csd_pending) {
1093 __smp_call_function_single(cpu_of(rq), &rq->hrtick_csd,
1094 rq->hrtick_csd_pending = 1;
If you specifying function name, this shows function-relative
line number.
# ./perf probe --line schedule
<schedule:0>
asmlinkage void __sched schedule(void)
1 {
struct task_struct *prev, *next;
unsigned long *switch_count;
struct rq *rq;
int cpu;
need_resched:
preempt_disable();
9 cpu = smp_processor_id();
10 rq = cpu_rq(cpu);
11 rcu_sched_qs(cpu);
12 prev = rq->curr;
13 switch_count = &prev->nivcsw;
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Mike Galbraith <efault@gmx.de >
LKML-Reference: <20100106144534.27218.77939.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:14 +01:00
Masami Hiramatsu
6964cd2c8e
perf tools: Enhance glob string matching
...
Enhance strglobmatch() for supporting character classes([CHARS],
complementation and ranges are also supported) and escaped
special characters (\*, \? etc).
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Mike Galbraith <efault@gmx.de >
LKML-Reference: <20100105224724.19431.56271.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:14 +01:00
Masami Hiramatsu
fb1d2edf7e
perf tools: Support tracepoint glob matching
...
Support glob wildcard when selecting tracepoint events by -e
option. Without this patch, perf-tools supports 'GROUP:*:record'
syntax for selecting all tracepoints under GROUP group.
With this patch, user can choose tracepoints more flexibly by using
partial wildcards, e.g. 'block:*bio*:record'.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Mike Galbraith <efault@gmx.de >
LKML-Reference: <20100105224717.19431.68972.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:13 +01:00
Masami Hiramatsu
72041334b8
perf probe: Show probe list in pager
...
Show probe list in pager, because the list can be longer than
a page.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Mike Galbraith <efault@gmx.de >
LKML-Reference: <20100105224710.19431.61542.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:13 +01:00
Masami Hiramatsu
bbaa46fac6
perf probe: Remove newline from die()
...
Remove newline from die(), because it is automatically added.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Mike Galbraith <efault@gmx.de >
LKML-Reference: <20100105224703.19431.42475.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:13 +01:00
Arnaldo Carvalho de Melo
56b03f3c4d
perf tools: Handle relocatable kernels
...
DSOs don't have this problem because the kernel emits a
PERF_MMAP for each new executable mapping it performs on
monitored threads.
To fix the kernel case we simulate the same behaviour, by having
'perf record' to synthesize a PERF_MMAP for the kernel, encoded
like this:
[root@doppio ~]# perf record -a -f sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.344 MB perf.data (~15038 samples) ]
[root@doppio ~]# perf report -D | head -10
0xd0 [0x40]: event: 1
.
. ... raw event: size 64 bytes
. 0000: 01 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 ......@........
. 0010: 00 00 00 81 ff ff ff ff 00 00 00 00 00 00 00 00 ...............
. 0020: 00 00 00 00 00 00 00 00 5b 6b 65 72 6e 65 6c 2e ........ [kernel
. 0030: 6b 61 6c 6c 73 79 6d 73 2e 5f 74 65 78 74 5d 00 kallsyms._text]
. 0xd0
[0x40]: PERF_RECORD_MMAP 0/0: [0xffffffff81000000((nil)) @ (nil)]: [kernel.kallsyms._text]
I.e. we identify such event as having:
.pid = 0
.filename = [kernel.kallsyms.REFNAME]
.start = REFNAME addr in /proc/kallsyms at 'perf record' time
and use now a hardcoded value of '.text' for REFNAME.
Then, later, in 'perf report', if there are any kernel hits and
thus we need to resolve kernel symbols, we search for REFNAME
and if its address changed, relocation happened and we thus must
change the kernel mapping routines to one that uses .pgoff as
the relocation to apply.
This way we use the same mechanism used for the other DSOs and
don't have to do a two pass in all the kernel symbols.
Reported-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com >
LKML-Reference: <1262717431-1246-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:11 +01:00
Arnaldo Carvalho de Melo
de1764892a
perf session: Keep pointers to the vmlinux maps
...
So that tools such as 'perf probe' don't have to lookup
'[kernel.kallsyms]' but instead access them directly after
perf_session__create_kernel_maps or
map_groups__create_kernel_maps.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262629169-22797-4-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:10 +01:00
Arnaldo Carvalho de Melo
f92cb24c78
perf tools: Create write_padded routine out of __dsos__write_buildid_table
...
Will be used by other options where padding is needed.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262629169-22797-3-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:09 +01:00
Arnaldo Carvalho de Melo
36a3e6461a
perf symbols: Export symbol_type__is_a
...
Will be needed by the new HEADER_DSO_INFO feature that will be a
HEADER_BUILD_ID superset, replacing it.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262629169-22797-2-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:09 +01:00
Arnaldo Carvalho de Melo
682b335a5b
perf symbols: Generalise the kallsyms parsing routine
...
Will be used to find an specific symbol by name on 'perf record'
to support relocation reference symbols to support relocatable
kernels.
Still have to conver the perf trace tools to use it instead of
their current reimplementation.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262629169-22797-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-01-13 10:09:08 +01:00
Arnaldo Carvalho de Melo
ae99fb2c33
perf header: perf_header__push_event() shouldn't die
...
Just propagate eventual errors.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262047716-23171-2-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-30 11:59:57 +01:00
Arnaldo Carvalho de Melo
769885f372
perf header: Do_read shouldn't die
...
Propagate the errors instead, its callers already propagate
other errors.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1262047716-23171-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-30 11:59:56 +01:00
Liming Wang
63bbd5e2d5
perf probe: Change CONFIG_KPROBE_TRACER to CONFIG_KPROBE_EVENT
...
make the config name consistent
Signed-off-by: Liming Wang <liming.wang@windriver.com >
Acked-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
LKML-Reference: <1262075829-16257-3-git-send-email-liming.wang@windriver.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-30 11:59:34 +01:00
Liming Wang
41bdcb23da
perf tools: Unify event type description
...
make event type description to a unified array and
the array index consistent to perf_type_id.
Signed-off-by: Liming Wang <liming.wang@windriver.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
LKML-Reference: <1262075829-16257-1-git-send-email-liming.wang@windriver.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-30 11:58:53 +01:00
Xiao Guangrong
9967411e5b
perf trace: Fix forgotten close of file/dir
...
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Clark Williams <williams@redhat.com >
Cc: John Kacur <jkacur@redhat.com >
LKML-Reference: <4B387122.7090801@cn.fujitsu.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 10:36:36 +01:00
Xiao Guangrong
61be3e59ba
perf trace: Clean up find_debugfs()
...
Remove redundant code for 'perf trace'
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Clark Williams <williams@redhat.com >
Cc: John Kacur <jkacur@redhat.com >
LKML-Reference: <4B3870DE.7090500@cn.fujitsu.com >
[ v2: resolved conflicts with recent changes ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 10:36:36 +01:00
Xiao Guangrong
29c52aa230
perf tools: Mount debugfs automatically
...
Mount debugfs filesystem under '/sys/kernel/debug', if it's not
mounted.
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Clark Williams <williams@redhat.com >
Cc: John Kacur <jkacur@redhat.com >
LKML-Reference: <4B387090.7080407@cn.fujitsu.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 10:36:36 +01:00
Ulrich Drepper
659d8cfbb2
perf tools: Do a few more directory handling optimizations
...
A few more optimizations for perf when dealing with directories.
Some of them significantly cut down the work which has to be
done. d_type should always be set; otherwise fix the kernel
code. And there are functions available to parse fstab-like
files, so use them.
Signed-off-by: Ulrich Drepper <drepper@redhat.com >
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi >
Cc: a.p.zijlstra@chello.nl
Cc: acme@redhat.com
Cc: eranian@google.com
Cc: fweisbec@gmail.com
Cc: lizf@cn.fujitsu.com
Cc: paulus@samba.org
Cc: xiaoguangrong@cn.fujitsu.com
LKML-Reference: <200912192140.nBJLeSfA028905@hs20-bc2-1.build.redhat.com >
[ v2: two small stylistic fixlets ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 10:18:37 +01:00
Arnaldo Carvalho de Melo
4cf40131a5
perf record: Introduce a symtab cache
...
Now a cache will be created in a ~/.debug debuginfo like
hierarchy, so that at the end of a 'perf record' session all the
binaries (with build-ids) involved get collected and indexed by
their build-ids, so that perf report can find them.
This is interesting when developing software where you want to
do a 'perf diff' with the previous build and opens avenues for
lots more interesting tools, like a 'perf diff --graph' that
takes more than two binaries into account.
Tunables for collecting just the symtabs can be added if one
doesn't want to have the full binary, but having the full binary
allows things like 'perf rerecord' or other tools that can
re-run the tests by having access to the exact binary in some
perf.data file, so it may well be interesting to keep the full
binary there.
Space consumption is minimised by trying to use hard links, a
'perf cache' tool to manage the space used, a la ccache is
required to purge older entries.
With this in place it will be possible also to introduce new
commands, 'perf archive' and 'perf restore' (or some more
suitable and future proof names) to create a cpio/tar file with
the perf data and the files in the cache that _had_ perf hits of
interest.
There are more aspects to polish, like finding the right vmlinux
file to cache, etc, but this is enough for a first step.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-10-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:36 +01:00
Arnaldo Carvalho de Melo
55aa640f54
perf session: Remove redundant prefix & suffix from perf_event_ops
...
Since now all that we have are perf event handlers, leave just
the name of the event.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-9-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:35 +01:00
Arnaldo Carvalho de Melo
f7d87444e6
perf session: Move full_paths config to symbol_conf
...
Now perf_event_ops has just that, event handlers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-8-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:35 +01:00
Arnaldo Carvalho de Melo
31d337c4ee
perf session: Move total_unknown to perf_session->unknown events
...
As this is a session property, not belonging to perf_event_ops,
that can be shared by many perf_session instances.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-7-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:34 +01:00
Arnaldo Carvalho de Melo
d549c76901
perf session: Remove sample_type_check from event_ops
...
This is really something tools need to do before asking for the
events to be processed, leaving perf_session__process_events to
do just that, process events.
Also add a msg parameter to perf_session__has_traces() so that
the right message can be printed, fixing a regression added by
me in the previous cset (right timechart message) and also
fixing 'perf kmem', that was not asking if 'perf kmem record'
was ran.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-6-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:34 +01:00
Arnaldo Carvalho de Melo
27295592c2
perf session: Share the common trace sample_check routine as perf_session__has_traces
...
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-5-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:33 +01:00
Arnaldo Carvalho de Melo
4a58e61161
perf tools: Move the map class definition to a separate header
...
And this resulted in the need for adding some missing includes
in some places that were getting the definitions needed out of
sheer luck.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-4-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:33 +01:00
Arnaldo Carvalho de Melo
06aae59003
perf session: Move the event processing routines to session.c
...
No need for an extra "data_map" file since the routines there
operate mainly on a perf_session instance.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261957026-15580-3-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-28 09:03:32 +01:00
Arnaldo Carvalho de Melo
b5b60fda1e
perf session: Make events_stats u64 to avoid overflow on 32-bit arches
...
Pekka Enberg reported weird percentages in perf report. It
turns out we are overflowing a 32-bit variables in struct
events_stats on 32-bit architectures.
Before:
[acme@ana linux-2.6-tip]$ perf report -i pekka.perf.data 2> /dev/null | head -10
281.96% Xorg b710a561 [.] 0x000000b710a561
140.15% Xorg [kernel] [k] __initramfs_end
51.56% metacity libgobject-2.0.so.0.2000.1 [.] 0x00000000026e46
35.12% evolution libcairo.so.2.10800.6 [.] 0x000000000203bd
33.84% metacity libpthread-2.9.so [.] 0x00000000007a3d
After:
[acme@ana linux-2.6-tip]$ perf report -i pekka.perf.data 2> /dev/null | head -10
30.04% Xorg b710a561 [.] 0x000000b710a561
14.93% Xorg [kernel] [k] __initramfs_end
5.49% metacity libgobject-2.0.so.0.2000.1 [.] 0x00000000026e46
3.74% evolution libcairo.so.2.10800.6 [.] 0x000000000203bd
3.61% metacity libpthread-2.9.so [.] 0x00000000007a3d
Reported-by: Pekka Enberg <penberg@cs.helsinki.fi >
Tested-by: Pekka Enberg <penberg@cs.helsinki.fi >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1261148583-20395-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-18 16:22:52 +01:00
Masami Hiramatsu
b7702a2136
perf probe: Check new event name
...
Check new event name is same syntax as a C symbol in perf command.
In other words, checking the name is as like as other tracepoint
events.
This can prevent user to create an event with useless name (e.g.
foo|bar, foo*bar).
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
LKML-Reference: <20091216222415.14459.71383.stgit@dhcp-100-2-132.bos.redhat.com >
[ v2: minor cleanups ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-17 09:42:44 +01:00
Masami Hiramatsu
27f3b24de0
perf probe: Fix libdwarf include path for Debian
...
Fix libdwarf include path to fit debian-like systems too.
Borislav Petkov reported:
> even after installing libdwarf-dev on my debian box here,
> make in tools/perf/ still complains that it cannot find libdwarf:
>
> Makefile:491: No libdwarf.h found or old libdwarf.h found, disables dwarf
> support. Please install libdwarf-dev/libdwarf-devel >= 20081231
>
> The problem is that the include path on debian is not
> /usr/include/libdwarf/ but simply /usr/include because the debian
> package libdwarf-dev puts the headers straight into
> /usr/include.
This patch adds -I/usr/include/libdwarf to BASIC_CFLAGS
and fix probe-finder.h to include just libdwarf.h/dwarf.h.
This patch also adds a workaround for the undefined _MIPS_SZLONG
bug in libdwarf.h.
Reported-by: Borislav Petkov <borislav.petkov@amd.com >
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: Gabor Gombas <gombasg@sztaki.hu >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
LKML-Reference: <20091216221618.13816.83296.stgit@dhcp-100-2-132.bos.redhat.com >
[ v2: small stylistic fixlets to probe-finder.h ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-17 08:06:41 +01:00
Arnaldo Carvalho de Melo
9b33827de6
perf diff: Percent calcs should use double values
...
Otherwise we do integer math and the delta values round up to
multiples of 1.0%.
Also, calculate absolute values. Things look precise now:
$ perf report -i perf.data.old --sort dso,symbol | head -13
9.02% libc-2.10.1.so [.] _IO_vfprintf_internal
4.88% find [.] 0x00000000014af0
2.91% [kernel] [k] __kmalloc
2.85% [kernel] [k] ext4_htree_store_dirent
2.50% libc-2.10.1.so [.] __GI_memmove
2.44% [kernel] [k] half_md4_transform
2.43% [kernel] [k] _spin_lock
2.33% [kernel] [k] system_call
$ perf report -i perf.data --sort dso,symbol | head -13
8.55% libc-2.10.1.so [.] _IO_vfprintf_internal
3.11% [kernel] [k] __kmalloc
3.07% [kernel] [k] ext4_htree_store_dirent
2.66% find [.] 0x00000000016bcf
2.61% [kernel] [k] _atomic_dec_and_lock
2.46% [kernel] [k] half_md4_transform
2.41% libc-2.10.1.so [.] __GI_memmove
2.30% find [.] 0x00000000009219
$ perf diff | head -13
9.02% -0.47% libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% +0.20% [kernel] [k] __kmalloc
2.85% +0.23% [kernel] [k] ext4_htree_store_dirent
1.99% +0.62% [kernel] [k] _atomic_dec_and_lock
2.44% +0.02% [kernel] [k] half_md4_transform
2.50% -0.09% libc-2.10.1.so [.] __GI_memmove
1.88% +0.01% [kernel] [k] __d_lookup
2.43% -0.75% [kernel] [k] _spin_lock
0.97% +0.62% [kernel] [k] path_get
1.99% -0.42% libc-2.10.1.so [.] _int_malloc
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260981109-2621-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 18:29:10 +01:00
Arnaldo Carvalho de Melo
c351c28161
perf diff: Use perf_session__fprintf_hists just like 'perf record'
...
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 16:53:37 +01:00
Arnaldo Carvalho de Melo
3e6055ab98
perf session: Move perf report specific hits out of perf_session__fprintf_hists
...
Those don't make sense for tools such as 'perf diff'.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260973631-28035-2-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 16:51:50 +01:00
Arnaldo Carvalho de Melo
4ecf84d086
perf tools: Move hist entries printing routines from perf report
...
Will be used in other tools such as 'perf diff'.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260973631-28035-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 16:51:50 +01:00
Arnaldo Carvalho de Melo
d599db3fc5
perf report: Generalize perf_session__fprintf_hists()
...
Pull it out of builtin-report - further changes will be made and it
will then be reusable in 'perf diff' as well.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260914682-29652-4-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 08:53:50 +01:00
Arnaldo Carvalho de Melo
c410a33887
perf symbols: Move symbol filtering to event__preprocess_sample()
...
So that --dsos, --comm, --symbols can bem used in more tools,
like in perf diff:
$ perf record -f find / > /dev/null
$ perf record -f find / > /dev/null
$ perf diff --dsos /lib64/libc-2.10.1.so | head -5
1 +22392124 /lib64/libc-2.10.1.so _IO_vfprintf_internal
2 +6410655 /lib64/libc-2.10.1.so __GI_memmove
3 +1 +9192692 /lib64/libc-2.10.1.so _int_malloc
4 -1 -15158605 /lib64/libc-2.10.1.so _int_free
5 +45669 /lib64/libc-2.10.1.so _IO_new_file_xsputn
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260914682-29652-3-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 08:53:49 +01:00
Arnaldo Carvalho de Melo
655000e7c7
perf symbols: Adopt the strlists for dso, comm
...
Will be used in perf diff too.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260914682-29652-2-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 08:53:49 +01:00
Arnaldo Carvalho de Melo
75be6cf487
perf symbols: Make symbol_conf global
...
This simplifies a lot of functions, less stuff to be done by
tool writers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frédéric Weisbecker <fweisbec@gmail.com >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
LKML-Reference: <1260914682-29652-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-16 08:53:48 +01:00
Masami Hiramatsu
7ef17aafc9
perf probe: Fix to show which probe point is not found
...
Fix perf probe to show which probe point is not found.
With out this patch, it shows just "No probe point found."
This doesn't help users if they specify several probes.
e.g.
# perf probe -f --add schedule --add test
Fatal: No probe point found.
This patch makes error message more helpful as below.
# perf probe --add schedule --add test
Fatal: Probe point 'test' not found. - probe not added.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153247.17436.49068.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:05 +01:00
Masami Hiramatsu
a128168d1e
perf probe: Check build-id of vmlinux
...
Check build-id of vmlinux by using functions in symbol.c.
This also exposes map__load() for getting vmlinux path,
and removes vmlinux path list in builtin-probe.c,
because symbol.c already has that. Checking build-id
prevents users to open old or different debuginfo from
current running kernel.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153232.17436.45539.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:04 +01:00
Masami Hiramatsu
d761b08bff
perf probe: Reject second attempt of adding same-name event
...
Reject second attempt of adding same-name event. This patch
also provides --force option which allows user to add additional
probe events on the same-name event.
e.g.
(the first attempt : success)
./perf probe schedule
Added new event:
probe:schedule (on schedule+0)
(the second attempt : failure)
./perf probe schedule:11
Error: event "schedule" already exists. (Use -f to force duplicates.)
Fatal: Can't add new event.
(the second attempt with -f : successfully added)
./perf probe -f schedule:11
Added new event:
probe:schedule_1 (on schedule+45)
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153225.17436.15166.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:04 +01:00
Masami Hiramatsu
af663d75a6
perf probe: Support event name for --add option
...
Support event name syntax for --add option. This allows
users to specify event name for each new event.
The --add syntax is:
perf probe --add '[EVENT=]SRC:LINE ARGS'
or
perf probe --add '[EVENT=]FUNC[+OFFS|%return|:RLN][@SRC] ARGS'
e.g.
./perf probe --add myprobe1=schedule
Note: currently group name is not supported yet, because it
can cause name-space confliction with other tracepoint/
hw-breakpoint events.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153218.17436.84675.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:03 +01:00
Masami Hiramatsu
bbbb521bc6
perf probe: Add glob matching support on --del
...
Add glob-expression matching support on --del option.
You can use wildcards for specifying deleting events.
e.g.
Clear all probe events:
# perf probe --del '*'
Clear probes on schedule():
# perf probe --del 'schedule*'
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153210.17436.12327.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:03 +01:00
Masami Hiramatsu
adf365f486
perf probe: Use strlist__for_each macros in probe-event.c
...
Use strlist__for_each macros instead of using strlist__entry()
and index variable.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153203.17436.52039.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:02 +01:00
Masami Hiramatsu
abf5ef7247
perf tools: Add for_each macros for strlist
...
Add for_each iteration macros for strlist. This patch
introduces strlist__for_each() and strlist__for_each_safe(),
both are similar to list_for_each() and list_for_each_safe().
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153156.17436.49157.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:02 +01:00
Masami Hiramatsu
3e3405906d
perf probe: Fix --del to update current event list
...
Fix --del option to update current existing event list
after perf probe deleted an event.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153149.17436.61265.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:01 +01:00
Masami Hiramatsu
f6bbff7725
perf probe: Fix --del to show info instead of warning
...
Fix --del option to show info message instead of warning
if failing to find specified event.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153142.17436.7793.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:01 +01:00
Masami Hiramatsu
411edfe5c1
perf probe: Show need-dwarf message only if it is really needed
...
Show need-dwarf message only if the probe is really requires
debuginfo analysis. This also use pr_debug for debugging message
instead of pr_warning.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153135.17436.99052.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:01 +01:00
Masami Hiramatsu
7e990a5126
perf probe: Check the result of e_snprintf()
...
Fix show_perf_probe_event() to check the result of e_snprintf().
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153121.17436.34674.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:22:00 +01:00
Masami Hiramatsu
fac13fd54e
perf probe: Cleanup struct session in builtin-probe.c
...
Clean up struct session in builtin-probe.c, including
change need_dwarf to bool and move listing flag into
struct session as list_events flag.
This also changes parse_perf_probe_event() interface
due to code readability.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Jim Keniston <jkenisto@us.ibm.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
Cc: Christoph Hellwig <hch@infradead.org >
Cc: Frank Ch. Eigler <fche@redhat.com >
Cc: Jason Baron <jbaron@redhat.com >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <20091215153114.17436.77000.stgit@dhcp-100-2-132.bos.redhat.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 20:21:59 +01:00
Tom Zanussi
8f11d85a0e
perf trace/scripting: Check return val of perl_run()
...
The return value from perl_run() is currently ignored, but it
should be checked and used to exit perf if there are problems
loading the script.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
LKML-Reference: <1260867220-15699-4-git-send-email-tzanussi@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2009-12-15 10:31:32 +01:00