syswrap openat2 for all linux arches
[valgrind.git] / gdbserver_tests / filter_helgrind_monitor_solaris
blobf3cded088d8e9ddcf177a7b1fdd7494ccd8f9fb6
1 #!/usr/bin/env perl
4 # Filter out all helgrind information about locks except the one named "mx".
5 # One lock record looks like:
6 # Lock ga 0x........ {
7 # Address 0x........ is 9728 bytes inside data symbol "_uberdata"
8 # kind mbRec
9 # }
11 use strict;
12 use warnings;
14 my $lock_start_line = undef;
15 my $skip_to_closing_line = 0;
16 while (<STDIN>) {
17 my $line = $_;
18 chomp($line);
19 if ($line =~ /^Lock ga 0x[\.]+\s+{$/) {
20 $lock_start_line = $line;
21 $skip_to_closing_line = 1;
22 } elsif (($lock_start_line) &&
23 ($line =~ /\s*Address 0x[\.]+ is \d+ bytes inside data symbol "(\S+)"/)) {
24 if ($1 eq "mx") {
25 print "$lock_start_line\n";
26 print "$line\n";
27 $skip_to_closing_line = 0;
29 } elsif ($line =~ /^}$/) {
30 if ($skip_to_closing_line == 0) {
31 print "$line\n";
33 undef($lock_start_line);
34 $skip_to_closing_line = 0;
35 } else {
36 if ($skip_to_closing_line == 0) {
37 print "$line\n";
42 exit 0;