summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/perl/failed-syscalls.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/scripts/perl/failed-syscalls.pl')
-rw-r--r--tools/perf/scripts/perl/failed-syscalls.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/scripts/perl/failed-syscalls.pl b/tools/perf/scripts/perl/failed-syscalls.pl
index c18e7e27a84b..94bc25a347eb 100644
--- a/tools/perf/scripts/perl/failed-syscalls.pl
+++ b/tools/perf/scripts/perl/failed-syscalls.pl
@@ -11,6 +11,8 @@ use Perf::Trace::Core;
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});
}
}