Linus Torvalds
660f6a360b
Merge branch 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
...
* 'perf-probes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Issue at least one memory barrier in stop_machine_text_poke()
perf probe: Correct probe syntax on command line help
perf probe: Add lazy line matching support
perf probe: Show more lines after last line
perf probe: Check function address range strictly in line finder
perf probe: Use libdw callback routines
perf probe: Use elfutils-libdw for analyzing debuginfo
perf probe: Rename probe finder functions
perf probe: Fix bugs in line range finder
perf probe: Update perf probe document
perf probe: Do not show --line option without dwarf support
kprobes: Add documents of jump optimization
kprobes/x86: Support kprobes jump optimization on x86
x86: Add text_poke_smp for SMP cross modifying code
kprobes/x86: Cleanup save/restore registers
kprobes/x86: Boost probes when reentering
kprobes: Jump optimization sysctl interface
kprobes: Introduce kprobes jump optimization
kprobes: Introduce generic insn_slot framework
kprobes/x86: Cleanup RELATIVEJUMP_INSTRUCTION to RELATIVEJUMP_OPCODE
2010-03-05 10:50:22 -08:00
Masami Hiramatsu
32cb0dd506
perf probe: Correct probe syntax on command line help
...
Move @SRC right after FUNC in syntax according to syntax change
on command line help.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
LKML-Reference: <20100304033843.3819.10087.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-03-04 11:39:21 +01:00
Linus Torvalds
6556a67435
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
...
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (172 commits)
perf_event, amd: Fix spinlock initialization
perf_event: Fix preempt warning in perf_clock()
perf tools: Flush maps on COMM events
perf_events, x86: Split PMU definitions into separate files
perf annotate: Handle samples not at objdump output addr boundaries
perf_events, x86: Remove superflous MSR writes
perf_events: Simplify code by removing cpu argument to hw_perf_group_sched_in()
perf_events, x86: AMD event scheduling
perf_events: Add new start/stop PMU callbacks
perf_events: Report the MMAP pgoff value in bytes
perf annotate: Defer allocating sym_priv->hist array
perf symbols: Improve debugging information about symtab origins
perf top: Use a macro instead of a constant variable
perf symbols: Check the right return variable
perf/scripts: Tag syscall_name helper as not yet available
perf/scripts: Add perf-trace-python Documentation
perf/scripts: Remove unnecessary PyTuple resizes
perf/scripts: Add syscall tracing scripts
perf/scripts: Add Python scripting engine
perf/scripts: Remove check-perf-trace from listed scripts
...
Fix trivial conflict in tools/perf/util/probe-event.c
2010-02-28 10:20:25 -08:00
David S. Miller
4385d580f2
perf tools: Flush maps on COMM events
...
Even though we don't register the counters until the child is right about
to exec(), we're still going to get at least a few events while the
fork()'d child is still executing 'perf' and in particular we're going to
get the MMAP events.
We can't distinguish the ones in the newly executed process because the
PID will be the same.
One way to solve this would be to have a PERF_RECORD_EXEC event, and when
this is seen 'perf' can flush it's map cache. We can't use
PERF_RECORD_COMM since that's generated by other things, not just exec().
Actually, thinking about it some more, using PERF_RECORD_COMM might be a
good enough approximation.
Signed-off-by: David S. Miller <davem@davemloft.net >
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: <1267196914-16238-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-26 16:28:45 +01:00
Arnaldo Carvalho de Melo
48fb4fdd6b
perf annotate: Handle samples not at objdump output addr boundaries
...
Without this patch we get this for need_resched:
[root@mica ~]# perf annotate need_resched
------------------------------------------------
Percent | Source code & Disassembly of vmlinux
------------------------------------------------
:
:
: Disassembly of section .text:
:
: ffffffff810095ed <need_resched>:
: return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
: }
:
: static inline int need_resched(void)
: {
0.00 : ffffffff810095ed: 55 push %rbp
: return unlikely(test_thread_flag(TIF_NEED_RESCHED));
0.00 : ffffffff810095ee: be 03 00 00 00 mov $0x3,%esi
:
: static inline struct thread_info *current_thread_info(void)
: {
: struct thread_info *ti;
: ti = (void *)(percpu_read_stable(kernel_stack) +
0.00 : ffffffff810095f3: 65 48 8b 3c 25 48 b5 mov %gs:0xb548,%rdi
0.00 : ffffffff810095fa: 00 00
: return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
: }
:
: static inline int need_resched(void)
: {
0.00 : ffffffff810095fc: 48 89 e5 mov %rsp,%rbp
: return unlikely(test_thread_flag(TIF_NEED_RESCHED));
0.00 : ffffffff810095ff: 48 81 ef d8 1f 00 00 sub $0x1fd8,%rdi
0.00 : ffffffff81009606: e8 9d ff ff ff callq ffffffff810095a8 <test_ti_thread_flag>
: }
0.00 : ffffffff8100960b: c9 leaveq
0.00 : ffffffff8100960c: 85 c0 test %eax,%eax
0.00 : ffffffff8100960e: 0f 95 c0 setne %al
0.00 : ffffffff81009611: 0f b6 c0 movzbl %al,%eax
: Disassembly of section .vsyscall_0:
: Disassembly of section .vsyscall_fn:
: Disassembly of section .vsyscall_1:
: Disassembly of section .vsyscall_2:
: Disassembly of section .init.text:
: Disassembly of section .altinstr_replacement:
: Disassembly of section .exit.text:
[root@mica ~]#
But from the 'perf report' result we know that there are hits
for need_resched on a 4 way machine mostly doing nothing, so
after adding code to show what is in each hist offset and
collapsing IP hits for what happens between objdump lines we
get, for the same perf.data file:
[root@mica ~]# perf annotate -v need_resched
------------------------------------------------
Percent | Source code & Disassembly of vmlinux
------------------------------------------------
:
:
: Disassembly of section .text:
:
: ffffffff810095ed <need_resched>:
: return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
: }
:
: static inline int need_resched(void)
: {
0.00 : ffffffff810095ed: 55 push %rbp
: return unlikely(test_thread_flag(TIF_NEED_RESCHED));
52.78 : ffffffff810095ee: be 03 00 00 00 mov $0x3,%esi
:
: static inline struct thread_info *current_thread_info(void)
: {
: struct thread_info *ti;
: ti = (void *)(percpu_read_stable(kernel_stack) +
0.00 : ffffffff810095f3: 65 48 8b 3c 25 48 b5 mov %gs:0xb548,%rdi
0.00 : ffffffff810095fa: 00 00
: return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
: }
:
: static inline int need_resched(void)
: {
0.00 : ffffffff810095fc: 48 89 e5 mov %rsp,%rbp
: return unlikely(test_thread_flag(TIF_NEED_RESCHED));
9.72 : ffffffff810095ff: 48 81 ef d8 1f 00 00 sub $0x1fd8,%rdi
0.00 : ffffffff81009606: e8 9d ff ff ff callq ffffffff810095a8 <test_ti_thread_flag>
: }
0.00 : ffffffff8100960b: c9 leaveq
0.00 : ffffffff8100960c: 85 c0 test %eax,%eax
37.50 : ffffffff8100960e: 0f 95 c0 setne %al
0.00 : ffffffff81009611: 0f b6 c0 movzbl %al,%eax
: Disassembly of section .vsyscall_0:
: Disassembly of section .vsyscall_fn:
: Disassembly of section .vsyscall_1:
: Disassembly of section .vsyscall_2:
: Disassembly of section .init.text:
: Disassembly of section .altinstr_replacement:
: Disassembly of section .exit.text:
[root@mica ~]#
And now 'perf annotate -v', verbose mode, will show the hits per
precise IP, so that one can make sense of the attribution to
each objdumop line:
[root@mica ~]# perf annotate -v need_resched
Looking at the vmlinux_path (5 entries long)
Using /lib/modules/2.6.33-rc8-tip-00784-g3471df5-dirty/build/vmlinux
for symbols annotate_sym: filename=/lib/modules/2.6.33-rc8-tip-00784-g3471df5-dirty/build/vmlinux, sym=need_resched, start=0xffffffff810095ed, end=0xffffffff81009614
------------------------------------------------
Percent | Source code & Disassembly of vmlinux
------------------------------------------------
ffffffff810095f1: 152
ffffffff81009603: 28
ffffffff8100960f: 55
ffffffff81009610: 53
h->sum: 288
<SNIP same annotation>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: David Miller <davem@davemloft.net >
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: <1267194194-15670-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-26 15:42:49 +01:00
Masami Hiramatsu
2a9c8c3609
perf probe: Add lazy line matching support
...
Add lazy line matching support for specifying new probes.
This also changes the syntax of perf probe a bit. Now
perf probe accepts one of below probe event definitions.
1) Define event based on function name
[EVENT=]FUNC[@SRC][:RLN|+OFF|%return|;PTN] [ARG ...]
2) Define event based on source file with line number
[EVENT=]SRC:ALN [ARG ...]
3) Define event based on source file with lazy pattern
[EVENT=]SRC;PTN [ARG ...]
- New lazy matching pattern(PTN) follows ';' (semicolon). And it
must be put the end of the definition.
- So, @SRC is no longer the part which must be put at the end
of the definition.
Note that ';' (semicolon) can be interpreted as the end of
a command by the shell. This means that you need to quote it.
(anyway you will need to quote the lazy pattern itself too,
because it may contains other sensitive characters, like
'[',']' etc.).
Lazy matching
-------------
The lazy line matching is similar to glob matching except
ignoring spaces in both of pattern and target.
e.g.
'a=*' can matches 'a=b', 'a = b', 'a == b' and so on.
This provides some sort of flexibility and robustness to
probe point definitions against minor code changes.
(for example, actual 10th line of schedule() can be changed
easily by modifying schedule(), but the same line matching
'rq=cpu_rq*' may still exist.)
Changes in v3:
- Cast Dwarf_Addr to uintmax_t for printf-formats.
Changes in v2:
- Cast Dwarf_Addr to unsigned long long for printf-formats.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133611.6725.45078.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:30 +01:00
Masami Hiramatsu
5c8d1cbbbe
perf probe: Show more lines after last line
...
Show 2 more lines after the last probe-able line.
This will clearly show the last closed-brace of
inline functions.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133604.6725.76820.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:30 +01:00
Masami Hiramatsu
161a26b0c2
perf probe: Check function address range strictly in line finder
...
Check (inlined) function address range strictly for
improving output of probe-able lines of inline functions.
Without this change, perf probe --line <function> sometimes
showed other inline function bodies too, because it didn't
filter out inlined functions.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Ulrich Drepper <drepper@redhat.com >
Cc: Roland McGrath <roland@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133557.6725.20697.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:29 +01:00
Masami Hiramatsu
e92b85e1ff
perf probe: Use libdw callback routines
...
Use libdw callback functions aggressively, and remove
local tree-search API. This change simplifies the code.
Changes in v3:
- Cast Dwarf_Addr to uintmax_t for printf-formats.
Changes in v2:
- Cast Dwarf_Addr to unsigned long long for printf-formats.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Ulrich Drepper <drepper@redhat.com >
Cc: Roland McGrath <roland@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133549.6725.81499.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:29 +01:00
Masami Hiramatsu
804b36068e
perf probe: Use elfutils-libdw for analyzing debuginfo
...
Newer gcc introduces newer & richer debuginfo, and only libdw
in elfutils project can support it. So perf probe moves onto
elfutils-libdw from libdwarf.
Changes in v3:
- Cast Dwarf_Addr/Dwarf_Word to uintmax_t for printf-formats.
- Recover a sign-prefix which was removed in v2 by mistake.
Changes in v2:
- Fix a type-casting bug in Makefile.
- Cast Dwarf_Addr/Dwarf_Word to unsigned long long for printf-formats.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Ulrich Drepper <drepper@redhat.com >
Cc: Roland McGrath <roland@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133542.6725.34724.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:29 +01:00
Masami Hiramatsu
81cb8aa327
perf probe: Rename probe finder functions
...
Rename *_probepoint to *_probe_point, for nothing
but a cosmetic reason.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133534.6725.52615.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:28 +01:00
Masami Hiramatsu
3cb8bc6ac9
perf probe: Fix bugs in line range finder
...
Fix find_line_range_by_line() to init line_list and remove
misconseptional found marking which should be done when
real lines are found (if there is no lines probe-able,
find_line_range() should return 0).
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133527.6725.52418.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:28 +01:00
Masami Hiramatsu
ee391de876
perf probe: Update perf probe document
...
Update perf-probe.txt to suit to current perf-probe command
and add some examples.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133519.6725.58816.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:27 +01:00
Masami Hiramatsu
f3ab481ca6
perf probe: Do not show --line option without dwarf support
...
Do not show --line option in help message when perf
doesn't support dwarf.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com >
Cc: systemtap <systemtap@sources.redhat.com >
Cc: DLE <dle-develop@lists.sourceforge.net >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Mike Galbraith <efault@gmx.de >
Cc: K.Prasad <prasad@linux.vnet.ibm.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com >
LKML-Reference: <20100225133512.6725.88423.stgit@localhost6.localdomain6 >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:49:27 +01:00
Arnaldo Carvalho de Melo
628ada0cb0
perf annotate: Defer allocating sym_priv->hist array
...
Because symbol->end is not fixed up at symbol_filter time, only
after all symbols for a DSO are loaded, and that, for asm
symbols, may be bogus, causing segfaults when hits happen in
these symbols.
Reported-by: David Miller <davem@davemloft.net >
Reported-by: Anton Blanchard <anton@samba.org >
Acked-by: David Miller <davem@davemloft.net >
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 >
Cc: <stable@kernel.org > # for .33.x. Does not apply cleanly, needs backport.
LKML-Reference: <20100225155740.GB8553@ghostprotocols.net >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 17:39:14 +01:00
Arnaldo Carvalho de Melo
3846df2e0a
perf symbols: Improve debugging information about symtab origins
...
Be more clear about DSO long names and tell from which file
kernel symbols were obtained, all in --verbose mode:
[root@mica ~]# perf report -v > /dev/null
Looking at the vmlinux_path (5 entries long)
Using /lib/modules/2.6.33-rc8-tip-00777-g0918527-dirty/build/vmlinux for symbols
[root@mica ~]# mv /lib/modules/2.6.33-rc8-tip-00777-g0918527-dirty/build/vmlinux /tmp/dd
[root@mica ~]# perf report -v > /dev/null
Looking at the vmlinux_path (5 entries long)
Using /proc/kallsyms for symbols
[root@mica ~]#
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: <1266866139-6361-1-git-send-email-acme@infradead.org >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 12:27:17 +01:00
Arnaldo Carvalho de Melo
c7ad21af2c
perf top: Use a macro instead of a constant variable
...
To overcome a silly gcc warning:
cc1: warnings being treated as errors
builtin-top.c: In function ‘lookup_sym_source’:
builtin-top.c:291: warning: not protecting local variables:
variable length buffer make: *** [builtin-top.o] Error 1
make: *** Waiting for unfinished jobs....
That is emitted for this:
const size_t pattern_len = BITS_PER_LONG / 4 + 2;
char pattern[pattern_len + 1];
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: <1266866062-6287-1-git-send-email-acme@infradead.org >
[ -v2: macroify the naming style ]
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 12:26:16 +01:00
Zhang, Yanmin
37fe5fcb7a
perf symbols: Check the right return variable
...
In function dso__split_kallsyms(), curr_map saves the return value
of map__new2. So check it instead of var map after the call returns.
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com >
Acked-by: David S. Miller <davem@davemloft.net >
Cc: <stable@kernel.org > # for .33.x
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Mike Galbraith <efault@gmx.de >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
LKML-Reference: <1267066851.1726.9.camel@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2010-02-25 12:15:24 +01:00
Frederic Weisbecker
c2fbaa4b48
perf/scripts: Tag syscall_name helper as not yet available
...
syscall_name() helper, which resolves a syscall arch number to
its name, is not yet available as we first need to implement
event injection for it to work.
Remove it from the documentation or tag its references as
unavailable yet. Once it's implemented, we can just revert
the current patch.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
2010-02-25 04:07:50 +01:00
Tom Zanussi
cff68e5822
perf/scripts: Add perf-trace-python Documentation
...
Also small update to perf-trace-perl and perf-trace docs.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1264580883-15324-13-git-send-email-tzanussi@gmail.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-25 04:07:49 +01:00
Tom Zanussi
44ad9cd8f0
perf/scripts: Remove unnecessary PyTuple resizes
...
If we know the size of a tuple in advance, there's no need to resize
it - start out with the known size in the first place.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1266822779.6426.4.camel@tropicana>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-25 04:07:49 +01:00
Tom Zanussi
4d161f0360
perf/scripts: Add syscall tracing scripts
...
Adds a set of scripts that aggregate system call totals and system
call errors. Most are Python scripts that also test basic
functionality of the new Python engine, but there's also one Perl
script added for comparison and for reference in some new
Documentation contained in a later patch.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1264580883-15324-8-git-send-email-tzanussi@gmail.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-25 04:07:48 +01:00
Tom Zanussi
7e4b21b84c
perf/scripts: Add Python scripting engine
...
Add base support for Python scripting to perf trace.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1264580883-15324-6-git-send-email-tzanussi@gmail.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-25 04:07:29 +01:00
Tom Zanussi
266fe2f217
perf/scripts: Remove check-perf-trace from listed scripts
...
The check-perf-trace script only checks Perl functionality, and
doesn't really need to be listed as as user script anyway.
This only removes the '-report' shell script, so although it doesn't
appear in the listing, the '-record' shell script and the check perf
trace perl script itself is still available and can still be run
manually as such:
$ libexec/perf-core/scripts/perl/bin/check-perf-trace-record
$ perf trace -s libexec/perf-core/scripts/perl/check-perf-trace.pl
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1264580883-15324-6-git-send-email-tzanussi@gmail.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-23 20:58:59 +01:00
Tom Zanussi
82d156cd5e
perf/scripts: Move Perl scripting files to scripting-engines dir
...
Create a scripting-engines directory to contain scripting engine
implementation code, in anticipation of the addition of new scripting
support. Also removes trace-event-perl.h.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
LKML-Reference: <1264580883-15324-5-git-send-email-tzanussi@gmail.com >
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com >
2010-02-23 20:49:55 +01:00