|
@@ -31,10 +31,12 @@ open(IN, $in) or die "open $in: $!";
|
|
|
chdir($dir) or die "chdir $dir: $!";
|
|
|
|
|
|
while (<IN>) {
|
|
|
- if (/^(disable |(tcg) |vcpu )*([a-z_0-9]+)\(/i) {
|
|
|
- my $pat = "trace_$3";
|
|
|
- $pat .= '_tcg' if (defined $2);
|
|
|
- open GREP, '-|', 'git', 'grep', '-lw', '--max-depth', '1', $pat
|
|
|
+ if (/^(disable |(tcg) |(vcpu) )*([a-z_0-9]+)\(/i) {
|
|
|
+ my $pat = "trace_$4";
|
|
|
+ $pat .= '_tcg' if defined $2;
|
|
|
+ open GREP, '-|', 'git', 'grep', '-lw',
|
|
|
+ defined $3 ? () : ('--max-depth', '1'),
|
|
|
+ $pat
|
|
|
or die "run git grep: $!";
|
|
|
while (my $fname = <GREP>) {
|
|
|
chomp $fname;
|