summaryrefslogtreecommitdiffstats
path: root/src/H5Fvfd_swmr.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-04-13 21:16:53 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-04-13 21:16:53 (GMT)
commit03a91f3cf55349a81000c4cebf8d726980b6b220 (patch)
tree131efce4a012183ad27b079851fa35e646695dee /src/H5Fvfd_swmr.c
parent5248e9f2c5f5b3ece8479845d42e3fe5106c0b42 (diff)
downloadhdf5-03a91f3cf55349a81000c4cebf8d726980b6b220.zip
hdf5-03a91f3cf55349a81000c4cebf8d726980b6b220.tar.gz
hdf5-03a91f3cf55349a81000c4cebf8d726980b6b220.tar.bz2
Add a log outlet, `tick`, and log some changes to the tick number there.
While I'm here, assert in the reader that the tick number hasn't leapt forward by more than max_lag ticks.
Diffstat (limited to 'src/H5Fvfd_swmr.c')
-rw-r--r--src/H5Fvfd_swmr.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 4b55ef1..b10a428 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -93,6 +93,7 @@ HLOG_OUTLET_MEDIUM_DEFN(noisy_shadow_defrees, shadow_defrees,
HLOG_OUTLET_S_OFF);
HLOG_OUTLET_SHORT_DEFN(shadow_index_enlarge, swmr);
HLOG_OUTLET_SHORT_DEFN(shadow_index_reclaim, swmr);
+HLOG_OUTLET_SHORT_DEFN(tick, swmr);
/*
* The head of the end of tick queue (EOT queue) for files opened in either
@@ -253,6 +254,10 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create)
HGOTO_ERROR(H5E_FILE, H5E_CANTLOAD, FAIL, \
"unable to load/decode metadata file")
+
+ hlog_fast(tick, "%s first tick %" PRIu64,
+ __func__, f->shared->tick_num);
+
#if 0 /* JRM */
HDfprintf(stderr,
"##### initialized index: tick/used/len = %lld/%d/%d #####\n",
@@ -1148,11 +1153,12 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, \
"error in retrieving tick_num from driver")
-#if 0 /* JRM */
- HDfprintf(stderr,
- "--- reader EOT curr/new tick = %" PRIu64 "/%" PRIu64 " ---\n",
- tick_num_g, tmp_tick_num);
-#endif /* JRM */
+ hlog_fast(tick,
+ "%s last tick %" PRIu64 " new tick %" PRIu64,
+ __func__, f->shared->tick_num, tmp_tick_num);
+
+ assert(tmp_tick_num <
+ f->shared->tick_num + f->shared->vfd_swmr_config.max_lag);
if ( tmp_tick_num != f->shared->tick_num ) {
@@ -1565,6 +1571,9 @@ H5F__vfd_swmr_update_end_of_tick_and_tick_num(H5F_t *f, hbool_t incr_tick_num)
f->shared->tick_num++;
+ hlog_fast(tick, "%s tick %" PRIu64 " -> %" PRIu64,
+ __func__, f->shared->tick_num - 1, f->shared->tick_num);
+
if ( H5PB_vfd_swmr__set_tick(f->shared) < 0 )
HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, \