summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-02-26 22:36:44 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-02-26 22:36:44 (GMT)
commit4b0293ce89b9e3ddb8a98e598dee3de03ffb4074 (patch)
tree69da330073fc40934ece65a82b085699c72bba8a
parent036ecfa32b2b8aeee5f842b18a755af7850196ab (diff)
downloadhdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.zip
hdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.tar.gz
hdf5-4b0293ce89b9e3ddb8a98e598dee3de03ffb4074.tar.bz2
[svn-r26322] Merge of r26246 and r26249 from the trunk
Fixes a bug in the bin/trace script that prevented API calls which return a pointer from receiving TRACE macros. Also removes the NO TRACE warnings, which we decided were distracting and unnecessary. Tested on: jam (minor change)
-rwxr-xr-xbin/trace18
-rw-r--r--release_docs/RELEASE.txt11
-rw-r--r--src/H5Edeprec.c2
-rw-r--r--src/H5FD.c1
-rw-r--r--src/H5I.c3
-rw-r--r--src/H5P.c1
-rw-r--r--src/H5Pfapl.c1
-rw-r--r--src/H5Tfields.c1
-rw-r--r--src/H5Topaque.c1
9 files changed, 30 insertions, 9 deletions
diff --git a/bin/trace b/bin/trace
index 4720680..40dcc18 100755
--- a/bin/trace
+++ b/bin/trace
@@ -115,7 +115,8 @@ $Source = "";
"H5G_iterate_t" => "x",
"H5G_info_t" => "x",
"H5I_free_t" => "x",
- "H5L_class_t" => "x",
+ "H5I_search_func_t" => "x",
+ "H5L_class_t" => "x",
"H5L_elink_traverse_t" => "x",
"H5L_iterate_t" => "x",
"H5MM_allocate_t" => "x",
@@ -278,13 +279,9 @@ sub rewrite_func ($$$$$) {
# The H5TRACE() statement
if ($body =~ /\/\*[ \t]*NO[ \t]*TRACE[ \t]*\*\//) {
- if ($body =~ /\s*H5TRACE\d+\s*\(/) {
- errmesg $file, $name, "warning: trace info was not updated because of NO TRACE comment";
- } else {
- errmesg $file, $name, "warning: trace info was not inserted because of NO TRACE comment";
- }
+ # Ignored due to NO TRACE comment.
} elsif ($body =~ s/((\n[ \t]*)H5TRACE\d+\s*\(.*?\);)\n/"$2$trace"/es) {
- # Replaced an H5TRACE macro
+ # Replaced an H5TRACE macro.
} elsif ($body=~s/((\n[ \t]*)FUNC_ENTER\w*\s*\(.*?\);??)\n/"$1$2$trace"/es) {
# Added an H5TRACE macro after a FUNC_ENTER macro.
} else {
@@ -314,14 +311,14 @@ for $file (@ARGV) {
# Make modifications
my $original = $Source;
- my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[a-z]\w*)*)\s*\n #type
+ my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
(H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name
\s*\((.*?)\)\s* #args
(\{.*?\n\}[^\n]*) #body
/rewrite_func($file,$1,$3,$4,$5)/segx;
$total_api += $napi;
- # If the source changed then print out the new version
+# If the source changed then print out the new version
if ($original ne $Source) {
printf "%s: instrumented %d API function%s\n",
$file, $napi, 1==$napi?"":"s";
@@ -332,3 +329,6 @@ for $file (@ARGV) {
}
}
}
+
+printf "Finished processing HDF5 API calls\n"
+
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index a09d476..ed5ea63 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -202,6 +202,17 @@ Bug Fixes since HDF5-1.8.14
(DER - 2015/02/22, HDFFV-8927)
+ - Addition of error tracing functionality to several C API calls
+
+ A bug in a text processing script caused API calls that return a
+ pointer to not receive error tracing macros/functionality.
+
+ The bug has been corrected and error tracing functionality has been
+ added to the affected API calls. These functions will now correctly
+ print trace information when library errors are encountered.
+
+ (DER - 2015/02/26, HDFFV-9141)
+
Parallel Library
----------------
- Fixed a potential memory error when performing parallel I/O on a dataset
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 3e9444b..6a83745 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -152,6 +152,7 @@ H5Eget_major(H5E_major_t maj)
char *ret_value; /* Return value */
FUNC_ENTER_API_NOCLEAR(NULL)
+ H5TRACE1("*s", "i", maj);
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
@@ -204,6 +205,7 @@ H5Eget_minor(H5E_minor_t min)
char *ret_value; /* Return value */
FUNC_ENTER_API_NOCLEAR(NULL)
+ H5TRACE1("*s", "i", min);
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
diff --git a/src/H5FD.c b/src/H5FD.c
index 947854d..1f94393 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -904,6 +904,7 @@ H5FDopen(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD_t *ret_value=NULL;
FUNC_ENTER_API(NULL)
+ H5TRACE4("*x", "*sIuia", name, flags, fapl_id, maxaddr);
/* Check arguments */
if(H5P_DEFAULT == fapl_id)
diff --git a/src/H5I.c b/src/H5I.c
index 38c1100..48451b9 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -1031,6 +1031,7 @@ H5Iobject_verify(hid_t id, H5I_type_t id_type)
void * ret_value; /* Return value */
FUNC_ENTER_API(NULL)
+ H5TRACE2("*x", "iIt", id, id_type);
if(H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
@@ -1171,6 +1172,7 @@ H5Iremove_verify(hid_t id, H5I_type_t id_type)
void * ret_value; /* Return value */
FUNC_ENTER_API(NULL)
+ H5TRACE2("*x", "iIt", id, id_type);
if(H5I_IS_LIB_TYPE(id_type))
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "cannot call public function on library type")
@@ -2052,6 +2054,7 @@ H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
void *ret_value; /* Return value */
FUNC_ENTER_API(NULL)
+ H5TRACE3("*x", "Itx*x", type, func, key);
/* Check arguments */
if(H5I_IS_LIB_TYPE(type))
diff --git a/src/H5P.c b/src/H5P.c
index 9011dc9..fc19dd1 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -1512,6 +1512,7 @@ H5Pget_class_name(hid_t pclass_id)
char *ret_value; /* return value */
FUNC_ENTER_API(NULL)
+ H5TRACE1("*s", "i", pclass_id);
/* Check arguments. */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object_verify(pclass_id, H5I_GENPROP_CLS)))
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index d743441..e5bba33 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -829,6 +829,7 @@ H5Pget_driver_info(hid_t plist_id)
void *ret_value; /* Return value */
FUNC_ENTER_API(NULL)
+ H5TRACE1("*x", "i", plist_id);
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 0e0d4e7..fb186fb 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -163,6 +163,7 @@ H5Tget_member_name(hid_t type_id, unsigned membno)
char *ret_value;
FUNC_ENTER_API(NULL)
+ H5TRACE2("*s", "iIu", type_id, membno);
/* Check args */
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index d68e659..e93bf65 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -121,6 +121,7 @@ H5Tget_tag(hid_t type_id)
char *ret_value;
FUNC_ENTER_API(NULL)
+ H5TRACE1("*s", "i", type_id);
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))