diff options
author | myang6 <myang6@hdfgroup.org> | 2021-10-29 20:00:02 (GMT) |
---|---|---|
committer | myang6 <myang6@hdfgroup.org> | 2021-10-29 20:00:02 (GMT) |
commit | b8a775cbe44e3518a817f413993adef7a6eca88f (patch) | |
tree | 45fe22a49bd181862b394b474dcc2d54fccdee81 /src/H5Fvfd_swmr.c | |
parent | 553c1b449e7c77cf143d587beb41deaa63282904 (diff) | |
download | hdf5-b8a775cbe44e3518a817f413993adef7a6eca88f.zip hdf5-b8a775cbe44e3518a817f413993adef7a6eca88f.tar.gz hdf5-b8a775cbe44e3518a817f413993adef7a6eca88f.tar.bz2 |
Update comments to use the HDF5 timer for the log feature.
Diffstat (limited to 'src/H5Fvfd_swmr.c')
-rw-r--r-- | src/H5Fvfd_swmr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index be3dbb6..ce9e468 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -355,7 +355,7 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing) #endif done: - /* Kent: close the VFD SWMR log file if it is turned on. + /* Kent: Stop the timer and close the VFD SWMR log file if it is turned on. * Please REVIEW to ensure this is the right place to * close the log file. */ @@ -799,6 +799,8 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) herr_t ret_value = SUCCEED; /* Return value */ hbool_t incr_tick = FALSE; + /* Kent: define the local variables to calculate the EOT time + and write them to the log file. */ H5_timevals_t current_time; double start_elapsed_time, end_elapsed_time; unsigned int temp_time; @@ -813,8 +815,8 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) /* Kent */ /* Obtain the starting time for the logging info: the processing time of this function. */ if (shared->vfd_swmr_log_on == true) { - if (H5_timer_get_times(f->shared->vfd_swmr_log_start_time, ¤t_time) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get H5_timer_get_times") + if (H5_timer_get_times(shared->vfd_swmr_log_start_time, ¤t_time) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time from H5_timer_get_times") start_elapsed_time = current_time.elapsed; } /* Kent */ @@ -943,8 +945,8 @@ update_eot: done: /* Kent: Calcuate the processing time and write the time info to the log file */ if (shared->vfd_swmr_log_on == true) { - if (H5_timer_get_times(f->shared->vfd_swmr_log_start_time, ¤t_time) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get H5_timer_get_times") + if (H5_timer_get_times(shared->vfd_swmr_log_start_time, ¤t_time) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get time from H5_timer_get_times") end_elapsed_time = current_time.elapsed; log_msg = HDmalloc(48); temp_time = (unsigned int)((end_elapsed_time - start_elapsed_time) * 1000); @@ -1983,7 +1985,7 @@ H5F_post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, char *log_info) /* Obtain the current time. If failed, write an error message to the log file. - else calcluate the elapsed time in seconds since the log file + else obtain the elapsed time in seconds since the log file was created and write the time to the log file. */ if (H5_timer_get_times(f->shared->vfd_swmr_log_start_time, ¤t_time) < 0) { gettime_error = HDmalloc(14); |