diff --git a/[refs] b/[refs] index 698ff6d5335e..4655a5f0ba6a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fefb0b94bbab858be0909a7eb5ef357e0f996a79 +refs/heads/master: c3f5fd287aa897f710f3305367a1d256c9cf3e83 diff --git a/trunk/tools/perf/scripts/perl/bin/failed-syscalls-report b/trunk/tools/perf/scripts/perl/bin/failed-syscalls-report index f6346082a8fc..e3a5e55d54ff 100644 --- a/trunk/tools/perf/scripts/perl/bin/failed-syscalls-report +++ b/trunk/tools/perf/scripts/perl/bin/failed-syscalls-report @@ -2,7 +2,7 @@ # description: system-wide failed syscalls # args: [comm] if [ $# -gt 0 ] ; then - if ! expr match "$1" "-" ; then + if ! expr match "$1" "-" > /dev/null ; then comm=$1 shift fi diff --git a/trunk/tools/perf/scripts/perl/failed-syscalls.pl b/trunk/tools/perf/scripts/perl/failed-syscalls.pl index c18e7e27a84b..94bc25a347eb 100644 --- a/trunk/tools/perf/scripts/perl/failed-syscalls.pl +++ b/trunk/tools/perf/scripts/perl/failed-syscalls.pl @@ -11,6 +11,8 @@ use Perf::Trace::Context; use Perf::Trace::Util; +my $for_comm = shift; + my %failed_syscalls; sub raw_syscalls::sys_exit @@ -33,6 +35,8 @@ sub trace_end foreach my $comm (sort {$failed_syscalls{$b} <=> $failed_syscalls{$a}} keys %failed_syscalls) { - printf("%-20s %10s\n", $comm, $failed_syscalls{$comm}); + next if ($for_comm && $comm ne $for_comm); + + printf("%-20s %10s\n", $comm, $failed_syscalls{$comm}); } }