Feng Tang
87b6a3ad40
perf script python: Correct handler check and spelling errors
...
Correct the checking for handler returned by PyDict_GetItemString(),
also fix some spelling error and remove some data code in
event_analyzing_sample.py, as suggested by Namhyung Kim.
v2: restore back the wrongly removed trace_unhandled() func
Signed-off-by: Feng Tang <[email protected] >
Acked-by: Namhyung Kim <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/20120809134613.067104c4@feng-i7
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-08-09 13:26:19 -03:00
Feng Tang
02f1c33f7d
perf scripts python: Add a python library EventClass.py
...
This library defines several class types for perf events which could
help to better analyze the event samples. Currently there are just a few
classes, PerfEvent is the base class for all perf events, PebsEvent is
a HW base Intel x86 PEBS event, and user could add more SW/HW event
classes based on requriements.
Signed-off-by: Feng Tang <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-08-08 12:53:08 -03:00
Arnaldo Carvalho de Melo
765532c8aa
perf script: Finish the rename from trace to script
...
The scripts have calls to 'perf trace' that need to be converted to 'perf script', do it.
This problem was introduced in 133dc4c .
Reported-by: Torok Edwin <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Tom Zanussi <[email protected] >
Cc: Torok Edwin <[email protected] >
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2010-12-25 11:29:02 -02:00
Ingo Molnar
133dc4c39c
perf: Rename 'perf trace' to 'perf script'
...
Free the perf trace name space and rename the trace to 'script' which is a
better match for the scripting engine.
Signed-off-by: Ingo Molnar <[email protected] >
Signed-off-by: Thomas Gleixner <[email protected] >
2010-11-16 19:37:44 +01:00
Arnaldo Carvalho de Melo
00204c3396
perf python scripting: Add futex-contention script
...
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 <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Tom Zanussi <[email protected] >
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2010-10-26 17:07:33 -02:00
Arnaldo Carvalho de Melo
7f6c1bd50d
perf python scripting: Support fedora 11 (audit 1.7.17)
...
Where we don't have the audit.MACH_ARMEB constant.
Cc: David S. Miller <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Tom Zanussi <[email protected] >
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2010-10-25 22:12:01 -02:00
Arnaldo Carvalho de Melo
6cc7361440
perf python scripting: Improve the failed-syscalls-by-pid script
...
. 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 name
Now 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 39
irqbalance [1462]
syscall: openat
err = ENOENT 4
perf [7888]
syscall: lseek
err = ESPIPE 1
syscall: open
err = ENOENT 24
perf [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 1
automount [1670]
syscall: futex
err = ETIMEDOUT 5
[root@emilia ~]#
Cc: David S. Miller <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Tom Zanussi <[email protected] >
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2010-10-25 18:46:41 -02:00
Frederic Weisbecker
1b0ff06e68
perf, sched migration: Librarize task states and event headers helpers
...
Librarize the task state and event headers helpers as they can
be generally useful.
Signed-off-by: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Nikhil Rao <[email protected] >
Cc: Tom Zanussi <[email protected] >
2010-08-02 01:32:00 +02:00
Frederic Weisbecker
df92b40848
perf, sched migration: Librarize the GUI class
...
Export the GUI facility in the common library path. It is
going to be useful for other scheduler views.
Signed-off-by: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Nikhil Rao <[email protected] >
Cc: Tom Zanussi <[email protected] >
2010-08-02 01:31:59 +02:00
Tom Zanussi
47902f3611
perf trace/scripting: Add rwtop and sctop scripts
...
A couple of scripts, one in Python and the other in Perl, that
demonstrate 'live mode' tracing. For each, the output of the
perf event stream is fed continuously to the script, which
continuously aggregates the data and reports the current results
every 3 seconds, or at the optionally specified interval. After
the current results are displayed, the aggregations are cleared
and the cycle begins anew.
To run the scripts, simply pipe the output of the 'perf trace
record' step as input to the corresponding 'perf trace report'
step, using '-' as the filename to -o and -i:
$ perf trace record sctop -o - | perf trace report sctop -i -
Also adds clear_term() utility functions to the Util.pm and
Util.py utility modules, for use by any script to clear the
screen.
Signed-off-by: Tom Zanussi <[email protected] >
Acked-by: Thomas Gleixner <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected] >
Signed-off-by: Ingo Molnar <[email protected] >
2010-04-14 11:56:08 +02:00
Tom Zanussi
7e4b21b84c
perf/scripts: Add Python scripting engine
...
Add base support for Python scripting to perf trace.
Signed-off-by: Tom Zanussi <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Steven Rostedt <[email protected] >
Cc: Keiichi KII <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
LKML-Reference: <[email protected] >
Signed-off-by: Frederic Weisbecker <[email protected] >
2010-02-25 04:07:29 +01:00