mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-09 07:32:32 +08:00
eb8747499d
---------------------- ./MANIFEST ./configure.in ./configure [REGENERATED] Added more checking for `make' features. ./Makefile.in ./doc/Makefile.in ./doc/html/Makefile.in ./doc/html/Tutor/Makefile.in ./examples/Makefile.in ./pablo/Makefile.in ./src/Makefile.in ./test/Makefile.in ./testpar/Makefile.in ./tools/Makefile.in ./config/commence.in ./config/conclude.in ./config/depend.in [REMOVED] ./config/depend1.in [NEW] ./config/depend2.in [NEW] ./config/depend3.in [NEW] ./config/depend4.in [NEW] ./config/dependN.in [NEW] The directory search stuff was moved into commence.in, thereby shortening the Makefile.in prologues. ./doc/html/Dependencies [NEW] ./doc/html/Tutor/Dependencies [NEW] ./examples/Dependencies [NEW] ./src/Dependencies [NEW] ./test/Dependencies [NEW] ./testpar/Dependencies [NEW] ./tools/Dependencies [NEW] The `.distdep' files were all renamed to `Dependencies' to make them more obvious. They are required (but may be empty) in every directory that has a Makefile.in that ends with @CONCLUDE@ (you'll get an obvious error from make if you forgot to create one). ./bin/trace ./src/H5.c Added H5E_major_t and H5E_minor_t although tracing only prints the integer value. ./src/H5E.c ./src/H5Epublic.h Added tracing information. ./src/H5FDcore.c ./src/H5FDfamily.c ./src/H5FDgass.c ./src/H5FDmpio.c ./src/H5FDsec2.c ./src/H5FDstdio.c Fixed places where FUNC_LEAVE() evaluated it's argument more than once. Added tracing information. Wrapped long lines. ./config/gnu-flags Fixed a syntax error when we don't have a gnu compiler.
86 lines
2.3 KiB
Perl
Executable File
86 lines
2.3 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 ($fast,$npasses);
|
|
if ($ARGV[0] =~ /^--?fast$/) {
|
|
$fast = 1;
|
|
shift;
|
|
}
|
|
|
|
my $filename = shift || "tstab2.h5";
|
|
my $total = 0;
|
|
my %What; # What{pos}{nbytes}{r|w} = naccesses
|
|
my($total_writes, $total_bytes_out, $total_reads, $total_bytes_in);
|
|
|
|
while (<>) {
|
|
if (!defined $fd) {
|
|
if (/^open\("(.*?)".*=\s+(\d+)/ && $1 eq $filename) {
|
|
$fd = $2;
|
|
$pos = 0;
|
|
}
|
|
} elsif (/^close\((\d+)/ && $1==$fd) {
|
|
$fd = undef;
|
|
} elsif (!$fast &&
|
|
/^lseek\((\d+), -?\d+,.*= (\d+)/ &&
|
|
$1==$fd && $2>=0) {
|
|
$pos = $2;
|
|
} elsif (!$fast && /^lseek\((\d+),/ && $1==$fd) {
|
|
die $_;
|
|
} elsif (/^write\((\d+), ".*?"(\.\.\.)?, \d+\)\s*= (\d+)/ &&
|
|
$1==$fd && $3>=0) {
|
|
my $nbytes = $3;
|
|
if ($fast) {
|
|
$total_writes++;
|
|
$total_bytes_out += $nbytes;
|
|
} else {
|
|
$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;
|
|
if ($fast) {
|
|
$total_reads++;
|
|
$total_bytes_in += $nbytes;
|
|
} else {
|
|
$What{$pos}{$nbytes}{r}++;
|
|
printf "%d %d\n", $total, $pos;
|
|
$pos += $nbytes;
|
|
$total += $nbytes;
|
|
}
|
|
} elsif (/^read\((\d+),/ && $1==$fd) {
|
|
die $_;
|
|
}
|
|
}
|
|
|
|
|
|
if (!$fast) {
|
|
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});
|
|
$total_writes += $What{$pos}{$nbytes}{w};
|
|
$total_reads += $What{$pos}{$nbytes}{r};
|
|
$total_bytes_out += $What{$pos}{$nbytes}{w} * $nbytes;
|
|
$total_bytes_in += $What{$pos}{$nbytes}{r} * $nbytes;
|
|
}
|
|
}
|
|
}
|
|
|
|
print "="x36, "\n";
|
|
printf("Write: %8d calls, %10d total bytes, %10g average bytes\n",
|
|
$total_writes, $total_bytes_out, $total_bytes_out/$total_writes)
|
|
if $total_writes;
|
|
printf("Read: %8d calls, %10d total bytes, %10g average bytes\n",
|
|
$total_reads, $total_bytes_in, $total_bytes_in/$total_reads)
|
|
if $total_reads;
|