strace-graph: handle strace -T
* strace-graph: Ignore extra ' <time.spent>' field added by strace -T.
diff --git a/strace-graph b/strace-graph
index 169c82c..b09c928 100755
--- a/strace-graph
+++ b/strace-graph
@@ -43,7 +43,7 @@
my $scale_factor = 3.5;
while (<>) {
- my ($pid, $call, $args, $result, $time);
+ my ($pid, $call, $args, $result, $time, $time_spent);
chop;
$floatform = 0;
@@ -88,6 +88,9 @@
}
($call, $args, $result) = /(\S+)\((.*)\)\s+= (.*)$/;
+ if ($result =~ /^(.*) <([0-9.]*)>$/) {
+ ($result, $time_spent) = ($1, $2);
+ }
unless (defined $result) {
print STDERR "$0: $ARGV: $.: cannot parse line.\n";
next;