path: root/tools/perf/scripts/perl/
diff options
authorTom Zanussi <>2009-12-15 02:53:35 -0600
committerIngo Molnar <>2009-12-15 10:31:31 +0100
commit586bc5cce88be993dad584c3936c49f945368551 (patch)
treef335951b59c1106918ced48a6e1242e131808225 /tools/perf/scripts/perl/
parentc249a4ce796b30b742bb4854bf3039ced12ef8e5 (diff)
perf trace/scripting: Add support for script args
One oversight of the original scripting_ops patch was a lack of support for passing args to handler scripts. This adds argc/argv to the start_script() scripting_op, and changes the rw-by-file script to take 'comm' arg rather than the 'perf' value currently hard-coded. It also takes the opportunity to do some related minor cleanup. Signed-off-by: Tom Zanussi <> Cc: Cc: LKML-Reference: <> Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'tools/perf/scripts/perl/')
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/scripts/perl/ b/tools/perf/scripts/perl/
index 61f91561d848..2a39097687b9 100644
--- a/tools/perf/scripts/perl/
+++ b/tools/perf/scripts/perl/
@@ -18,8 +18,9 @@ use lib "./Perf-Trace-Util/lib";
use Perf::Trace::Core;
use Perf::Trace::Util;
-# change this to the comm of the program you're interested in
-my $for_comm = "perf";
+my $usage = "perf trace -s <comm>\n";
+my $for_comm = shift or die $usage;
my %reads;
my %writes;