2 # Copyright (C) 2013 Red Hat, Inc.
5 # Markus Armbruster <armbru@redhat.com>
7 # This work is licensed under the terms of the GNU GPL, version 2 or
8 # later. See the COPYING file in the top-level directory.
10 # Usage: cleanup-trace-events.pl trace-events
12 # Print cleaned up trace-events to standard output.
27 if (/^(disable )?([a-z_0-9]+)\(/) {
28 open GREP
, '-|', 'git', 'grep', '-lw', "trace_$2"
29 or die "run git grep: $!";
31 while ($fname = <GREP
>) {
33 next if $seen{$fname} || $fname eq 'trace-events';
35 $buf = "# $fname\n" . $buf;
38 die "close git grep: $!"
42 } elsif (/^# ([^ ]*\.[ch])$/) {
46 warn "unintelligible line";