strace-graph: handle recent strace output
* strace-graph: Fix regex for --SIG. Ignore '+++ exited with <n> +++' lines. Handle exit_group syscall as well as _exit.
This commit is contained in:
parent
dbc1ffb2a4
commit
ef445b5daf
10
strace-graph
10
strace-graph
@ -75,7 +75,7 @@ while (<>) {
|
||||
delete $unfinished{$pid};
|
||||
}
|
||||
|
||||
if (/^--- SIG(\S+) \(.*\) ---$/) {
|
||||
if (/^--- SIG(\S+) (.*) ---$/) {
|
||||
# $pid received signal $1
|
||||
# currently we don't do anything with this
|
||||
next;
|
||||
@ -87,6 +87,12 @@ while (<>) {
|
||||
next;
|
||||
}
|
||||
|
||||
if (/^\+\+\+ exited with (\d+) \+\+\+$/) {
|
||||
# $pid exited $1
|
||||
# currently we don't do anything with this
|
||||
next;
|
||||
}
|
||||
|
||||
($call, $args, $result) = /(\S+)\((.*)\)\s+= (.*)$/;
|
||||
if ($result =~ /^(.*) <([0-9.]*)>$/) {
|
||||
($result, $time_spent) = ($1, $2);
|
||||
@ -244,7 +250,7 @@ sub handle_trace {
|
||||
push @$seq, ['FORK', $result];
|
||||
$pr{$pid}{seq} = $seq;
|
||||
$pr{$result}{parent} = $pid;
|
||||
} elsif ($call eq '_exit') {
|
||||
} elsif ($call eq '_exit' || $call eq 'exit_group') {
|
||||
$pr{$pid}{end} = $time if defined $time;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user