From: Keith Owens Date: Mon, 18 Jan 2016 02:03:41 +0000 (+1100) Subject: strace-graph: handle strace -T X-Git-Tag: v4.12~594 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbc1ffb2a4975e781c665a61d9762a5ecb5e0f2b;p=strace strace-graph: handle strace -T * strace-graph: Ignore extra ' ' field added by strace -T. --- diff --git a/strace-graph b/strace-graph index 169c82c3..b09c9280 100755 --- a/strace-graph +++ b/strace-graph @@ -43,7 +43,7 @@ my $floatform; 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 @@ while (<>) { } ($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;