diff --git a/xapian-maintainer-tools/profiling/strace-analyse b/xapian-maintainer-tools/profiling/strace-analyse
index 4c985b3..2a67277 100755
|
a
|
b
|
while (<>) {
|
| 72 | 72 | my $block = $off / $blocksize; |
| 73 | 73 | $path //= $fd[$fd]; |
| 74 | 74 | print "read $block from $path\n"; |
| | 75 | $time_t = int($time_t * 1000000); |
| | 76 | $systime = int($systime * 1000000); |
| | 77 | print STDERR "r$1,$time_t,$systime,$off,$blocksize\n"; |
| 75 | 78 | } elsif (/^pwrite(?:64)?\((\d+)(?:<(.*?)>)?, .*, (\d+), (\d+)\)/) { |
| 76 | 79 | my ($fd, $path, $blocksize, $off) = ($1, $2, $3, $4); |
| 77 | 80 | my $block = $off / $blocksize; |
| 78 | 81 | $path //= $fd[$fd]; |
| 79 | 82 | print "write $block to $path\n"; |
| | 83 | $time_t = int($time_t * 1000000); |
| | 84 | $systime = int($systime * 1000000); |
| | 85 | print STDERR "w$1,$time_t,$systime,$off,$blocksize\n"; |
| 80 | 86 | } elsif (/^open\("(.*)".* = (\d+)$/) { |
| 81 | 87 | $fd[$2] = $1; |
| | 88 | $time_t = int($time_t * 1000000); |
| | 89 | $systime = int($systime * 1000000); |
| | 90 | print STDERR "o$2,$time_t,$systime,$1\n"; |
| 82 | 91 | } elsif (/^close\((\d+)\)/) { |
| 83 | 92 | $fd[$1] = undef; |
| | 93 | $time_t = int($time_t * 1000000); |
| | 94 | $systime = int($systime * 1000000); |
| | 95 | print STDERR "c$1,$time_t,$systime,\n"; |
| 84 | 96 | } elsif (/^dup[23]?\((\d+)[^<].* = (\d+)/) { |
| 85 | 97 | $fd[$2] = $fd[$1]; |
| 86 | 98 | } elsif (/^f(?:data)?sync\((\d+)(?:<(.*?)>)?\)/) { |
| 87 | 99 | my $path = $2 // $fd[$1]; |
| 88 | 100 | print "sync $path\n"; |
| | 101 | $time_t = int($time_t * 1000000); |
| | 102 | $systime = int($systime * 1000000); |
| | 103 | print STDERR "s$1,$time_t,$systime,\n"; |
| 89 | 104 | } |
| 90 | 105 | } |