mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-09 07:32:32 +08:00
841e168a04
---------------------- ./config/conclude.in ./test/Makefile.in ./tools/Makefile.in The Makefile $TESTS variable has finally been split into $TEST_PROGS and $TEST_SCRIPTS with the latter being the names of shell scripts that need to be run with `/bin/sh'. Now we don't have to copy each shell script before we run it. NOTE: THIS CHANGE DOES NOT AFFECT THE PABLO MAKEFILE SINCE THAT FILE IS A COPY OF A PREVIOUSLY GENERATED MAKEFILE. ./src/Makefile.in Added H5Snone.c to the source list. ./src/H5G.c Plugged a memory leak by emptying the object type "isa" table when the library is closed. ./src/H5Tconv.c ./src/H5Tpkg.h Added 48 new type functions to take advantage of hardware for integer type conversions. These functions are not registered in the conversion table yet because I haven't fully tested them. ./src/H5Tpkg.h Removed __unused__ qualifiers from prototypes.
54 lines
1.4 KiB
Perl
Executable File
54 lines
1.4 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
# Usage: pipe the output of Linux's `strace' program into the stdin of
|
|
# this command, and the output of this command into gnuplot.
|
|
|
|
my $filename = shift || "tstab2.h5";
|
|
my $total = 0;
|
|
my %What; # What{pos}{nbytes}{r|w} = naccesses
|
|
|
|
while (<>) {
|
|
if (!defined $fd) {
|
|
if (/^open\("(.*?)".*=\s+(\d+)/ && $1 eq $filename) {
|
|
$fd = $2;
|
|
$pos = 0;
|
|
}
|
|
} elsif (/^close\((\d+)/ && $1==$fd) {
|
|
$fd = undef;
|
|
} elsif (/^lseek\((\d+), -?\d+,.*= (\d+)/ &&
|
|
$1==$fd && $2>=0) {
|
|
$pos = $2;
|
|
} elsif (/^lseek\((\d+),/ && $1==$fd) {
|
|
die $_;
|
|
} elsif (/^write\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ &&
|
|
$1==$fd && $3>=0) {
|
|
my $nbytes = $3;
|
|
$What{$pos}{$nbytes}{w}++;
|
|
printf "%d %d\n", $total, $pos;
|
|
$pos += $nbytes;
|
|
$total += $nbytes;
|
|
} elsif (/^write\((\d+),/ && $1==$fd) {
|
|
die $_;
|
|
} elsif (/^read\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ &&
|
|
$1==$fd && $3>=0) {
|
|
my $nbytes = $3;
|
|
$What{$pos}{$nbytes}{r}++;
|
|
printf "%d %d\n", $total, $pos;
|
|
$pos += $nbytes;
|
|
$total += $nbytes;
|
|
} elsif (/^read\((\d+),/ && $1==$fd) {
|
|
die $_;
|
|
}
|
|
}
|
|
|
|
|
|
print "="x36, "\n";
|
|
printf "%8s %8s %8s %8s\n","Position","NBytes","NReads","NWrites";
|
|
for $pos (sort {$a<=>$b} keys %What) {
|
|
for $nbytes (sort {$a<=>$b} keys %{$What{$pos}}) {
|
|
printf "%8d %8d %8d %8d\n", $pos, $nbytes,
|
|
$What{$pos}{$nbytes}{r},
|
|
$What{$pos}{$nbytes}{w};
|
|
}
|
|
}
|