summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
commite6bc326ec0c417ef7b003da535b2e071442d2067 (patch)
tree700a274f00d7cee9d17c14c79dca71d97a328fc1 /tools
parentb3c5284692093953132c6c8227e0980b670bf4ad (diff)
downloadhdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.zip
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.gz
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.bz2
Fix for HDFFV-10180 Performance issues with H5Oget_info.
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff.c12
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5diff_attr.c4
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools_dump.c2
-rw-r--r--tools/lib/h5tools_ref.c4
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/lib/h5trav.c22
-rw-r--r--tools/lib/h5trav.h2
-rw-r--r--tools/src/h5dump/h5dump.c3
-rw-r--r--tools/src/h5dump/h5dump_ddl.c12
-rw-r--r--tools/src/h5dump/h5dump_xml.c10
-rw-r--r--tools/src/h5format_convert/h5format_convert.c2
-rw-r--r--tools/src/h5ls/h5ls.c6
-rw-r--r--tools/src/h5repack/h5repack.c4
-rw-r--r--tools/src/h5repack/h5repack_refs.c4
-rw-r--r--tools/src/h5stat/h5stat.c4
18 files changed, 57 insertions, 54 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 94cca58..041ac8d 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -433,7 +433,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents");
@@ -465,7 +465,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n");
@@ -645,7 +645,7 @@ h5diff(const char *fname1,
/* optional data pass */
info1_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name(file1_id, obj1fullname, &oinfo1, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file1_id, obj1fullname, &oinfo1, 0, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -695,7 +695,7 @@ h5diff(const char *fname1,
/* optional data pass */
info2_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name(file2_id, obj2fullname, &oinfo2, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file2_id, obj2fullname, &oinfo2, 0, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -846,7 +846,7 @@ h5diff(const char *fname1,
info1_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info1_grp) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info1_grp, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
}
@@ -860,7 +860,7 @@ h5diff(const char *fname1,
info2_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info2_grp) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info2_grp, 0) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
} /* end if */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 11f5e41..e72f738 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2096,8 +2096,8 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t
if (nfound_b && opts->m_verbose) {
H5O_info_t oi1, oi2;
- H5Oget_info(obj1_id, &oi1);
- H5Oget_info(obj2_id, &oi2);
+ H5Oget_info2(obj1_id, &oi1, 0);
+ H5Oget_info2(obj2_id, &oi2, 0);
parallel_print("Referenced dataset %lu %lu\n", (unsigned long) oi1.addr, (unsigned long) oi2.addr);
parallel_print( "------------------------------------------------------------\n");
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 7f08cc7..4ad4c90 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -154,9 +154,9 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t
h5difftrace("build_match_list_attrs start\n");
- if(H5Oget_info(loc1_id, &oinfo1) < 0)
+ if(H5Oget_info2(loc1_id, &oinfo1, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info first object failed");
- if(H5Oget_info(loc2_id, &oinfo2) < 0)
+ if(H5Oget_info2(loc2_id, &oinfo2, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info second object failed");
table_attrs_init(&table_lp);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 11888bc..7ba82dd 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1758,14 +1758,14 @@ h5tools_is_obj_same(hid_t loc_id1, const char *name1,
hbool_t ret_val = 0;
if ( name1 && HDstrcmp(name1, "."))
- H5Oget_info_by_name(loc_id1, name1, &oinfo1, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id1, name1, &oinfo1, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id1, &oinfo1);
+ H5Oget_info2(loc_id1, &oinfo1, 0);
if ( name2 && HDstrcmp(name2, "."))
- H5Oget_info_by_name(loc_id2, name2, &oinfo2, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id2, name2, &oinfo2, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id2, &oinfo2);
+ H5Oget_info2(loc_id2, &oinfo2, 0);
if (oinfo1.fileno == oinfo2.fileno && oinfo1.addr==oinfo2.addr)
ret_val = 1;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 38ace81..42f9d05 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1905,7 +1905,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5O_info_t oinfo;
obj_t *obj = NULL; /* Found object */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
obj = search_obj(h5dump_type_table, oinfo.addr);
if(obj) {
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index d6e5f01..a874c0f 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -113,7 +113,7 @@ init_ref_path_table(void)
return (-1);
/* Iterate over objects in this file */
- if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL) < 0) {
+ if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, 0) < 0) {
error_msg("unable to construct reference path table\n");
h5tools_setstatus(EXIT_FAILURE);
} /* end if */
@@ -184,7 +184,7 @@ ref_path_table_lookup(const char *thepath)
/* Get the object info now */
/* (returns failure for dangling soft links) */
- if(H5Oget_info_by_name(thefile, thepath, &oi, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(thefile, thepath, &oi, 0, H5P_DEFAULT) < 0)
return HADDR_UNDEF;
/* Return OID */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index a018394..3d029d2 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1120,7 +1120,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
const char *path;
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
- H5Oget_info(obj, &oi);
+ H5Oget_info2(obj, &oi, 0);
/* Print object type and close object */
switch(oi.type) {
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 5272e81..fad3c5b 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -507,7 +507,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
if(H5Tcommitted(type) > 0) {
H5O_info_t type_oinfo;
- H5Oget_info(type, &type_oinfo);
+ H5Oget_info2(type, &type_oinfo, 0);
if(search_obj(info->type_table, type_oinfo.addr) == NULL)
add_obj(info->type_table, type_oinfo.addr, name, FALSE);
} /* end if */
@@ -573,7 +573,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
info->dset_table = *dset_table;
/* Find all shared objects */
- return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info));
+ return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, 0));
}
@@ -729,7 +729,7 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_
}
/* get target object info */
- if(H5Oget_info_by_name(file_id, linkpath, &trg_oinfo, lapl) < 0) {
+ if(H5Oget_info_by_name2(file_id, linkpath, &trg_oinfo, 0, lapl) < 0) {
if(link_info->opt.msg_mode == 1)
parallel_print("Warning: unable to get object information for <%s>\n", linkpath);
HGOTO_DONE(FAIL);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index b6d32f7..e2df439 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -43,6 +43,7 @@ typedef struct {
hbool_t is_absolute; /* Whether the traversal has absolute paths */
const char *base_grp_name; /* Name of the group that serves as the base
* for iteration */
+ unsigned fields; /* Fields needed in H5O_info_t struct */
} trav_ud_traverse_t;
typedef struct {
@@ -201,7 +202,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
H5O_info_t oinfo;
/* Get information about the object */
- if(H5Oget_info_by_name(loc_id, path, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(loc_id, path, &oinfo, udata->fields, H5P_DEFAULT) < 0) {
if(new_name)
HDfree(new_name);
return(H5_ITER_ERROR);
@@ -251,13 +252,13 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
*/
static int
traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
- hbool_t recurse, const trav_visitor_t *visitor)
+ hbool_t recurse, const trav_visitor_t *visitor, unsigned fields)
{
H5O_info_t oinfo; /* Object info for starting group */
int ret_value = SUCCEED;
/* Get info for starting object */
- if(H5Oget_info_by_name(file_id, grp_name, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(file_id, grp_name, &oinfo, fields, H5P_DEFAULT) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info_by_name failed");
/* Visit the starting object */
@@ -282,6 +283,7 @@ traverse(hid_t file_id, const char *grp_name, hbool_t visit_start,
udata.visitor = visitor;
udata.is_absolute = (*grp_name == '/');
udata.base_grp_name = grp_name;
+ udata.fields = fields;
/* Check for iteration of links vs. visiting all links recursively */
if(recurse) {
@@ -356,9 +358,9 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
size_t idx = info->nused - 1;
if ( info->paths[idx].path && HDstrcmp(info->paths[idx].path, "."))
- H5Oget_info_by_name(loc_id, info->paths[idx].path, &oinfo, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id, info->paths[idx].path, &oinfo, 0, H5P_DEFAULT);
else
- H5Oget_info(loc_id, &oinfo);
+ H5Oget_info2(loc_id, &oinfo, 0);
info->paths[idx].objno = oinfo.addr;
info->paths[idx].fileno = oinfo.fileno;
@@ -436,7 +438,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
info_visitor.udata = info;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(file_id, "/", TRUE, TRUE, &info_visitor) < 0)
+ if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -602,7 +604,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
table_visitor.udata = table;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &table_visitor) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &table_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -1027,7 +1029,7 @@ h5trav_print(hid_t fid)
print_visitor.udata = &print_udata;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &print_visitor) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &print_visitor, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -1047,7 +1049,7 @@ done:
int
h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
hbool_t recurse, h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk,
- void *udata)
+ void *udata, unsigned fields)
{
trav_visitor_t visitor; /* Visitor structure for objects */
int ret_value = SUCCEED;
@@ -1058,7 +1060,7 @@ h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start,
visitor.udata = udata;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, grp_name, visit_start, recurse, &visitor) < 0)
+ if(traverse(fid, grp_name, visit_start, recurse, &visitor, fields) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h
index c2ad9b7..a1d33b7 100644
--- a/tools/lib/h5trav.h
+++ b/tools/lib/h5trav.h
@@ -134,7 +134,7 @@ extern "C" {
H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name,
hbool_t visit_start, hbool_t recurse, h5trav_obj_func_t visit_obj,
- h5trav_lnk_func_t visit_lnk, void *udata);
+ h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields);
H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path);
H5TOOLS_DLL hbool_t symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path);
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 25e4858..a0d2e6e 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1,4 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
@@ -1482,7 +1483,7 @@ main(int argc, const char *argv[])
}
/* Get object info for root group */
- if(H5Oget_info_by_name(fid, "/", &oi, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(fid, "/", &oi, 0, H5P_DEFAULT) < 0) {
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 6646626..d4ce2da 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -229,7 +229,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -706,7 +706,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_dump_header_format->datatypeblockbegin);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- H5Oget_info(tid, &oinfo);
+ H5Oget_info2(tid, &oinfo, 0);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -876,7 +876,7 @@ dump_group(hid_t gid, const char *name)
h5tools_dump_comment(rawoutstream, outputformat, &ctx, gid);
- H5Oget_info(gid, &oinfo);
+ H5Oget_info2(gid, &oinfo, 0);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -1512,7 +1512,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
handle_udata.fid = fid;
handle_udata.op_name = path_name;
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata) < 0) {
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, 0) < 0) {
error_msg("error traversing information\n");
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1800,7 +1800,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
} /* end if */
- H5Oget_info(dsetid, &oinfo);
+ H5Oget_info2(dsetid, &oinfo, 0);
if(oinfo.rc > 1 || hit_elink) {
obj_t *found_obj; /* Found object */
@@ -2101,7 +2101,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
goto fail;
/* Get object info */
- if (H5Oget_info(oid, &oi) < 0) {
+ if (H5Oget_info2(oid, &oi, 0) < 0) {
H5Oclose(oid);
goto fail;
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 4e13df3..6c04aef 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -180,7 +180,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -881,7 +881,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
obj_t *found_obj; /* Found object */
/* detect a shared datatype, output only once */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -1534,7 +1534,7 @@ xml_dump_datatype(hid_t type)
obj_t *found_obj; /* Found object */
/* Datatype is a shared or named datatype */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -2362,7 +2362,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
/* Check uniqueness of named datatype */
- H5Oget_info(type, &oinfo);
+ H5Oget_info2(type, &oinfo, 0);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -2548,7 +2548,7 @@ xml_dump_group(hid_t gid, const char *name)
}
}
- H5Oget_info(gid, &oinfo);
+ H5Oget_info2(gid, &oinfo, 0);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 2bfe280..cb1be4d 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -430,7 +430,7 @@ main(int argc, const char *argv[])
} else { /* Convert all datasets in the file */
if(verbose_g)
HDfprintf(stdout, "Processing all datasets in the file...\n");
- if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid) < 0)
+ if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, 0) < 0)
goto done;
} /* end else */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index a07d308..653438d 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1320,7 +1320,7 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind)
if(H5Tcommitted(type)) {
H5O_info_t oi;
- if(H5Oget_info(type, &oi) >= 0)
+ if(H5Oget_info2(type, &oi, 0) >= 0)
h5tools_str_append(buffer,"shared-%lu:"H5_PRINTF_HADDR_FMT" ",
oi.fileno, oi.addr);
else
@@ -2386,7 +2386,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
h5tools_str_reset(&buffer);
/* Retrieve info for object to list */
- if(H5Oget_info_by_name(file, oname, &oi, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file, oname, &oi, H5O_INFO_TIME, H5P_DEFAULT) < 0) {
if(iter->symlink_target) {
h5tools_str_append(&buffer, "{**NOT FOUND**}\n");
iter->symlink_target = FALSE;
@@ -2414,7 +2414,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
iter->name_start = iter->base_len;
/* Specified name is a group. List the complete contents of the group. */
- h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter);
+ h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter, H5O_INFO_TIME);
/* Close group */
if(!iter->symlink_target)
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index e7f4aae..aa2d909 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -222,7 +222,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
H5O_info_t oinfo; /* Object info of input dtype */
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
- if (H5Oget_info(type_in, &oinfo) < 0)
+ if (H5Oget_info2(type_in, &oinfo, 0) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
if (*named_dt_head_p) {
@@ -352,7 +352,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p,
hbool_t is_ref = 0;
H5T_class_t type_class = -1;
- if (H5Oget_info(loc_in, &oinfo) < 0)
+ if (H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
/*-------------------------------------------------------------------------
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 7b610a3..80c98b5 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -456,7 +456,7 @@ static int copy_refs_attr(hid_t loc_in,
int ref_comp_field_n = 0;
- if(H5Oget_info(loc_in, &oinfo) < 0)
+ if(H5Oget_info2(loc_in, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
for(u = 0; u < (unsigned)oinfo.num_attrs; u++) {
@@ -807,7 +807,7 @@ MapIdToName(hid_t refobj_id, trav_table_t *travt)
H5O_info_t ref_oinfo; /* Stat for the refobj id */
/* obtain information to identify the referenced object uniquely */
- if(H5Oget_info(refobj_id, &ref_oinfo) < 0)
+ if(H5Oget_info2(refobj_id, &ref_oinfo, 0) < 0)
goto out;
if(ref_oinfo.addr == travt->objs[u].objno) {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 6f196b4..da713ac 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1788,14 +1788,14 @@ main(int argc, const char *argv[])
unsigned u;
for(u = 0; u < hand->obj_count; u++) {
- if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0)
+ if(h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0)
warn_msg("Unable to traverse object \"%s\"\n", hand->obj[u]);
else
print_statistics(hand->obj[u], &iter);
} /* end for */
} /* end if */
else {
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter) < 0)
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0)
warn_msg("Unable to traverse objects/links in file \"%s\"\n", fname);
else
print_statistics("/", &iter);