Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00b21a01 authored by Tom Zanussi's avatar Tom Zanussi Committed by Ingo Molnar
Browse files

perf trace/scripting: Enable scripting shell scripts for live mode



It should be possible to run any perf trace script in 'live
mode'. This requires being able to pass in e.g. '-i -' or other
args, which the current shell scripts aren't equipped to handle.
 In a few cases, there are required or optional args that also
need special handling. This patch makes changes the current set
of shell scripts as necessary.

Signed-off-by: default avatarTom Zanussi <tzanussi@gmail.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
Cc: k-keiichi@bx.jp.nec.com
Cc: acme@ghostprotocols.net
LKML-Reference: <1270184365-8281-11-git-send-email-tzanussi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 47902f36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
#!/bin/bash
perf record -c 1 -f -a -M -R -e raw_syscalls:sys_exit
perf record -c 1 -f -a -M -R -e raw_syscalls:sys_exit $@
+7 −1
Original line number Diff line number Diff line
#!/bin/bash
# description: system-wide failed syscalls
# args: [comm]
perf trace -s ~/libexec/perf-core/scripts/perl/failed-syscalls.pl $1
if [ $# -gt 0 ] ; then
    if ! expr match "$1" "-" ; then
	comm=$1
	shift
    fi
fi
perf trace $@ -s ~/libexec/perf-core/scripts/perl/failed-syscalls.pl $comm
+2 −1
Original line number Diff line number Diff line
#!/bin/bash
perf record -c 1 -f -a -M -R -e syscalls:sys_enter_read -e syscalls:sys_enter_write
perf record -c 1 -f -a -M -R -e syscalls:sys_enter_read -e syscalls:sys_enter_write $@
+7 −1
Original line number Diff line number Diff line
#!/bin/bash
# description: r/w activity for a program, by file
# args: <comm>
perf trace -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $1
if [ $# -lt 1 ] ; then
    echo "usage: rw-by-file <comm>"
    exit
fi
comm=$1
shift
perf trace $@ -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $comm


+1 −1
Original line number Diff line number Diff line
#!/bin/bash
perf record -c 1 -f -a -M -R -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write
perf record -c 1 -f -a -M -R -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write $@
Loading