27 Oct, 2010
4 commits
-
…inux-2.6 into perf/urgent
-
The equivalent to this SystemTAP script:
http://sourceware.org/systemtap/wiki/WSFutexContention
[root@doppio ~]# perf trace futex-contention
Press control+C to stop and show the summary
^Cnpviewer.bin[15242] lock 7f0a8be19104 contended 29 times, 72806 avg ns
npviewer.bin[15242] lock 7f0a8be19130 contended 2 times, 1355 avg ns
synergyc[17245] lock f127f4 contended 1 times, 1830569 avg ns
firefox[15116] lock 7f2b7238af0c contended 168 times, 1230390 avg ns
synergyc[17245] lock f2fc20 contended 1 times, 33149 avg ns
npviewer.bin[15255] lock 7f0a8be19074 contended 155 times, 73047 avg ns
npviewer.bin[15255] lock 7f0a8be190a0 contended 127 times, 7088 avg ns
synergyc[17247] lock f12854 contended 1 times, 46741 avg ns
synergyc[17245] lock f12610 contended 1 times, 7358 avg ns
[root@doppio ~]#Cc: Frederic Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
We want just the script output, not internal details about the record phase.
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
26 Oct, 2010
7 commits
-
If we include a newline character in the string argument to perror()
then the output will be split across two lines like so,Unable to read perf file descriptor
: No space left on deviceDeleting the newline character prints a much more readable error,
Unable to read perf file descriptor: No space left on device
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Matt Fleming
Signed-off-by: Arnaldo Carvalho de Melo -
…inux-2.6 into perf/urgent
-
Where we don't have the audit.MACH_ARMEB constant.
Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
. Print message at script start telling how to get te summary
. Print the syscall names
. Accept both pid (if numeric) or COMM nameNow it looks like this:
[root@emilia tmp]# perf trace syscall-counts-by-pid
Press control+C to stop and show the summary
^C
syscall events by comm/pid:comm [pid]/syscalls count
---------------------------------------- ----------automount [1670]
futex 2sshd [2322]
rt_sigprocmask 4
select 2
write 1
read 1perf [15178]
read 2506
open 794
close 769
write 240
getdents 112
lseek 16
stat 9
perf_counter_open 5
fcntl 5
mmap 5
statfs 2perf [15179]
read 56701
open 499
stat 176
fstat 149
close 109
mmap 98
brk 75
rt_sigaction 66
munmap 42
mprotect 24
lstat 7
lseek 5
getdents 4
ioctl 3
readlink 2
futex 1
statfs 1
getegid 1
geteuid 1
getgid 1
getuid 1
getrlimit 1
fcntl 1
uname 1
write 1
[root@emilia tmp]# fg
-bash: fg: current: no such job
[root@emilia tmp]# perf trace syscall-counts-by-pid 2322
Press control+C to stop and show the summary
^C
syscall events by comm/pid:comm [pid]/syscalls count
---------------------------------------- ----------sshd [2322]
rt_sigprocmask 4
select 2
write 1
read 1
[root@emilia tmp]# perf trace syscall-counts-by-pid sshd
Press control+C to stop and show the summary
^C
syscall events for sshd:comm [pid]/syscalls count
---------------------------------------- ----------sshd [2322]
rt_sigprocmask 4
select 2
write 1
read 1
[root@emilia tmp]#Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
[root@emilia tmp]# perf trace sctop 1
syscall events:event count
---------------------------------------- ----------
read 215400
futex 4029
write 376
brk 33
rt_sigprocmask 24
select 17
lseek 2
fsync 1
^C[root@emilia tmp]#Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
. Print message at script start telling how to get te summary
. Print the syscall nameNow it looks like this:
[root@emilia ~]# perf trace syscall-counts
Press control+C to stop and show the summary
^C
syscall events:event count
---------------------------------------- -----------
read 102752
open 1293
close 878
write 319
stat 185
fstat 149
getdents 116
mmap 98
brk 80
rt_sigaction 66
munmap 42
mprotect 24
lseek 21
lstat 7
rt_sigprocmask 4
futex 3
statfs 3
ioctl 3
readlink 2
select 2
getegid 1
geteuid 1
getgid 1
getuid 1
getrlimit 1
fcntl 1
uname 1
[root@emilia ~]#Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
. Print message at script start telling how to get te summary
. Print the syscall name using the audit-lib-python package, if
installed
. Print the errno string
. Accept both pid (if numeric) or COMM nameNow it looks like this:
[root@emilia ~]# perf trace failed-syscalls-by-pid
Press control+C to stop and show the summary
^C
syscall errors:comm [pid] count
------------------------------ ----------automount [1670]
syscall: futex
err = ETIMEDOUT 39irqbalance [1462]
syscall: openat
err = ENOENT 4perf [7888]
syscall: lseek
err = ESPIPE 1
syscall: open
err = ENOENT 24perf [7889]
syscall: ioctl
err = EINVAL 1
syscall: readlink
err = EINVAL 2
syscall: open
err = ENOENT 389
syscall: stat
err = ENOENT 141
syscall: lseek
err = ESPIPE 3
[root@emilia ~]#[root@emilia ~]# perf trace failed-syscalls-by-pid 1670
Press control+C to stop and show the summary
^C
syscall errors:comm [pid] count
------------------------------ ----------automount [1670]
syscall: futex
err = ETIMEDOUT 2
[root@emilia ~]#
[root@emilia ~]#
[root@emilia ~]#
[root@emilia ~]# perf trace failed-syscalls-by-pid automount
Press control+C to stop and show the summary
^C
syscall errors for automount:comm [pid] count
------------------------------ ----------automount [1669]
syscall: futex
err = ETIMEDOUT 1automount [1670]
syscall: futex
err = ETIMEDOUT 5
[root@emilia ~]#Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
24 Oct, 2010
5 commits
-
…inux-2.6 into perf/urgent
-
Fixing the following error on 32-bit arches:
util/probe-finder.c: In function ‘line_range_search_cb’:
util/probe-finder.c:1734: error: format ‘%lx’ expects type ‘long
unsigned int’, but argument 3 has type ‘Dwarf_Off’Reported-by: Ingo Molnar
Cc: Frederic Weisbecker
Cc: Masami Hiramatsu
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
The extension starts with the last dot in the name, not the first.
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ben Hutchings
Signed-off-by: Arnaldo Carvalho de Melo -
Set $PERF_EXEC_PATH before starting the record and report scripts, and
make them use it where necessary.Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ben Hutchings
Signed-off-by: Arnaldo Carvalho de Melo -
Existing documentation doesn't discuss event modifiers, so add a description of
what's currently possible to the documentation of perf-list.Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Robert Richter
LKML-Reference:
Signed-off-by: Sonny Rao
Signed-off-by: Arnaldo Carvalho de Melo
23 Oct, 2010
1 commit
-
We wrap it in libslang.h because we need to deal with older slang release
where HAVE_LONG_LONG is referenced as:So we need to define it.
Noticed when rebuilding the perf tools on a RHEL5 machine.
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Stephane Eranian
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
22 Oct, 2010
8 commits
-
…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: (163 commits)
tracing: Fix compile issue for trace_sched_wakeup.c
[S390] hardirq: remove pointless header file includes
[IA64] Move local_softirq_pending() definition
perf, powerpc: Fix power_pmu_event_init to not use event->ctx
ftrace: Remove recursion between recordmcount and scripts/mod/empty
jump_label: Add COND_STMT(), reducer wrappery
perf: Optimize sw events
perf: Use jump_labels to optimize the scheduler hooks
jump_label: Add atomic_t interface
jump_label: Use more consistent naming
perf, hw_breakpoint: Fix crash in hw_breakpoint creation
perf: Find task before event alloc
perf: Fix task refcount bugs
perf: Fix group moving
irq_work: Add generic hardirq context callbacks
perf_events: Fix transaction recovery in group_sched_in()
perf_events: Fix bogus AMD64 generic TLB events
perf_events: Fix bogus context time tracking
tracing: Remove parent recording in latency tracer graph options
tracing: Use one prologue for the preempt irqs off tracer function tracers
... -
Add basic module probe support on perf probe. This introduces "--module
" option to perf probe for putting probes and showing lines and
variables in the given module.Currently, this supports only probing on running modules. Supporting off-line
module probing is the next step.e.g.)
[show lines]
# ./perf probe --module drm -L drm_vblank_info0 int drm_vblank_info(struct seq_file *m, void *data)
1 {
struct drm_info_node *node = (struct drm_info_node *) m->private
3 struct drm_device *dev = node->minor->dev;
...
[show vars]
# ./perf probe --module drm -V drm_vblank_info:3
Available variables at drm_vblank_info:3
@
(unknown_type) data
struct drm_info_node* node
struct seq_file* m
[put a probe]
# ./perf probe --module drm drm_vblank_info:3 node m
Add new event:
probe:drm_vblank_info (on drm_vblank_info:3 with node m)You can now use it on all perf tools, such as:
perf record -e probe:drm_vblank_info -aR sleep 1
[list probes]
# ./perf probe -l
probe:drm_vblank_info (on drm_vblank_info:3@drivers/gpu/drm/drm_info.c with ...Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Add --externs for allowing --vars to show accessible global (externally
defined) variables from a given probe point too.This will give you a hint which globals can be accessible from the probe point.
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Just change the order of function arguments for ease of read; moving optional
bool flag to the last.Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Add -V (--vars) option for listing accessible local variables at given probe
point. This will help finding which local variables are available for event
arguments.e.g.)
# perf probe -V call_timer_fn:23
Available variables at call_timer_fn:23
@
function_type* fn
int preempt_count
long unsigned int data
struct list_head work_list
struct list_head* head
struct timer_list* timer
struct tvec_base* baseCc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Allow users to set external defined global variables as event arguments (e.g.
jiffies).Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Fix to check the die's address and search into the die only if it has given
address.This will avoid finding wrong variables in wrong basic block.
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Fix to get the actual type die of variables by using dwarf_attr_integrate()
which gets attribute from die even if the type die is connected by
DW_AT_abstract_origin.Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo
12 Oct, 2010
1 commit
-
Changes:
v4: Fix the cosmetic issue of redundant dot-ops
v3: Change rmb() to use SYNC
v2: Include mips unistd.h and define rmb()/cpu_relax() in tools/perf/perf.hSigned-off-by: Deng-Cheng Zhu
Acked-by: Ralf Baechle
Cc: David Daney
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
Cc: Paul Mackerras
Signed-off-by: Ingo Molnar
05 Oct, 2010
1 commit
-
Conflicts:
tools/perf/util/ui/browsers/hists.cMerge reason: fix the conflict and merge in changes for dependent patch.
Signed-off-by: Ingo Molnar
04 Oct, 2010
3 commits
-
Both python_scripting_ops and perl_scripting_ops have two global definitions.
One in trace-event-scripting.c and one in their respective scripting-engine
modules.The issue is that depending on the linker order one definition or the other
is chosen. One is uninitialized (bss), while the other is initialized. If
the uninitialized version is chosen, then perf does not function properly.This patch fixes this by adding the extern prefix to the definitions in
trace-event-scripting.c.Cc: David S. Miller
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Robert Richter
LKML-Reference:
Signed-off-by: Stephane Eranian
Signed-off-by: Arnaldo Carvalho de Melo -
There a typo in util/ui/browsers/hists.c that leads to a segfault when you
press the 'a' key on a non-resolved symbol (plain hex address).LKML-Reference:
Signed-off-by: Frederik Deweerdt
Signed-off-by: Arnaldo Carvalho de Melo -
The patch ecafda6 introduced a problem where all object files would be
always rebuilt, fix it by using:http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
Reported-by: Arnaldo Carvalho de Melo
Cc: Bernd Petrovitsch
Signed-off-by: Kusanagi Kouichi
Signed-off-by: Arnaldo Carvalho de Melo
15 Sep, 2010
1 commit
-
…stedt/linux-2.6-trace into perf/core
13 Sep, 2010
1 commit
-
They are useless and take away precious columns and lines, so stop using
windows.One more step in removing newt code, that after all is not being useful
at all for the coalescing TUI model in perf.Suggested-by: Christoph Hellwig
Cc: Christoph Hellwig
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
10 Sep, 2010
2 commits
-
By returning immediately if it was already initialized, do it as well at
symbol__exit, refusing multiple deinitializations.This fixes problems in the kmem, sched and timechart commands.
Reported-by: Davidlohr Bueso
Cc: Davidlohr Bueso
Signed-off-by: Jovi Zhang
LKML-Reference: AANLkTi=9Cn=R8SPMCRp5z+gEjXbaBHeb-AaOtRbuwwcn@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo -
Merge reason: Pick up pending fixes before applying dependent new changes.
Signed-off-by: Ingo Molnar
08 Sep, 2010
3 commits
-
Don't make argument names from raw parameters (means the parameters are written
in kprobe-tracer syntax), because the argument syntax may include special
characters. Just leave it, then kprobe-tracer gives a new name.Reported-by: Srikar Dronamraju
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Fix a bug to support %return probe syntax again. Previous commit 4235b04 has a
bug which disables the %return syntax on perf probe.Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Masami Hiramatsu
Signed-off-by: Arnaldo Carvalho de Melo -
Add a perf script which shows packets processing and processed
time. It helps us to investigate networking or network devices.If you want to use it, install perf and record perf.data like
following.If you set script, perf gathers records until it ends.
If not, you must Ctrl-C to stop recording.And if you want a report from record,
If you use some options, you can limit the output.
Option is below.tx: show only tx packets processing
rx: show only rx packets processing
dev=: show processing on this device
debug: work with debug mode. It shows buffer status.For example, if you want to show received packets processing
associated with eth4,106133.171439sec cpu=0
irq_entry(+0.000msec irq=24:eth4)
|
softirq_entry(+0.006msec)
|
|---netif_receive_skb(+0.010msec skb=f2d15900 len=100)
| |
| skb_copy_datagram_iovec(+0.039msec 10291::10291)
|
napi_poll_exit(+0.022msec eth4)This perf script helps us to analyze the processing time of a
transmit/receive sequence.Signed-off-by: Koki Sanagi
Acked-by: David S. Miller
Cc: Neil Horman
Cc: Mathieu Desnoyers
Cc: Kaneshige Kenji
Cc: Izumo Taku
Cc: Kosaki Motohiro
Cc: Lai Jiangshan
Cc: Scott Mcmillan
Cc: Steven Rostedt
Cc: Eric Dumazet
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Frederic Weisbecker
30 Aug, 2010
1 commit
-
…ic/random-tracing into perf/core
27 Aug, 2010
2 commits
-
Conflicts:
tools/perf/util/callchain.hMerge reason:
Fix a non-trivial conflict with latest fixes -
Each histogram entry has a callchain root that stores the
callchain samples. However we forgot to initialize the
tracking of children hits of these roots, which then got
random values on their creation.The root children hits is multiplied by the minimum percentage
of hits provided by the user, and the result becomes the minimum
hits expected from children branches. If the random value due
to the uninitialization is big enough, then this minimum number
of hits can be huge and eventually filter every children branches.The end result was invisible callchains. All we need to
fix this is to initialize the children hits of the root.Reported-by: Christoph Hellwig
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
Cc: Paul Mackerras
Cc: 2.6.32.x-2.6.35.y