diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-06-17 20:46:29 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-06-17 20:46:29 (GMT) |
commit | 22538a0c799bcb82b40346849776e354fbc18fee (patch) | |
tree | dcefb55f7e1a6632c89fdd8592588747f16fa9e1 /test | |
parent | 53916f4e5935ae7c36d7dd6e04d1c5e51b7e78ea (diff) | |
download | hdf5-22538a0c799bcb82b40346849776e354fbc18fee.zip hdf5-22538a0c799bcb82b40346849776e354fbc18fee.tar.gz hdf5-22538a0c799bcb82b40346849776e354fbc18fee.tar.bz2 |
[svn-r429] Changes since 19980616
----------------------
./html/tracing.html NEW
This entire update is to make it possible for the library to
print the name, arguments, and return value of every API call
without requiring any extra work from developers or app
programmers. This file describes how this all works.
./configure.in
Added the `--enable-tracing' switch. If you use it then the
library will include code to print API function names,
argument names and values, and function return values.
However, you must then turn on the tracing by setting the
HDF5_TRACE environment variable to a file descriptor number.
The default is `--disable-tracing' since enabling it causes a
slight increase in library size and a slowdown resulting from
an extra function call for each API function call (I couldn't
even measure the slowdown :-)
./bin/trace NEW
A perl script that synchronizes the H5TRACE() macro calls in
the *.c files with the function return type and formal
argument names and types. If you use GNU make and gcc then
this will be done automatically, otherwise just invoke this
script with the names of one or more .c files. You could do
it by hand to, but encoding argument types is a little tricky
at first.
./config/commence.in
Added the $(TRACE) macro, which defaults to the no-op.
Added -D_POSIX_SOURCE to the compiler command line.
./src/Makefile.in
Override the default for $(TRACE).
./config/depend.in
Automatically calls $(TRACE) to synchronize the H5TRACE()
macros in any source file that changed. As with makefile
dependencies, one way to force synchronization of all files is
to remove the `.depend' file.
./MANIFEST
Added new files.
./src/H5Eprivate.h
Modified HRETURN_ERROR() and HRETURN() for tracing.
./src/H5.c
./src/H5private.h
This is where the real tracing work really happens, in
H5_trace().
./src/H5A.c
./src/H5D.c
./src/H5G.c
./src/H5P.c
./src/H5S.c
./src/H5Z.c
Added H5TRACE() calls to all API functions. You don't really
need these changes if you don't want to merge your stuff
because they can be generated automatically by going to the
hdf5/src directory and saying ../bin/trace *.c
./src/H5T.c
Added H5TRACE() calls. Other stuff below.
./src/H5E.c
./src/H5Epublic.h
Added H5TRACE() calls. Created a type H5E_auto_t for the
`func' argument of H5Eset_auto() and H5Eget_auto() to make
those arguments easier to parse for tracing. It should also
make it clearer for users that don't know how to read
complicated ANSI data types.
./src/H5F.c
Added H5TRACE() calls. Changed a couple `uintn' argument
types in API functions to `unsigned int' since `uintn' part of
the API. Changed a few "can't" and "cant" error messages to
"unable to".
./src/H5Ipublic.h
Removed H5_DIRECTORY from the H5I_group_t enum. It wasn't
used anywhere.
./src/H5Tconv.c
Removed an unused label.
./src/H5Fistore.c
./src/H5Oattr.c
./src/H5Odtype.c
./src/H5T.c
./test/dsets.c
./test/dtypes.c
Fixed a warning about a variable possibly used before it's
initialized. Added __unused__ to turn off some unused
argument warnings that pop up when debugging is turned off and
optimizations are turned on.
Diffstat (limited to 'test')
-rw-r--r-- | test/dsets.c | 2 | ||||
-rw-r--r-- | test/dtypes.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/test/dsets.c b/test/dsets.c index 576a575..cc81319 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -694,7 +694,7 @@ test_compression(hid_t file) static herr_t test_multiopen (hid_t file) { - hid_t dcpl, space, dset1, dset2; + hid_t dcpl=-1, space=-1, dset1=-1, dset2=-1; hsize_t cur_size[1] = {10}; static hsize_t max_size[1] = {H5S_UNLIMITED}; hsize_t tmp_size[1]; diff --git a/test/dtypes.c b/test/dtypes.c index a2f9a76..f60efd7 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -227,7 +227,7 @@ static herr_t test_transient (void) { static hsize_t ds_size[2] = {10, 20}; - hid_t file, type, space, dset, t2; + hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1; printf ("%-70s", "Testing transient data types"); if ((file=H5Fcreate (FILE_NAME_1, H5F_ACC_TRUNC|H5F_ACC_DEBUG, @@ -342,7 +342,7 @@ test_transient (void) static herr_t test_named (void) { - hid_t file, type, space, dset, t2, attr1; + hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1, attr1=-1; herr_t status; static hsize_t ds_size[2] = {10, 20}; |