summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5.c25
-rw-r--r--src/H5E.c2
-rw-r--r--src/H5G.c4
-rw-r--r--src/H5Pdcpl.c7
-rw-r--r--src/H5Pgcpl.c6
-rwxr-xr-xsrc/H5Pocpl.c2
-rw-r--r--src/H5T.c1
-rw-r--r--src/H5Tcommit.c1
-rwxr-xr-xsrc/Makefile.am18
-rw-r--r--src/Makefile.in22
10 files changed, 85 insertions, 3 deletions
diff --git a/src/H5.c b/src/H5.c
index 86322a2..00bcc38 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -2984,6 +2984,31 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
case 'Z':
switch (type[1]) {
+ case 'a':
+ if (ptr) {
+ if (vp) {
+ fprintf (out, "0x%lx", (unsigned long)vp);
+ } else {
+ fprintf(out, "NULL");
+ }
+ } else {
+ H5Z_SO_scale_type_t scale_type = va_arg (ap, H5Z_SO_scale_type_t); /*lint !e64 Type mismatch not really occuring */
+ switch(scale_type) {
+ case H5Z_SO_FLOAT_DSCALE:
+ fprintf(out, "H5Z_SO_FLOAT_DSCALE");
+ break;
+ case H5Z_SO_FLOAT_ESCALE:
+ fprintf(out, "H5Z_SO_FLOAT_ESCALE");
+ break;
+ case H5Z_SO_INT:
+ fprintf(out, "H5Z_SO_INT");
+ break;
+ default:
+ fprintf(out, "%ld", (long)scale_type);
+ break;
+ }
+ }
+ break;
case 'c':
if (ptr) {
if (vp) {
diff --git a/src/H5E.c b/src/H5E.c
index 261a496..5738e25 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -1267,7 +1267,7 @@ H5Eget_num(hid_t error_stack_id)
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(H5Eget_num, FAIL)
- H5TRACE1("Is","i",error_stack_id);
+ H5TRACE1("Zs","i",error_stack_id);
/* Need to check for errors */
if(error_stack_id == H5E_DEFAULT) {
diff --git a/src/H5G.c b/src/H5G.c
index 8aa1044..76e44e0 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -317,6 +317,7 @@ H5Gcreate_expand(hid_t loc_id, const char *name, hid_t gcpl_id, hid_t gapl_id)
hid_t ret_value;
FUNC_ENTER_API(H5Gcreate_expand, FAIL)
+ H5TRACE4("i","isii",loc_id,name,gcpl_id,gapl_id);
/* Check arguments */
if(H5G_loc(loc_id, &loc) < 0)
@@ -1032,7 +1033,7 @@ H5Gget_create_plist(hid_t group_id)
hid_t ret_value = FAIL;
FUNC_ENTER_API(H5Gget_create_plist, FAIL)
- H5TRACE1("i","i", group_id);
+ H5TRACE1("i","i",group_id);
/* Check args */
if(NULL == (grp = H5I_object_verify(group_id, H5I_GROUP)))
@@ -1094,6 +1095,7 @@ H5Gcopy(hid_t src_id, hid_t dst_id, const char *name_dst, hid_t plist_id)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Gcopy, FAIL)
+ H5TRACE4("e","iisi",src_id,dst_id,name_dst,plist_id);
/* Check arguments */
if(H5G_loc(src_id, &src_loc) < 0)
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 05d3c16..c13d807 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -917,8 +917,13 @@ H5Pget_filter_by_id(hid_t plist_id, H5Z_filter_t id, unsigned int *flags/*out*/,
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pget_filter_by_id, FAIL);
+#ifdef H5_WANT_H5_V1_6_COMPAT
H5TRACE7("e","iZfx*zxzx",plist_id,id,flags,cd_nelmts,cd_values,namelen,
name);
+#else
+ H5TRACE8("e","iZfx*zxzx*Iu",plist_id,id,flags,cd_nelmts,cd_values,namelen,
+ name,filter_config);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
/* Check args */
if (cd_nelmts || cd_values)
@@ -1301,7 +1306,7 @@ H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_fac
herr_t ret_value=SUCCEED; /* return value */
FUNC_ENTER_API(H5Pset_scaleoffset, FAIL);
- H5TRACE3("e","iIIu",plist_id,scale_factor,scale_type);
+ H5TRACE3("e","iZaIs",plist_id,scale_type,scale_factor);
/* Check arguments */
if(TRUE != H5P_isa_class(plist_id, H5P_DATASET_CREATE))
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index c2a5688..b7f6c15 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -44,6 +44,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_local_heap_size_hint, FAIL)
+ H5TRACE2("e","iz",plist_id,size_hint);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
@@ -83,6 +84,7 @@ H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/)
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_local_heap_size_hint, FAIL)
+ H5TRACE2("e","ix",plist_id,size_hint);
if(size_hint) {
H5P_genplist_t *plist; /* Property list pointer */
@@ -130,6 +132,7 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_link_phase_change, FAIL)
+ H5TRACE3("e","iIuIu",plist_id,max_compact,min_dense);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
@@ -170,6 +173,7 @@ H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_link_phase_change, FAIL)
+ H5TRACE3("e","ixx",plist_id,max_compact,min_dense);
/* Get values */
if(max_compact || min_dense) {
@@ -222,6 +226,7 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_est_link_info, FAIL)
+ H5TRACE3("e","iIuIu",plist_id,est_num_entries,est_name_len);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
@@ -262,6 +267,7 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_est_link_info, FAIL)
+ H5TRACE3("e","ixx",plist_id,est_num_entries,est_name_len);
/* Get values */
if(est_num_entries || est_name_len) {
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index 8277ddc..8d146bf 100755
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -46,6 +46,7 @@ H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_create_intermediate_group, FAIL);
+ H5TRACE2("e","iIu",plist_id,crt_intmd_group);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
@@ -80,6 +81,7 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_create_intermediate_group, FAIL);
+ H5TRACE2("e","ix",plist_id,crt_intmd_group);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
diff --git a/src/H5T.c b/src/H5T.c
index 10f8598..cb96e42 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -2611,6 +2611,7 @@ H5Tcompiler_conv(hid_t src_id, hid_t dst_id)
H5T_t *src = NULL, *dst = NULL;
FUNC_ENTER_API(H5Tcompiler_conv, FAIL)
+ H5TRACE2("t","ii",src_id,dst_id);
/* Check args */
if (NULL == (src = H5I_object_verify(src_id,H5I_DATATYPE)) ||
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index c42b9dd..3e5e0eb 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -122,6 +122,7 @@ H5Tcommit_expand(hid_t loc_id, const char *name, hid_t type_id, hid_t tcpl_id, h
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_API(H5Tcommit_expand, FAIL)
+ H5TRACE5("e","isiii",loc_id,name,type_id,tcpl_id,tapl_id);
/* Check arguments */
if(H5G_loc (loc_id, &loc) < 0)
diff --git a/src/Makefile.am b/src/Makefile.am
index cf9ebd1..387aea6 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -110,4 +110,22 @@ H5Tinit.c: H5detect$(EXEEXT)
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
($(RM) $@ ; exit 1)
+# Add TRACE macros to library source files. This is done via the trace script
+# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean"
+# version of the source file is saved with a tilde (~) after its name and
+# tracing information is inserted. trace should have no effect on files
+# without HDF5 macros.
+.PHONY: trace
+
+trace: $(libhdf5_la_SOURCES)
+ @for dep in $? dummy; do \
+ if test $$dep != "dummy" -a -n "$(PERL)"; then \
+ case "$$dep" in \
+ *.c) \
+ $(TRACE) $$dep; \
+ ;; \
+ esac; \
+ fi; \
+ done
+
include $(top_srcdir)/config/conclude.am
diff --git a/src/Makefile.in b/src/Makefile.in
index 164b097..f694f38 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -364,6 +364,10 @@ docdir = $(exec_prefix)/doc
@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
@@ -994,6 +998,24 @@ H5Tinit.c: H5detect$(EXEEXT)
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
($(RM) $@ ; exit 1)
+# Add TRACE macros to library source files. This is done via the trace script
+# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean"
+# version of the source file is saved with a tilde (~) after its name and
+# tracing information is inserted. trace should have no effect on files
+# without HDF5 macros.
+.PHONY: trace
+
+trace: $(libhdf5_la_SOURCES)
+ @for dep in $? dummy; do \
+ if test $$dep != "dummy" -a -n "$(PERL)"; then \
+ case "$$dep" in \
+ *.c) \
+ $(TRACE) $$dep; \
+ ;; \
+ esac; \
+ fi; \
+ done
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
# BUILT_SOURCES contain targets that need to be built before anything else