diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-04-30 16:07:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 16:07:50 (GMT) |
commit | 27198d814a58640a6088f44b72d43d3bd4bb6629 (patch) | |
tree | 81ea462c0cd993553c7f3820d8ab288e9bea8ed5 /src/H5Tdbg.c | |
parent | 4155e595e2ab16d81de79ed19d7de4fab5eb3302 (diff) | |
download | hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.zip hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.tar.gz hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.tar.bz2 |
Hdf5 1 10 merge of printf specifiers and VS2015 min changes (#612)
* HDFFV-10865 - merge from dev, HDFArray perf fix.
* Remove duplicate setting
* Whitespace changes after clang format
* Undo version 11 clang format changes
* Merge CMake changes from develop
* test testing script merge from develop
* Update supported platforms
* PR#3 merge from develop
* Merge gcc 10 diagnostics option from develop
* Merge #318 OSX changes from develop
* Merge small changes from develop
* Minor non-space formatting changes
* #386 copyright corrections for java folder
* Merges from develop
#358 patches from vtk
#361 fix header guard spelling
* Merge updates
#358 patches from vtk
#361 fix header guard spelling
* format fix
* Fix missing underscore and make H5public.h closer to dev
* Merges from develop
#340 clang -Wformat-security warnings
#360 Fixed uninitialized warnings
header guard underscore cleanup
JNI cleanup
* format alignment
* Add missing test ref file
* Merge #380 from develop
* Finish java merges from develop
* Fix java issues with tests and javadoc
* Correct use of attribute access plist
* Remove debug code
* Remove unused variable
* Change file access to read only for java tests
* Split clang format operations.
* More javadoc comments
* Remove pre-split setting
* format source
* Change windows TS to use older VS.
* Mostly all javadoc fixes, one argument rename.
* synch file
* Merge of long double fix and compiler flags
* HDFFV-11229 merge changes from develop
* HDFFV-11229 correct test script
* HDFFV-11229 update autotools test script for two ref files
* HDFFV-11229 merge dev changes for long double display in tools
* Committing clang-format changes
* minor whitespace
* remove unneeded macro
* Committing clang-format changes
* Add "option" command for clang options
* Rework CMake add_custom to use the BYPRODUCTS argument
Update pkgconfig scripts for parallel builds.
Fix install COPYING file reference.
Remove unused round defines.
Change CMake default setting of BUILD_CPP to off.
* Fortran target depends
* Remove incorrect source attribute
* Revert define removal
* printf specifiers and VS2015 min changes
* Committing clang-format changes
* Add time struct
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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 e9cd289..613aa60 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); + HDfree(timestrs.user); + HDfree(timestrs.system); + HDfree(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"); } |