diff options
| author | Michal Marek <mmarek@suse.cz> | 2010-08-04 07:59:13 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2010-08-04 07:59:13 -0400 |
| commit | 772320e84588dcbe1600ffb83e5f328f2209ac2a (patch) | |
| tree | a7de21b79340aeaa17c58126f6b801b82c77b53a /tools/perf/scripts | |
| parent | 1ce53adf13a54375d2a5c7cdbe341b2558389615 (diff) | |
| parent | 9fe6206f400646a2322096b56c59891d530e8d51 (diff) | |
Merge commit 'v2.6.35' into kbuild/kbuild
Conflicts:
arch/powerpc/Makefile
Diffstat (limited to 'tools/perf/scripts')
38 files changed, 976 insertions, 57 deletions
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Context.c b/tools/perf/scripts/perl/Perf-Trace-Util/Context.c index af78d9a52a7d..01a64ad693f2 100644 --- a/tools/perf/scripts/perl/Perf-Trace-Util/Context.c +++ b/tools/perf/scripts/perl/Perf-Trace-Util/Context.c | |||
| @@ -31,13 +31,14 @@ | |||
| 31 | #include "EXTERN.h" | 31 | #include "EXTERN.h" |
| 32 | #include "perl.h" | 32 | #include "perl.h" |
| 33 | #include "XSUB.h" | 33 | #include "XSUB.h" |
| 34 | #include "../../../util/trace-event-perl.h" | 34 | #include "../../../perf.h" |
| 35 | #include "../../../util/trace-event.h" | ||
| 35 | 36 | ||
| 36 | #ifndef PERL_UNUSED_VAR | 37 | #ifndef PERL_UNUSED_VAR |
| 37 | # define PERL_UNUSED_VAR(var) if (0) var = var | 38 | # define PERL_UNUSED_VAR(var) if (0) var = var |
| 38 | #endif | 39 | #endif |
| 39 | 40 | ||
| 40 | #line 41 "Context.c" | 41 | #line 42 "Context.c" |
| 41 | 42 | ||
| 42 | XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */ | 43 | XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */ |
| 43 | XS(XS_Perf__Trace__Context_common_pc) | 44 | XS(XS_Perf__Trace__Context_common_pc) |
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs b/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs index fb78006c165e..549cf0467d30 100644 --- a/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs +++ b/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | #include "EXTERN.h" | 22 | #include "EXTERN.h" |
| 23 | #include "perl.h" | 23 | #include "perl.h" |
| 24 | #include "XSUB.h" | 24 | #include "XSUB.h" |
| 25 | #include "../../../util/trace-event-perl.h" | 25 | #include "../../../perf.h" |
| 26 | #include "../../../util/trace-event.h" | ||
| 26 | 27 | ||
| 27 | MODULE = Perf::Trace::Context PACKAGE = Perf::Trace::Context | 28 | MODULE = Perf::Trace::Context PACKAGE = Perf::Trace::Context |
| 28 | PROTOTYPES: ENABLE | 29 | PROTOTYPES: ENABLE |
diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/Util.pm b/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/Util.pm index 052f132ced24..d94b40c8ac85 100644 --- a/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/Util.pm +++ b/tools/perf/scripts/perl/Perf-Trace-Util/lib/Perf/Trace/Util.pm | |||
| @@ -15,6 +15,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||
| 15 | 15 | ||
| 16 | our @EXPORT = qw( | 16 | our @EXPORT = qw( |
| 17 | avg nsecs nsecs_secs nsecs_nsecs nsecs_usecs print_nsecs | 17 | avg nsecs nsecs_secs nsecs_nsecs nsecs_usecs print_nsecs |
| 18 | clear_term | ||
| 18 | ); | 19 | ); |
| 19 | 20 | ||
| 20 | our $VERSION = '0.01'; | 21 | our $VERSION = '0.01'; |
| @@ -44,7 +45,7 @@ sub nsecs_secs { | |||
| 44 | sub nsecs_nsecs { | 45 | sub nsecs_nsecs { |
| 45 | my ($nsecs) = @_; | 46 | my ($nsecs) = @_; |
| 46 | 47 | ||
| 47 | return $nsecs - nsecs_secs($nsecs); | 48 | return $nsecs % $NSECS_PER_SEC; |
| 48 | } | 49 | } |
| 49 | 50 | ||
| 50 | sub nsecs_str { | 51 | sub nsecs_str { |
| @@ -55,6 +56,11 @@ sub nsecs_str { | |||
| 55 | return $str; | 56 | return $str; |
| 56 | } | 57 | } |
| 57 | 58 | ||
| 59 | sub clear_term | ||
| 60 | { | ||
| 61 | print "\x1b[H\x1b[2J"; | ||
| 62 | } | ||
| 63 | |||
| 58 | 1; | 64 | 1; |
| 59 | __END__ | 65 | __END__ |
| 60 | =head1 NAME | 66 | =head1 NAME |
diff --git a/tools/perf/scripts/perl/bin/check-perf-trace-record b/tools/perf/scripts/perl/bin/check-perf-trace-record index c7ec5de2f535..423ad6aed056 100644 --- a/tools/perf/scripts/perl/bin/check-perf-trace-record +++ b/tools/perf/scripts/perl/bin/check-perf-trace-record | |||
| @@ -1,7 +1,2 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | perf record -c 1 -f -a -M -R -e kmem:kmalloc -e irq:softirq_entry | 2 | perf record -a -e kmem:kmalloc -e irq:softirq_entry -e kmem:kfree |
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | |||
| 7 | |||
diff --git a/tools/perf/scripts/perl/bin/check-perf-trace-report b/tools/perf/scripts/perl/bin/check-perf-trace-report deleted file mode 100644 index 7fc4a033dd49..000000000000 --- a/tools/perf/scripts/perl/bin/check-perf-trace-report +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # description: useless but exhaustive test script | ||
| 3 | perf trace -s ~/libexec/perf-core/scripts/perl/check-perf-trace.pl | ||
| 4 | |||
| 5 | |||
| 6 | |||
diff --git a/tools/perf/scripts/perl/bin/failed-syscalls-record b/tools/perf/scripts/perl/bin/failed-syscalls-record new file mode 100644 index 000000000000..eb5846bcb565 --- /dev/null +++ b/tools/perf/scripts/perl/bin/failed-syscalls-record | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | perf record -a -e raw_syscalls:sys_exit $@ | ||
diff --git a/tools/perf/scripts/perl/bin/failed-syscalls-report b/tools/perf/scripts/perl/bin/failed-syscalls-report new file mode 100644 index 000000000000..e3a5e55d54ff --- /dev/null +++ b/tools/perf/scripts/perl/bin/failed-syscalls-report | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # description: system-wide failed syscalls | ||
| 3 | # args: [comm] | ||
| 4 | if [ $# -gt 0 ] ; then | ||
| 5 | if ! expr match "$1" "-" > /dev/null ; then | ||
| 6 | comm=$1 | ||
| 7 | shift | ||
| 8 | fi | ||
| 9 | fi | ||
| 10 | perf trace $@ -s ~/libexec/perf-core/scripts/perl/failed-syscalls.pl $comm | ||
diff --git a/tools/perf/scripts/perl/bin/rw-by-file-record b/tools/perf/scripts/perl/bin/rw-by-file-record index b25056ebf963..5bfaae5a6cba 100644 --- a/tools/perf/scripts/perl/bin/rw-by-file-record +++ b/tools/perf/scripts/perl/bin/rw-by-file-record | |||
| @@ -1,2 +1,3 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | perf record -c 1 -f -a -M -R -e syscalls:sys_enter_read -e syscalls:sys_enter_write | 2 | perf record -a -e syscalls:sys_enter_read -e syscalls:sys_enter_write $@ |
| 3 | |||
diff --git a/tools/perf/scripts/perl/bin/rw-by-file-report b/tools/perf/scripts/perl/bin/rw-by-file-report index eddb9ccce6a5..d83070b7eeb5 100644 --- a/tools/perf/scripts/perl/bin/rw-by-file-report +++ b/tools/perf/scripts/perl/bin/rw-by-file-report | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | # description: r/w activity for a program, by file | 2 | # description: r/w activity for a program, by file |
| 3 | # args: <comm> | 3 | # args: <comm> |
| 4 | perf trace -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $1 | 4 | if [ $# -lt 1 ] ; then |
| 5 | echo "usage: rw-by-file <comm>" | ||
| 6 | exit | ||
| 7 | fi | ||
| 8 | comm=$1 | ||
| 9 | shift | ||
| 10 | perf trace $@ -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $comm | ||
| 5 | 11 | ||
