From 57f0f512b273f60d52568b8c6b77e17f5636edc0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 5 Aug 2015 17:04:01 -0300 Subject: Initial import --- tools/perf/scripts/perl/bin/check-perf-trace-record | 2 ++ tools/perf/scripts/perl/bin/failed-syscalls-record | 3 +++ tools/perf/scripts/perl/bin/failed-syscalls-report | 10 ++++++++++ tools/perf/scripts/perl/bin/rw-by-file-record | 3 +++ tools/perf/scripts/perl/bin/rw-by-file-report | 10 ++++++++++ tools/perf/scripts/perl/bin/rw-by-pid-record | 2 ++ tools/perf/scripts/perl/bin/rw-by-pid-report | 3 +++ tools/perf/scripts/perl/bin/rwtop-record | 2 ++ tools/perf/scripts/perl/bin/rwtop-report | 20 ++++++++++++++++++++ tools/perf/scripts/perl/bin/wakeup-latency-record | 6 ++++++ tools/perf/scripts/perl/bin/wakeup-latency-report | 3 +++ 11 files changed, 64 insertions(+) create mode 100644 tools/perf/scripts/perl/bin/check-perf-trace-record create mode 100644 tools/perf/scripts/perl/bin/failed-syscalls-record create mode 100644 tools/perf/scripts/perl/bin/failed-syscalls-report create mode 100644 tools/perf/scripts/perl/bin/rw-by-file-record create mode 100644 tools/perf/scripts/perl/bin/rw-by-file-report create mode 100644 tools/perf/scripts/perl/bin/rw-by-pid-record create mode 100644 tools/perf/scripts/perl/bin/rw-by-pid-report create mode 100644 tools/perf/scripts/perl/bin/rwtop-record create mode 100644 tools/perf/scripts/perl/bin/rwtop-report create mode 100644 tools/perf/scripts/perl/bin/wakeup-latency-record create mode 100644 tools/perf/scripts/perl/bin/wakeup-latency-report (limited to 'tools/perf/scripts/perl/bin') diff --git a/tools/perf/scripts/perl/bin/check-perf-trace-record b/tools/perf/scripts/perl/bin/check-perf-trace-record new file mode 100644 index 000000000..423ad6aed --- /dev/null +++ b/tools/perf/scripts/perl/bin/check-perf-trace-record @@ -0,0 +1,2 @@ +#!/bin/bash +perf record -a -e kmem:kmalloc -e irq:softirq_entry -e kmem:kfree 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 000000000..74685f318 --- /dev/null +++ b/tools/perf/scripts/perl/bin/failed-syscalls-record @@ -0,0 +1,3 @@ +#!/bin/bash +(perf record -e raw_syscalls:sys_exit $@ || \ + perf record -e syscalls:sys_exit $@) 2> /dev/null 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 000000000..9f83cc1ad --- /dev/null +++ b/tools/perf/scripts/perl/bin/failed-syscalls-report @@ -0,0 +1,10 @@ +#!/bin/bash +# description: system-wide failed syscalls +# args: [comm] +if [ $# -gt 0 ] ; then + if ! expr match "$1" "-" > /dev/null ; then + comm=$1 + shift + fi +fi +perf script $@ -s "$PERF_EXEC_PATH"/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 new file mode 100644 index 000000000..33efc8673 --- /dev/null +++ b/tools/perf/scripts/perl/bin/rw-by-file-record @@ -0,0 +1,3 @@ +#!/bin/bash +perf record -e syscalls:sys_enter_read -e syscalls:sys_enter_write $@ + diff --git a/tools/perf/scripts/perl/bin/rw-by-file-report b/tools/perf/scripts/perl/bin/rw-by-file-report new file mode 100644 index 000000000..77200b3f3 --- /dev/null +++ b/tools/perf/scripts/perl/bin/rw-by-file-report @@ -0,0 +1,10 @@ +#!/bin/bash +# description: r/w activity for a program, by file +# args: +if [ $# -lt 1 ] ; then + echo "usage: rw-by-file " + exit +fi +comm=$1 +shift +perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/rw-by-file.pl $comm diff --git a/tools/perf/scripts/perl/bin/rw-by-pid-record b/tools/perf/scripts/perl/bin/rw-by-pid-record new file mode 100644 index 000000000..7cb9db230 --- /dev/null +++ b/tools/perf/scripts/perl/bin/rw-by-pid-record @@ -0,0 +1,2 @@ +#!/bin/bash +perf record -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write $@ diff --git a/tools/perf/scripts/perl/bin/rw-by-pid-report b/tools/perf/scripts/perl/bin/rw-by-pid-report new file mode 100644 index 000000000..a27b9f311 --- /dev/null +++ b/tools/perf/scripts/perl/bin/rw-by-pid-report @@ -0,0 +1,3 @@ +#!/bin/bash +# description: system-wide r/w activity +perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/rw-by-pid.pl diff --git a/tools/perf/scripts/perl/bin/rwtop-record b/tools/perf/scripts/perl/bin/rwtop-record new file mode 100644 index 000000000..7cb9db230 --- /dev/null +++ b/tools/perf/scripts/perl/bin/rwtop-record @@ -0,0 +1,2 @@ +#!/bin/bash +perf record -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write $@ diff --git a/tools/perf/scripts/perl/bin/rwtop-report b/tools/perf/scripts/perl/bin/rwtop-report new file mode 100644 index 000000000..83e11ec2e --- /dev/null +++ b/tools/perf/scripts/perl/bin/rwtop-report @@ -0,0 +1,20 @@ +#!/bin/bash +# description: system-wide r/w top +# args: [interval] +n_args=0 +for i in "$@" +do + if expr match "$i" "-" > /dev/null ; then + break + fi + n_args=$(( $n_args + 1 )) +done +if [ "$n_args" -gt 1 ] ; then + echo "usage: rwtop-report [interval]" + exit +fi +if [ "$n_args" -gt 0 ] ; then + interval=$1 + shift +fi +perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/rwtop.pl $interval diff --git a/tools/perf/scripts/perl/bin/wakeup-latency-record b/tools/perf/scripts/perl/bin/wakeup-latency-record new file mode 100644 index 000000000..464251a1b --- /dev/null +++ b/tools/perf/scripts/perl/bin/wakeup-latency-record @@ -0,0 +1,6 @@ +#!/bin/bash +perf record -e sched:sched_switch -e sched:sched_wakeup $@ + + + + diff --git a/tools/perf/scripts/perl/bin/wakeup-latency-report b/tools/perf/scripts/perl/bin/wakeup-latency-report new file mode 100644 index 000000000..889e8130c --- /dev/null +++ b/tools/perf/scripts/perl/bin/wakeup-latency-report @@ -0,0 +1,3 @@ +#!/bin/bash +# description: system-wide min/max/avg wakeup latency +perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/wakeup-latency.pl -- cgit v1.2.3-54-g00ecf