diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-10-09 14:17:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 14:17:31 (GMT) |
commit | d4b1ee1d861686b97a887f47ff3857e338d3f690 (patch) | |
tree | 8e0de772d9992287c1b169fb3fdaee624ab63844 /src/H5Tdbg.c | |
parent | 29874423bf155e23cfdc1920336c91674865f417 (diff) | |
parent | d62e0753021df5510b97b38aa632ba570ca84275 (diff) | |
download | hdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.zip hdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.tar.gz hdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.tar.bz2 |
Merge pull request #30 from byrnHDF/hdf5_1_12
Hdf5 1 12 merge changes from develop
Diffstat (limited to 'src/H5Tdbg.c')
-rw-r--r-- | src/H5Tdbg.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index 9dae22d..5d0c5cd 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -91,6 +91,13 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i if (H5DEBUG(T) && path->stats.ncalls > 0) { hsize_t nbytes; char bandwidth[32]; + struct { + char *user; + char *system; + char *elapsed; + } timestrs = {H5_timer_get_time_string(path->stats.times.user), + H5_timer_get_time_string(path->stats.times.system), + H5_timer_get_time_string(path->stats.times.elapsed)}; if (nprint && 0 == (*nprint)++) { HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n"); @@ -108,13 +115,15 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i nbytes = H5T_get_size(path->dst); else nbytes = 0; - nbytes *= path->stats.nelmts; H5_bandwidth(bandwidth, (double)nbytes, path->stats.times.elapsed); - HDfprintf(H5DEBUG(T), " %-16s %10Hd %10d %8T %8T %8T %10s\n", path->name, path->stats.nelmts, - path->stats.ncalls, path->stats.times.user, path->stats.times.system, - path->stats.times.elapsed, bandwidth); - } /* end if */ + HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name, + path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed, + bandwidth); + free(timestrs.user); + free(timestrs.system); + free(timestrs.elapsed); + } #endif FUNC_LEAVE_NOAPI(SUCCEED) @@ -394,7 +403,8 @@ H5T_debug(const H5T_t *dt, FILE *stream) HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]); for (k = 0; k < base_size; k++) - HDfprintf(stream, "%02p", ((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); + HDfprintf(stream, "%02" PRIx8, + *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); } /* end for */ HDfprintf(stream, "\n"); } |