Merge branch 'es/trace2-log-parent-process-name'

trace2 logs learned to show parent process name to see in what
context Git was invoked.

* es/trace2-log-parent-process-name:
  tr2: log parent process name
  tr2: make process info collection platform-generic
This commit is contained in:
Junio C Hamano
2021-08-24 15:32:40 -07:00
14 changed files with 184 additions and 7 deletions

View File

@ -42,6 +42,12 @@ while (<>) {
# so just omit it for testing purposes.
# print "cmd_path _EXE_\n";
}
elsif ($line =~ m/^cmd_ancestry/) {
# 'cmd_ancestry' is not implemented everywhere, so for portability's
# sake, skip it when parsing normal.
#
# print "$line";
}
else {
print "$line";
}

View File

@ -44,6 +44,11 @@ while (<>) {
# $tokens[$col_rest] = "_EXE_";
goto SKIP_LINE;
}
elsif ($tokens[$col_event] =~ m/cmd_ancestry/) {
# 'cmd_ancestry' is platform-specific and not implemented everywhere,
# so skip it.
goto SKIP_LINE;
}
elsif ($tokens[$col_event] =~ m/child_exit/) {
$tokens[$col_rest] =~ s/ pid:\d* / pid:_PID_ /;
}

View File

@ -132,7 +132,10 @@ while (<>) {
# just omit it for testing purposes.
# $processes->{$sid}->{'path'} = "_EXE_";
}
elsif ($event eq 'cmd_ancestry') {
# 'cmd_ancestry' is platform-specific and not implemented everywhere, so
# just skip it for testing purposes.
}
elsif ($event eq 'cmd_name') {
$processes->{$sid}->{'name'} = $line->{'name'};
$processes->{$sid}->{'hierarchy'} = $line->{'hierarchy'};