summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-06-17 20:46:29 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-06-17 20:46:29 (GMT)
commit22538a0c799bcb82b40346849776e354fbc18fee (patch)
treedcefb55f7e1a6632c89fdd8592588747f16fa9e1 /src/H5S.c
parent53916f4e5935ae7c36d7dd6e04d1c5e51b7e78ea (diff)
downloadhdf5-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 'src/H5S.c')
-rw-r--r--src/H5S.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 0d44675..7923f31 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -108,13 +108,14 @@ H5S_term_interface(void)
*-------------------------------------------------------------------------
*/
hid_t
-H5Screate_simple(int rank, const hsize_t *dims, const hsize_t *maxdims)
+H5Screate_simple (int rank, const hsize_t *dims, const hsize_t *maxdims)
{
H5S_t *ds = NULL;
hid_t ret_value = FAIL;
int i;
FUNC_ENTER(H5Screate, FAIL);
+ H5TRACE3("i","Is*h*h",rank,dims,maxdims);
/* Check arguments */
if (rank<0) {
@@ -190,9 +191,10 @@ H5Screate_simple(int rank, const hsize_t *dims, const hsize_t *maxdims)
*-------------------------------------------------------------------------
*/
herr_t
-H5Sclose(hid_t space_id)
+H5Sclose (hid_t space_id)
{
FUNC_ENTER(H5Sclose, FAIL);
+ H5TRACE1("e","i",space_id);
/* Check args */
if (H5_DATASPACE != H5I_group(space_id) ||
@@ -311,6 +313,7 @@ H5Scopy (hid_t space_id)
hid_t ret_value = FAIL;
FUNC_ENTER (H5Scopy, FAIL);
+ H5TRACE1("i","i",space_id);
/* Check args */
if (H5_DATASPACE!=H5I_group (space_id) ||
@@ -419,12 +422,13 @@ H5S_copy(const H5S_t *src)
*-------------------------------------------------------------------------
*/
hsize_t
-H5Sget_npoints(hid_t space_id)
+H5Sget_npoints (hid_t space_id)
{
H5S_t *ds = NULL;
hsize_t ret_value = 0;
FUNC_ENTER(H5Sget_npoints, 0);
+ H5TRACE1("h","i",space_id);
/* Check args */
if (H5_DATASPACE != H5I_group(space_id) ||
@@ -583,12 +587,13 @@ H5S_get_npoints_max(const H5S_t *ds)
*-------------------------------------------------------------------------
*/
int
-H5Sget_ndims(hid_t space_id)
+H5Sget_ndims (hid_t space_id)
{
H5S_t *ds = NULL;
intn ret_value = 0;
FUNC_ENTER(H5Sget_ndims, FAIL);
+ H5TRACE1("Is","i",space_id);
/* Check args */
if (H5_DATASPACE != H5I_group(space_id) ||
@@ -668,12 +673,13 @@ H5S_get_ndims(const H5S_t *ds)
*-------------------------------------------------------------------------
*/
int
-H5Sget_dims(hid_t space_id, hsize_t dims[]/*out*/)
+H5Sget_dims (hid_t space_id, hsize_t dims[]/*out*/)
{
H5S_t *ds = NULL;
intn ret_value = 0;
FUNC_ENTER(H5Sget_dims, FAIL);
+ H5TRACE1("Is","i",space_id);
/* Check args */
if (H5_DATASPACE != H5I_group(space_id) ||
@@ -974,13 +980,14 @@ H5S_is_simple(const H5S_t *sdim)
This function determines the if a dataspace is "simple". ie. if it
has orthogonal, evenly spaced dimensions.
--------------------------------------------------------------------------*/
-hbool_t
-H5Sis_simple(hid_t sid)
+hbool_t
+H5Sis_simple (hid_t sid)
{
H5S_t *space = NULL; /* dataspace to modify */
hbool_t ret_value = FAIL;
FUNC_ENTER(H5Sis_simple, FAIL);
+ H5TRACE1("b","i",sid);
/* Check args and all the boring stuff. */
if ((space = H5I_object(sid)) == NULL)
@@ -1019,13 +1026,14 @@ H5Sis_simple(hid_t sid)
be unlimited in size.
--------------------------------------------------------------------------*/
herr_t
-H5Sset_space(hid_t sid, int rank, const hsize_t *dims)
+H5Sset_space (hid_t sid, int rank, const hsize_t *dims)
{
H5S_t *space = NULL; /* dataspace to modify */
intn u; /* local counting variable */
herr_t ret_value = SUCCEED;
FUNC_ENTER(H5Sset_space, FAIL);
+ H5TRACE3("e","iIs*h",sid,rank,dims);
/* Check args */
if ((space = H5I_object(sid)) == NULL) {
@@ -1117,7 +1125,7 @@ H5Sset_space(hid_t sid, int rank, const hsize_t *dims)
datasets which extend in arbitrary directions.
--------------------------------------------------------------------------*/
herr_t
-H5Sset_hyperslab(hid_t sid, const hssize_t *start, const hsize_t *count,
+H5Sset_hyperslab (hid_t sid, const hssize_t *start, const hsize_t *count,
const hsize_t *stride)
{
H5S_t *space = NULL; /* dataspace to modify */
@@ -1126,6 +1134,7 @@ H5Sset_hyperslab(hid_t sid, const hssize_t *start, const hsize_t *count,
herr_t ret_value = SUCCEED;
FUNC_ENTER(H5Sset_hyperslab, FAIL);
+ H5TRACE4("e","i*Hs*h*h",sid,start,count,stride);
/* Get the object */
if (H5_DATASPACE != H5I_group(sid) || (space = H5I_object(sid)) == NULL) {
@@ -1212,6 +1221,7 @@ H5Sget_hyperslab (hid_t sid, hssize_t offset[]/*out*/, hsize_t size[]/*out*/,
intn ret_value = FAIL;
FUNC_ENTER (H5Sget_hyperslab, FAIL);
+ H5TRACE1("Is","i",sid);
/* Check args */
if (H5_DATASPACE!=H5I_group (sid) || NULL==(ds=H5I_object (sid))) {