summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/perl/bin/rw-by-file-report
diff options
context:
space:
mode:
authorTom Zanussi2010-04-02 06:59:24 +0200
committerIngo Molnar2010-04-14 11:56:08 +0200
commit00b21a01935892a2b97613f10300434998f45093 (patch)
tree574181758da96e53edbc73ac9b6870cb5ee2b01c /tools/perf/scripts/perl/bin/rw-by-file-report
parentperf trace/scripting: Add rwtop and sctop scripts (diff)
downloadkernel-qcow2-linux-00b21a01935892a2b97613f10300434998f45093.tar.gz
kernel-qcow2-linux-00b21a01935892a2b97613f10300434998f45093.tar.xz
kernel-qcow2-linux-00b21a01935892a2b97613f10300434998f45093.zip
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: Tom Zanussi <tzanussi@gmail.com> Acked-by: Thomas 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: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/scripts/perl/bin/rw-by-file-report')
-rw-r--r--tools/perf/scripts/perl/bin/rw-by-file-report8
1 files changed, 7 insertions, 1 deletions
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 @@
#!/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