mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 01:51:39 +00:00
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 <tzanussi@gmail.com> Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org LKML-Reference: <1260867220-15699-2-git-send-email-tzanussi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c249a4ce79
commit
586bc5cce8
5 changed files with 38 additions and 26 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
perf trace -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl
|
||||
perf trace -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $1
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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 rw-by-file.pl <comm>\n";
|
||||
|
||||
my $for_comm = shift or die $usage;
|
||||
|
||||
my %reads;
|
||||
my %writes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue