]> granicus.if.org Git - strace/commitdiff
strace-graph: print the pid in the graph
authorKeith Owens <kaos.ocs@gmail.com>
Mon, 18 Jan 2016 02:15:36 +0000 (13:15 +1100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 5 Feb 2016 00:41:23 +0000 (00:41 +0000)
* strace-graph: Prefix each command with its pid.

strace-graph

index 680eb5f1ee54854ba7bad063040ce391df0da1f5..5435e864b859eaffea4ec0f273179ba28ccf50f3 100755 (executable)
@@ -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) {