From 4f8ca8e026fbff3eafaf514bb0be8a4126593268 Mon Sep 17 00:00:00 2001 From: James Laird Date: Fri, 18 Nov 2005 10:55:22 -0500 Subject: [svn-r11738] Purpose: Configure feature Description: Added 'make trace' target. Solution: Added tracing to 1.7. This was done automatically in 1.6, but left out of 1.7 until now (oops!). Tracing in 1.7 only happens manually, when the user types 'make trace.' Tracing automatically requires more framework than it's worth. I also fixed a couple of tracing bugs and ran trace. Platforms tested: mir, sleipnir, modi4 Misc. update: --- Makefile.am | 5 +++++ Makefile.in | 9 +++++++++ bin/trace | 3 ++- c++/Makefile.in | 4 ++++ c++/examples/Makefile.in | 4 ++++ c++/src/Makefile.in | 4 ++++ c++/test/Makefile.in | 4 ++++ config/commence.am | 4 ++++ examples/Makefile.in | 4 ++++ fortran/Makefile.in | 4 ++++ fortran/examples/Makefile.in | 4 ++++ fortran/src/Makefile.in | 4 ++++ fortran/test/Makefile.in | 4 ++++ fortran/testpar/Makefile.in | 4 ++++ hl/Makefile.in | 4 ++++ hl/c++/Makefile.in | 4 ++++ hl/c++/src/Makefile.in | 4 ++++ hl/c++/test/Makefile.in | 4 ++++ hl/fortran/Makefile.in | 4 ++++ hl/fortran/src/Makefile.in | 4 ++++ hl/fortran/test/Makefile.in | 4 ++++ hl/src/Makefile.in | 4 ++++ hl/test/Makefile.in | 4 ++++ hl/tools/gif2h5/Makefile.in | 4 ++++ perform/Makefile.in | 4 ++++ src/H5.c | 25 +++++++++++++++++++++++++ src/H5E.c | 2 +- src/H5G.c | 4 +++- src/H5Pdcpl.c | 7 ++++++- src/H5Pgcpl.c | 6 ++++++ src/H5Pocpl.c | 2 ++ src/H5T.c | 1 + src/H5Tcommit.c | 1 + src/Makefile.am | 18 ++++++++++++++++++ src/Makefile.in | 22 ++++++++++++++++++++++ test/Makefile.in | 4 ++++ testpar/Makefile.in | 4 ++++ tools/Makefile.in | 4 ++++ tools/gifconv/Makefile.in | 4 ++++ tools/h5diff/Makefile.in | 4 ++++ tools/h5dump/Makefile.in | 4 ++++ tools/h5import/Makefile.in | 4 ++++ tools/h5jam/Makefile.in | 4 ++++ tools/h5ls/Makefile.in | 4 ++++ tools/h5repack/Makefile.in | 4 ++++ tools/lib/Makefile.in | 4 ++++ tools/misc/Makefile.in | 4 ++++ 47 files changed, 237 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index ec07fc7..b6c00fe 100755 --- a/Makefile.am +++ b/Makefile.am @@ -137,6 +137,11 @@ uninstall-doc: installcheck-local: @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; +# Only source files in the src directory include tracing information, +# so 'make trace' only needs to recurse into that directory. +trace: + @(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; + # Automake wants to make config.status depend on configure. This # makes sense, but config.status can't always be regenerated # properly, which can cause builds to fail. diff --git a/Makefile.in b/Makefile.in index 8c1cfcb..bfdd58f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,6 +332,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. @@ -854,6 +858,11 @@ uninstall-doc: installcheck-local: @(cd examples && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; +# Only source files in the src directory include tracing information, +# so 'make trace' only needs to recurse into that directory. +trace: + @(cd src && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; + # Automake wants to make config.status depend on configure. This # makes sense, but config.status can't always be regenerated # properly, which can cause builds to fail. diff --git a/bin/trace b/bin/trace index 85cbebd..f921fb7 100755 --- a/bin/trace +++ b/bin/trace @@ -105,6 +105,7 @@ $Source = ""; "H5Z_func_t" => "x", "H5Z_filter_func_t" => "x", "size_t" => "z", + "H5Z_SO_scale_type_t" => "Za", "H5Z_class_t*" => "Zc", "H5Z_EDC_t" => "Ze", "H5Z_filter_t" => "Zf", @@ -272,7 +273,7 @@ for $file (@ARGV) { # Make modifications my $original = $Source; my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type - (H5[A-Z]{0,2}[^_A-Z]\w*) #name + (H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name \s*\((.*?)\)\s* #args (\{.*?\n\}[^\n]*) #body /rewrite_func($file,$1,$3,$4,$5)/segx; diff --git a/c++/Makefile.in b/c++/Makefile.in index 30e56e3..e774512 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -302,6 +302,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. diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 229a15a..3a40616 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -294,6 +294,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. diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index f952b22..7f27c8a 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -336,6 +336,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. diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index d3e329d..79ae53f 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -325,6 +325,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. diff --git a/config/commence.am b/config/commence.am index 3a7ef49..3c6eec9 100644 --- a/config/commence.am +++ b/config/commence.am @@ -76,6 +76,10 @@ CPPFLAGS=@CPPFLAGS@ @H5_CPPFLAGS@ FFLAGS=@FFLAGS@ @H5_FFLAGS@ CXXFLAGS=@CXXFLAGS@ @H5_CXXFLAGS@ +# The trace script; this is used on source files from the C library to +# insert tracing macros. +TRACE=perl $(top_srcdir)/bin/trace + # Make sure that these variables are exported to the Makefiles F9XMODEXT=@F9XMODEXT@ F9XMODFLAG=@F9XMODFLAG@ diff --git a/examples/Makefile.in b/examples/Makefile.in index c1e28de..6465ef9 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -294,6 +294,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. diff --git a/fortran/Makefile.in b/fortran/Makefile.in index d738cca..2016943 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -306,6 +306,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. diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index e89bc30..e774fcb 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -294,6 +294,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. diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 5498add..5a34175 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -361,6 +361,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. diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 5ec25d3..7b3ade1 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -355,6 +355,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. diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 3677dcd..e9df849 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -318,6 +318,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. diff --git a/hl/Makefile.in b/hl/Makefile.in index 5e3a060..3809deb 100755 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -307,6 +307,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. diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 9c49e66..6f9983d 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -303,6 +303,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. diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index c9552fe..9ca6844 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -325,6 +325,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. diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index b02d907..318cd10 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -319,6 +319,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. diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 32ba6a0..1ed7f2a 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -307,6 +307,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. diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 4946cb5..1fd0bda 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -328,6 +328,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. diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 7740a79..e44d33b 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -327,6 +327,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. diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 67c904f..f01dbd8 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -326,6 +326,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. diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 1214d03..3b21ba2 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -338,6 +338,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. diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index a74c436..1843e51 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -326,6 +326,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. diff --git a/perform/Makefile.in b/perform/Makefile.in index c814582..6f426e6 100644 --- a/perform/Makefile.in +++ b/perform/Makefile.in @@ -360,6 +360,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. 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 diff --git a/test/Makefile.in b/test/Makefile.in index 888a247..b15299e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -579,6 +579,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. diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 88da117..9c763cb 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -328,6 +328,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. diff --git a/tools/Makefile.in b/tools/Makefile.in index 14f42b0..aebc030 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -303,6 +303,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. diff --git a/tools/gifconv/Makefile.in b/tools/gifconv/Makefile.in index a74c436..1843e51 100644 --- a/tools/gifconv/Makefile.in +++ b/tools/gifconv/Makefile.in @@ -326,6 +326,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. diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index a8ba16d..775c764 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -334,6 +334,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. diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index aee2081..bab5765 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -327,6 +327,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. diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 61c82a8..163bcae 100755 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -327,6 +327,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. diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 78c6539..3945184 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -338,6 +338,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. diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 39b77b0..c274c82 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -320,6 +320,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. diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 2ba12db..7a99891 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -342,6 +342,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. diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index a8a27a6..8900ad3 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -324,6 +324,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. diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index c85a528..ab4fa2b 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -345,6 +345,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. -- cgit v0.12