diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-11-26 02:44:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 02:44:34 (GMT) |
commit | 1bb2bdbcf84b31ee3d098063d081b940aab8f751 (patch) | |
tree | 5a4b05c052c49d4ccf687f9d9059e7fe94eeddbf /src/H5O.c | |
parent | 3ebcfb8bf3cc18d9adddba86c47e647fd4eec842 (diff) | |
download | hdf5-1bb2bdbcf84b31ee3d098063d081b940aab8f751.zip hdf5-1bb2bdbcf84b31ee3d098063d081b940aab8f751.tar.gz hdf5-1bb2bdbcf84b31ee3d098063d081b940aab8f751.tar.bz2 |
Enhance API tracing (#120)
Enhance API tracing to handle more types, and to put tracing info in a string, allowing it to be used when reporting errors. Also refactor ref-counted strings (H5RS) module to add capabilities needed for the tracing. Refactored H5Gname.c routines to use new H5RS routines also. Added /*out*/ tags to API routines that are returning information to the application. Updated H5TRACE macros from running updated trace script over library code. Added tests for new H5RS routines.
Diffstat (limited to 'src/H5O.c')
-rw-r--r-- | src/H5O.c | 37 |
1 files changed, 19 insertions, 18 deletions
@@ -522,14 +522,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo, unsigned fields) +H5Oget_info3(hid_t loc_id, H5O_info2_t *oinfo /*out*/, unsigned fields) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("e", "i*xIu", loc_id, oinfo, fields); + H5TRACE3("e", "ixIu", loc_id, oinfo, fields); /* Check args */ if (!oinfo) @@ -567,14 +567,15 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo, unsigned fields, hid_t lapl_id) +H5Oget_info_by_name3(hid_t loc_id, const char *name, H5O_info2_t *oinfo /*out*/, unsigned fields, + hid_t lapl_id) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE5("e", "i*s*xIui", loc_id, name, oinfo, fields, lapl_id); + H5TRACE5("e", "i*sxIui", loc_id, name, oinfo, fields, lapl_id); /* Check args */ if (!name) @@ -625,14 +626,14 @@ done: */ herr_t H5Oget_info_by_idx3(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, H5O_info2_t *oinfo, unsigned fields, hid_t lapl_id) + hsize_t n, H5O_info2_t *oinfo /*out*/, unsigned fields, hid_t lapl_id) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE8("e", "i*sIiIoh*xIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); + H5TRACE8("e", "i*sIiIohxIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); /* Check args */ if (!group_name || !*group_name) @@ -684,14 +685,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields) +H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo /*out*/, unsigned fields) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("e", "i*xIu", loc_id, oinfo, fields); + H5TRACE3("e", "ixIu", loc_id, oinfo, fields); /* Check args */ if (!oinfo) @@ -729,7 +730,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo, unsigned fields, +H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo /*out*/, unsigned fields, hid_t lapl_id) { H5VL_object_t * vol_obj; /* Object of loc_id */ @@ -737,7 +738,7 @@ H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oi herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE5("e", "i*s*xIui", loc_id, name, oinfo, fields, lapl_id); + H5TRACE5("e", "i*sxIui", loc_id, name, oinfo, fields, lapl_id); /* Check args */ if (!name) @@ -788,14 +789,14 @@ done: */ herr_t H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id) + hsize_t n, H5O_native_info_t *oinfo /*out*/, unsigned fields, hid_t lapl_id) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE8("e", "i*sIiIoh*xIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); + H5TRACE8("e", "i*sIiIohxIui", loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); /* Check args */ if (!group_name || !*group_name) @@ -953,14 +954,14 @@ done: *------------------------------------------------------------------------- */ ssize_t -H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize) +H5Oget_comment(hid_t obj_id, char *comment /*out*/, size_t bufsize) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; ssize_t ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) - H5TRACE3("Zs", "i*sz", obj_id, comment, bufsize); + H5TRACE3("Zs", "ixz", obj_id, comment, bufsize); /* Get the object */ if (NULL == (vol_obj = H5VL_vol_object(obj_id))) @@ -996,14 +997,14 @@ done: *------------------------------------------------------------------------- */ ssize_t -H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id) +H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment /*out*/, size_t bufsize, hid_t lapl_id) { H5VL_object_t * vol_obj; /* Object of loc_id */ H5VL_loc_params_t loc_params; ssize_t ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) - H5TRACE5("Zs", "i*s*szi", loc_id, name, comment, bufsize, lapl_id); + H5TRACE5("Zs", "i*sxzi", loc_id, name, comment, bufsize, lapl_id); /* Check args */ if (!name || !*name) @@ -1076,7 +1077,7 @@ H5Ovisit3(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate2 herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE6("e", "iIiIox*xIu", obj_id, idx_type, order, op, op_data, fields); + H5TRACE6("e", "iIiIoOI*xIu", obj_id, idx_type, order, op, op_data, fields); /* Check args */ if (idx_type <= H5_INDEX_UNKNOWN || idx_type >= H5_INDEX_N) @@ -1150,7 +1151,7 @@ H5Ovisit_by_name3(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_it herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE8("e", "i*sIiIox*xIui", loc_id, obj_name, idx_type, order, op, op_data, fields, lapl_id); + H5TRACE8("e", "i*sIiIoOI*xIui", loc_id, obj_name, idx_type, order, op, op_data, fields, lapl_id); /* Check args */ if (!obj_name) |