strace-graph: print the pid in the graph

* strace-graph: Prefix each command with its pid.
This commit is contained in:
Keith Owens 2016-01-18 13:15:36 +11:00 committed by Dmitry V. Levin
parent 7e0ba4bdcc
commit 320fb41682

View File

@ -314,10 +314,10 @@ sub display_pid_trace {
if ($$elem[0] eq 'EXEC') {
my $argv = $$elem[2];
if (defined $elapsed) {
print "$lead [$elapsed] @$argv\n";
print "$lead [$elapsed] $pid @$argv\n";
undef $elapsed;
} else {
print "$lead @$argv\n";
print "$lead $pid @$argv\n";
}
} elsif ($$elem[0] eq 'FORK') {
if ($i == 1) {