diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-25 18:44:09 -0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-25 18:48:15 -0200 |
commit | a64fa198ba1cd232871710c37476e006ed5516ed (patch) | |
tree | bb0116b48545b5e1a63560219306299b6d0c6cb0 /scripts | |
parent | 2e7d1e3fb8043380a2fc5d759eb357bf05acf935 (diff) | |
download | linux-a64fa198ba1cd232871710c37476e006ed5516ed.tar.bz2 |
perf python scripting: Improve the syscalls-by-pid script
. Print message at script start telling how to get te summary
. Print the syscall names
. Accept both pid (if numeric) or COMM name
Now 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 2
sshd [2322]
rt_sigprocmask 4
select 2
write 1
read 1
perf [15178]
read 2506
open 794
close 769
write 240
getdents 112
lseek 16
stat 9
perf_counter_open 5
fcntl 5
mmap 5
statfs 2
perf [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 <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions