summaryrefslogtreecommitdiffstats
path: root/src/H5Cpkg.h
diff options
context:
space:
mode:
authormainzer <mainzer#hdfgroup.org>2017-03-28 16:21:40 (GMT)
committermainzer <mainzer#hdfgroup.org>2017-03-28 16:21:40 (GMT)
commitafd8f64c29f7cffde895232406a3a388c6d77e77 (patch)
treeb142b9a9d70ce2dc9fcc3aa1ab27f57b149c5aed /src/H5Cpkg.h
parentbe028580c8789301e4106d8d6e79a8fc8300e706 (diff)
downloadhdf5-afd8f64c29f7cffde895232406a3a388c6d77e77.zip
hdf5-afd8f64c29f7cffde895232406a3a388c6d77e77.tar.gz
hdf5-afd8f64c29f7cffde895232406a3a388c6d77e77.tar.bz2
Omnibus checkin for several relatively minor modifications:
1) Added code test/page_buffer.c to verify that page buffering is disabled in parallel builds. 2) Added code to test/cache_image.c to verify correct interaction between evict on close and cache image -- in particular management of a file containing a cache image containing dirty metadata that has been opened R/O. Also fix for the bug exposed. 3) Added code to testpar/t_cache_image.c to verify expected procedure for reading cache images, and also supporting stats collection code needed for the test. 4) Repair of an overactive sanity check in H5C__reconstruct_cache_contents(). 5) Other minor tidies in passing. Tested serial and parallel, debug and production on Jelly.
Diffstat (limited to 'src/H5Cpkg.h')
-rw-r--r--src/H5Cpkg.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 69e8145..90a84c4 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -686,6 +686,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
(cache_ptr)->images_created++; \
}
+#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) \
+{ \
+ /* make sure image len is still good */ \
+ HDassert((cache_ptr)->image_len > 0); \
+ (cache_ptr)->images_read++; \
+}
+
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr) \
{ \
/* make sure image len is still good */ \
@@ -931,6 +938,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
#define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr)
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr)
+#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr)
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr)
#define H5C__UPDATE_STATS_FOR_PREFETCH(cache_ptr, dirty)
#define H5C__UPDATE_STATS_FOR_PREFETCH_HIT(cache_ptr)
@@ -4549,6 +4557,18 @@ typedef struct H5C_tag_info_t {
* Further, since cache images are only created at file
* close, this field should only be set at that time.
*
+ * images_read: Integer field containing the number of cache images
+ * read from file. Note that reading an image is different
+ * from loading it -- reading the image means just that,
+ * while loading the image refers to decoding it and loading
+ * it into the metadata cache.
+ *
+ * In the serial case, image_read should always equal
+ * images_loaded. However, in the parallel case, the
+ * image should only be read by process 0. All other
+ * processes should receive the cache image via a broadcast
+ * from process 0.
+ *
* images_loaded: Integer field containing the number of cache images
* loaded since the last time statistics were reset.
*
@@ -4864,6 +4884,7 @@ struct H5C_t {
/* Fields for tracking cache image operations */
int32_t images_created;
+ int32_t images_read;
int32_t images_loaded;
hsize_t last_image_size;