summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5C.c410
-rw-r--r--src/H5Cprivate.h22
-rw-r--r--src/H5Edefin.h2
-rw-r--r--src/H5Einit.h10
-rw-r--r--src/H5Epubgen.h4
-rw-r--r--src/H5Eterm.h4
-rw-r--r--src/H5err.txt2
-rw-r--r--src/H5private.h5
-rw-r--r--test/cache.c2560
-rw-r--r--test/cache_common.c628
-rw-r--r--test/cache_common.h48
11 files changed, 3232 insertions, 463 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 49e7921..ad1bd57 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -3147,6 +3147,10 @@ H5C_create(size_t max_cache_size,
cache_ptr->epoch_marker_ringbuf_last = 0;
cache_ptr->epoch_marker_ringbuf_size = 0;
+ /* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
+ HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
+
+ /* Set non-zero/FALSE/NULL fields for epoch markers */
for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ )
{
(cache_ptr->epoch_marker_active)[i] = FALSE;
@@ -3155,27 +3159,7 @@ H5C_create(size_t max_cache_size,
H5C__H5C_CACHE_ENTRY_T_MAGIC;
#endif /* NDEBUG */
((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
- ((cache_ptr->epoch_markers)[i]).size = (size_t)0;
((cache_ptr->epoch_markers)[i]).type = &epoch_marker_class;
- ((cache_ptr->epoch_markers)[i]).is_dirty = FALSE;
- ((cache_ptr->epoch_markers)[i]).dirtied = FALSE;
- ((cache_ptr->epoch_markers)[i]).is_protected = FALSE;
- ((cache_ptr->epoch_markers)[i]).is_read_only = FALSE;
- ((cache_ptr->epoch_markers)[i]).ro_ref_count = 0;
- ((cache_ptr->epoch_markers)[i]).is_pinned = FALSE;
- ((cache_ptr->epoch_markers)[i]).in_slist = FALSE;
- ((cache_ptr->epoch_markers)[i]).ht_next = NULL;
- ((cache_ptr->epoch_markers)[i]).ht_prev = NULL;
- ((cache_ptr->epoch_markers)[i]).next = NULL;
- ((cache_ptr->epoch_markers)[i]).prev = NULL;
- ((cache_ptr->epoch_markers)[i]).aux_next = NULL;
- ((cache_ptr->epoch_markers)[i]).aux_prev = NULL;
-#if H5C_COLLECT_CACHE_ENTRY_STATS
- ((cache_ptr->epoch_markers)[i]).accesses = 0;
- ((cache_ptr->epoch_markers)[i]).clears = 0;
- ((cache_ptr->epoch_markers)[i]).flushes = 0;
- ((cache_ptr->epoch_markers)[i]).pins = 0;
-#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
}
if ( H5C_reset_cache_hit_rate_stats(cache_ptr) != SUCCEED ) {
@@ -3836,10 +3820,7 @@ H5C_flush_cache(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"next_entry_ptr == NULL 1 ?!?!");
}
-#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
+ HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
HDassert( next_entry_ptr->is_dirty );
HDassert( next_entry_ptr->in_slist );
@@ -3955,10 +3936,7 @@ H5C_flush_cache(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"next_entry_ptr == NULL 2 ?!?!");
}
-#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
+ HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
HDassert( next_entry_ptr->is_dirty );
HDassert( next_entry_ptr->in_slist );
} else {
@@ -4802,9 +4780,7 @@ H5C_insert_entry(H5F_t * f,
void * thing,
unsigned int flags)
{
- /* const char * fcn_name = "H5C_insert_entry()"; */
herr_t result;
- herr_t ret_value = SUCCEED; /* Return value */
hbool_t first_flush = TRUE;
hbool_t insert_pinned;
hbool_t set_flush_marker;
@@ -4812,6 +4788,8 @@ H5C_insert_entry(H5F_t * f,
size_t empty_space;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * test_entry_ptr;
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5C_insert_entry, FAIL)
@@ -4900,6 +4878,12 @@ H5C_insert_entry(H5F_t * f,
entry_ptr->destroy_in_progress = FALSE;
entry_ptr->free_file_space_on_destroy = FALSE;
+ /* Initialize flush dependency height fields */
+ entry_ptr->flush_dep_parent = NULL;
+ for(u = 0; u < H5C__NUM_FLUSH_DEP_HEIGHTS; u++)
+ entry_ptr->child_flush_dep_height_rc[u] = 0;
+ entry_ptr->flush_dep_height = 0;
+
entry_ptr->ht_next = NULL;
entry_ptr->ht_prev = NULL;
@@ -7661,20 +7645,14 @@ H5C_stats__reset(H5C_t UNUSED * cache_ptr)
/*-------------------------------------------------------------------------
* Function: H5C_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry must be unprotected at
- * the time of call, and must be pinned.
+ * Purpose: Unpin a cache entry. The entry can be either protected or
+ * unprotected at the time of call, but must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 3/22/06
*
- * Modifications:
- *
- * JRM -- 4/26/06
- * Modified routine to allow it to operate on protected
- * entries.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -8490,6 +8468,341 @@ done:
} /* H5C_validate_resize_config() */
+/*-------------------------------------------------------------------------
+ * Function: H5C_adjust_flush_dependency_rc()
+ *
+ * Purpose: "Atomicly" adjust flush dependency ref. counts for an entry,
+ * as a result of a flush dependency child's height changing.
+ *
+ * Note: Entry will remain in flush dependency relationship with its
+ * child entry (i.e. it's not going to get unpinned as a result
+ * of this change), but change could trickle upward, if this
+ * entry's height changes and it has a flush dependency parent.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 3/05/09
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+H5C_adjust_flush_dependency_rc(H5C_cache_entry_t * cache_entry,
+ unsigned old_child_height, unsigned new_child_height)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5C_adjust_flush_dependency_rc)
+
+ /* Sanity checks */
+ HDassert(cache_entry);
+ HDassert(cache_entry->is_pinned);
+ HDassert(cache_entry->flush_dep_height > 0);
+ HDassert(cache_entry->flush_dep_height < H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(cache_entry->child_flush_dep_height_rc[old_child_height] > 0);
+ HDassert(old_child_height < H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(old_child_height != new_child_height);
+ HDassert(new_child_height < H5C__NUM_FLUSH_DEP_HEIGHTS);
+
+ /* Adjust ref. counts for entry's flush dependency children heights */
+ cache_entry->child_flush_dep_height_rc[new_child_height]++;
+ cache_entry->child_flush_dep_height_rc[old_child_height]--;
+
+ /* Check for flush dependency height of entry increasing */
+ if((new_child_height + 1) > cache_entry->flush_dep_height) {
+
+ /* Check if entry has _its_ own parent flush dependency entry */
+ if(NULL != cache_entry->flush_dep_parent) {
+ /* Adjust flush dependency ref. counts on entry's parent */
+ H5C_adjust_flush_dependency_rc(cache_entry->flush_dep_parent, cache_entry->flush_dep_height, new_child_height + 1);
+ } /* end if */
+
+ /* Set new flush dependency height of entry */
+ cache_entry->flush_dep_height = new_child_height + 1;
+ } /* end if */
+ else {
+ /* Check for child's flush dep. height decreasing and ref. count of
+ * old child height going to zero, it could mean the parent's
+ * flush dependency height dropped.
+ */
+ if((new_child_height < old_child_height)
+ && ((old_child_height + 1) == cache_entry->flush_dep_height)
+ && (0 == cache_entry->child_flush_dep_height_rc[old_child_height])) {
+ int i; /* Local index variable */
+
+ /* Re-scan child flush dependency height ref. counts to determine
+ * this entry's height.
+ */
+#ifndef NDEBUG
+ for(i = (H5C__NUM_FLUSH_DEP_HEIGHTS - 1); i > (int)new_child_height; i--)
+ HDassert(0 == cache_entry->child_flush_dep_height_rc[i]);
+#endif /* NDEBUG */
+ for(i = (int)new_child_height; i >= 0; i--)
+ /* Check for child flush dependencies of this height */
+ if(cache_entry->child_flush_dep_height_rc[i] > 0)
+ break;
+
+ /* Sanity checks */
+ HDassert((unsigned)(i + 1) < cache_entry->flush_dep_height);
+
+ /* Check if entry has _its_ own parent flush dependency entry */
+ if(NULL != cache_entry->flush_dep_parent) {
+ /* Adjust flush dependency ref. counts on entry's parent */
+ H5C_adjust_flush_dependency_rc(cache_entry->flush_dep_parent, cache_entry->flush_dep_height, (unsigned)(i + 1));
+ } /* end if */
+
+ /* Set new flush dependency height of entry */
+ cache_entry->flush_dep_height = (unsigned)(i + 1);
+ } /* end if */
+ } /* end else */
+
+
+ /* Post-conditions, for successful operation */
+ HDassert(cache_entry->is_pinned);
+ HDassert(cache_entry->flush_dep_height > 0);
+ HDassert(cache_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(cache_entry->child_flush_dep_height_rc[new_child_height] > 0);
+
+ FUNC_LEAVE_NOAPI_VOID
+} /* H5C_adjust_flush_dependency_rc() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5C_create_flush_dependency()
+ *
+ * Purpose: Initiates a parent<->child entry flush dependency. The parent
+ * entry must be protected at the time of call, and must have all
+ * dependencies removed before the cache can shut down.
+ *
+ * Note: Flush dependencies in the cache indicate that a child entry
+ * must be flushed to the file before its parent. (This is
+ * currently used to implement Single-Writer/Multiple-Reader (SWMR)
+ * I/O access for data structures in the file).
+ *
+ * Each child entry can have only one parent entry, but parent
+ * entries can have >1 child entries. The flush dependency
+ * height of a parent entry is one greater than the max. flush
+ * dependency height of its children.
+ *
+ * Creating a flush dependency between two entries will also pin
+ * the parent entry. (The parent entry must _not_ be pinned
+ * through some other mechanism)
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 3/05/09
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef NDEBUG
+herr_t
+H5C_create_flush_dependency(H5C_t * cache_ptr, void * parent_thing,
+ void * child_thing)
+#else
+herr_t
+H5C_create_flush_dependency(H5C_t UNUSED * cache_ptr, void * parent_thing,
+ void * child_thing)
+#endif
+{
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
+ H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */
+#ifndef NDEBUG
+ unsigned prev_flush_dep_height = parent_entry->flush_dep_height; /* Previous flush height for parent entry */
+#endif /* NDEBUG */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5C_create_flush_dependency, FAIL)
+
+ /* Sanity checks */
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(parent_entry);
+ HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(parent_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(H5F_addr_defined(parent_entry->addr));
+ HDassert(child_entry);
+ HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(H5F_addr_defined(child_entry->addr));
+ HDassert(child_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
+
+ /* More sanity checks */
+ if(child_entry == parent_entry)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself")
+ if(!parent_entry->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't protected")
+ if(NULL != child_entry->flush_dep_parent)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry already has flush dependency parent")
+ {
+ H5C_cache_entry_t *tmp_entry = parent_entry; /* Temporary cache entry in flush dependency chain */
+ unsigned tmp_flush_height = 0; /* Different in heights of parent entry */
+
+ /* Find the top entry in the flush dependency list */
+ while(NULL != tmp_entry->flush_dep_parent) {
+ tmp_flush_height++;
+ tmp_entry = tmp_entry->flush_dep_parent;
+ } /* end while */
+
+ /* Check if we will make the dependency chain too long */
+ if((tmp_flush_height + child_entry->flush_dep_height + 1)
+ > H5C__NUM_FLUSH_DEP_HEIGHTS)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Combined flush dependency height too large")
+ }
+
+ /* Check for parent already pinned */
+ if(parent_entry->is_pinned) {
+ /* Verify that the parent entry was pinned through a flush dependency relationship */
+ if(0 == parent_entry->flush_dep_height)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry wasn't pinned through flush dependency")
+ } /* end if */
+ else {
+ /* Sanity check */
+ HDassert(parent_entry->flush_dep_height == 0);
+
+ /* Pin the parent entry */
+ parent_entry->is_pinned = TRUE;
+ H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry)
+ } /* end else */
+
+ /* Increment ref. count for parent's flush dependency children heights */
+ parent_entry->child_flush_dep_height_rc[child_entry->flush_dep_height]++;
+
+ /* Check for increasing parent flush dependency height */
+ if((child_entry->flush_dep_height + 1) > parent_entry->flush_dep_height) {
+
+ /* Check if parent entry has _its_ own parent flush dependency entry */
+ if(NULL != parent_entry->flush_dep_parent) {
+ /* Adjust flush dependency ref. counts on parent entry's parent */
+ H5C_adjust_flush_dependency_rc(parent_entry->flush_dep_parent, parent_entry->flush_dep_height, (child_entry->flush_dep_height + 1));
+ } /* end if */
+
+ /* Increase flush dependency height of parent entry */
+ parent_entry->flush_dep_height = child_entry->flush_dep_height + 1;
+ } /* end if */
+
+ /* Set parent for child entry */
+ child_entry->flush_dep_parent = parent_entry;
+
+
+ /* Post-conditions, for successful operation */
+ HDassert(parent_entry->is_pinned);
+ HDassert(parent_entry->flush_dep_height > 0);
+ HDassert(parent_entry->flush_dep_height < H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(prev_flush_dep_height <= parent_entry->flush_dep_height);
+ HDassert(parent_entry->child_flush_dep_height_rc[child_entry->flush_dep_height] > 0);
+ HDassert(NULL != child_entry->flush_dep_parent);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5C_create_flush_dependency() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5C_destroy_flush_dependency()
+ *
+ * Purpose: Terminates a parent<-> child entry flush dependency. The
+ * parent entry must be pinned and have a positive flush
+ * dependency height (which could go to zero as a result of
+ * this operation).
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * 3/05/09
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5C_destroy_flush_dependency(H5C_t * cache_ptr, void *parent_thing,
+ void * child_thing)
+{
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
+ H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
+#ifndef NDEBUG
+ unsigned prev_flush_dep_height = parent_entry->flush_dep_height; /* Previous flush height for parent entry */
+#endif /* NDEBUG */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5C_destroy_flush_dependency, FAIL)
+
+ /* Sanity checks */
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+ HDassert(parent_entry);
+ HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(H5F_addr_defined(parent_entry->addr));
+ HDassert(parent_entry->flush_dep_height <= H5C__NUM_FLUSH_DEP_HEIGHTS);
+ HDassert(child_entry);
+ HDassert(child_entry->flush_dep_parent != child_entry);
+ HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(H5F_addr_defined(child_entry->addr));
+
+ /* Usage checks */
+ if(!parent_entry->is_protected)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't pinned")
+ if(!parent_entry->is_pinned)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't pinned")
+ if(0 == parent_entry->flush_dep_height)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't a flush dependency parent")
+ if(NULL == child_entry->flush_dep_parent)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Child entry doesn't have a flush dependency parent")
+ if(0 == parent_entry->child_flush_dep_height_rc[child_entry->flush_dep_height])
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry flush dependency ref. count has no child entries of this height")
+ if(child_entry->flush_dep_parent != parent_entry)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNDEPEND, FAIL, "Parent entry isn't flush dependency parent for child entry")
+
+ /* Decrement the ref. count for flush dependency height of children for parent entry */
+ parent_entry->child_flush_dep_height_rc[child_entry->flush_dep_height]--;
+
+ /* Check for flush dependency ref. count at this height going to zero and
+ * parent entry flush dependency height dropping
+ */
+ if(((child_entry->flush_dep_height + 1) == parent_entry->flush_dep_height) &&
+ 0 == parent_entry->child_flush_dep_height_rc[child_entry->flush_dep_height]) {
+ int i; /* Local index variable */
+
+ /* Reverse scan for new flush dependency height of parent */
+#ifndef NDEBUG
+ for(i = (H5C__NUM_FLUSH_DEP_HEIGHTS - 1); i > (int)child_entry->flush_dep_height; i--)
+ HDassert(0 == parent_entry->child_flush_dep_height_rc[i]);
+#endif /* NDEBUG */
+ for(i = (int)child_entry->flush_dep_height; i >= 0; i--)
+ /* Check for child flush dependencies of this height */
+ if(parent_entry->child_flush_dep_height_rc[i] > 0)
+ break;
+
+ /* Sanity check */
+ HDassert((unsigned)(i + 1) < parent_entry->flush_dep_height);
+
+ /* Check if parent entry is a child in another flush dependency relationship */
+ if(NULL != parent_entry->flush_dep_parent) {
+ /* Change flush dependency ref. counts of parent's parent */
+ H5C_adjust_flush_dependency_rc(parent_entry->flush_dep_parent, parent_entry->flush_dep_height, (unsigned)(i + 1));
+ } /* end if */
+
+ /* Increase flush dependency height of parent entry */
+ parent_entry->flush_dep_height = (unsigned)(i + 1);
+
+ /* Check for height of parent dropping to zero (i.e. no longer a
+ * parent of _any_ child flush dependencies).
+ */
+ if(0 == parent_entry->flush_dep_height) {
+ /* Unpin parent entry */
+ parent_entry->is_pinned = FALSE;
+ H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, parent_entry)
+ } /* end if */
+ } /* end if */
+
+ /* Reset parent of child entry */
+ child_entry->flush_dep_parent = NULL;
+
+ /* Post-conditions, for successful operation */
+ HDassert(prev_flush_dep_height >= parent_entry->flush_dep_height);
+ HDassert(NULL == child_entry->flush_dep_parent);
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5C_destroy_flush_dependency() */
+
+
/*************************************************************************/
/**************************** Private Functions: *************************/
/*************************************************************************/
@@ -9976,9 +10289,7 @@ H5C_flush_invalidate_cache(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"next_entry_ptr == NULL 1 ?!?!");
}
-#ifndef NDEBUG
HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
HDassert( next_entry_ptr->is_dirty );
HDassert( next_entry_ptr->in_slist );
@@ -10074,10 +10385,7 @@ H5C_flush_invalidate_cache(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"next_entry_ptr == NULL 2 ?!?!");
}
-#ifndef NDEBUG
- HDassert( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC );
-#endif /* NDEBUG */
+ HDassert( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC );
HDassert( next_entry_ptr->is_dirty );
HDassert( next_entry_ptr->in_slist );
@@ -10217,11 +10525,8 @@ H5C_flush_invalidate_cache(H5F_t * f,
entry_ptr = next_entry_ptr;
next_entry_ptr = entry_ptr->ht_next;
-#ifndef NDEBUG
HDassert ( ( next_entry_ptr == NULL ) ||
- ( next_entry_ptr->magic ==
- H5C__H5C_CACHE_ENTRY_T_MAGIC ) );
-#endif /* NDEBUG */
+ ( next_entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC ) );
if ( entry_ptr->is_protected ) {
/* we have major problems -- but lets flush and destroy
@@ -11023,8 +11328,9 @@ H5C_load_entry(H5F_t * f,
#endif /* NDEBUG */
{
void * thing = NULL;
- void * ret_value = NULL;
H5C_cache_entry_t * entry_ptr = NULL;
+ unsigned u; /* Local index variable */
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5C_load_entry)
@@ -11091,6 +11397,12 @@ H5C_load_entry(H5F_t * f,
HDassert( entry_ptr->size < H5C_MAX_ENTRY_SIZE );
+ /* Initialize flush dependency height fields */
+ entry_ptr->flush_dep_parent = NULL;
+ for(u = 0; u < H5C__NUM_FLUSH_DEP_HEIGHTS; u++)
+ entry_ptr->child_flush_dep_height_rc[u] = 0;
+ entry_ptr->flush_dep_height = 0;
+
entry_ptr->ht_next = NULL;
entry_ptr->ht_prev = NULL;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 4ce321c..65e6f6c 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -32,7 +32,7 @@
#include "H5Cpublic.h" /*public prototypes */
-/* Pivate headers needed by this header */
+/* Private headers needed by this header */
#include "H5private.h" /* Generic Functions */
#include "H5Fprivate.h" /* File access */
@@ -183,6 +183,14 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr,
#define H5C__DEFAULT_MAX_CACHE_SIZE ((size_t)(4 * 1024 * 1024))
#define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024))
+/* Maximum height of flush dependency relationships between entries. This is
+ * currently tuned to the extensible array (H5EA) data structure, which only
+ * requires 4 levels of dependency (i.e. heights 0-3).
+ */
+
+#define H5C__NUM_FLUSH_DEP_HEIGHTS 4
+
+
/****************************************************************************
*
@@ -496,6 +504,12 @@ typedef struct H5C_cache_entry_t
hbool_t destroy_in_progress;
hbool_t free_file_space_on_destroy;
+ /* fields supporting the 'flush dependency height': */
+
+ struct H5C_cache_entry_t * flush_dep_parent;
+ uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
+ unsigned flush_dep_height;
+
/* fields supporting the hash table: */
struct H5C_cache_entry_t * ht_next;
@@ -1040,6 +1054,9 @@ H5_DLL herr_t H5C_rename_entry(H5C_t * cache_ptr,
H5_DLL herr_t H5C_pin_protected_entry(H5C_t * cache_ptr,
void * thing);
+H5_DLL herr_t H5C_create_flush_dependency(H5C_t *cache_ptr, void *parent_thing,
+ void *child_thing);
+
H5_DLL void * H5C_protect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
@@ -1079,6 +1096,9 @@ H5_DLL void H5C_stats__reset(H5C_t * cache_ptr);
H5_DLL herr_t H5C_unpin_entry(H5C_t * cache_ptr, void * thing);
+H5_DLL herr_t H5C_destroy_flush_dependency(H5C_t *cache_ptr, void *parent_thing,
+ void *child_thing);
+
H5_DLL herr_t H5C_unprotect(H5F_t * f,
hid_t primary_dxpl_id,
hid_t secondary_dxpl_id,
diff --git a/src/H5Edefin.h b/src/H5Edefin.h
index 612fcb1..b31b31b 100644
--- a/src/H5Edefin.h
+++ b/src/H5Edefin.h
@@ -164,6 +164,8 @@ hid_t H5E_CANTMARKDIRTY_g = FAIL; /* Unable to mark a pinned entry as dirt
hid_t H5E_CANTDIRTY_g = FAIL; /* Unable to mark metadata as dirty */
hid_t H5E_CANTEXPUNGE_g = FAIL; /* Unable to expunge a metadata cache entry */
hid_t H5E_CANTRESIZE_g = FAIL; /* Unable to resize a metadata cache entry */
+hid_t H5E_CANTDEPEND_g = FAIL; /* Unable to create a flush dependency */
+hid_t H5E_CANTUNDEPEND_g = FAIL; /* Unable to destroy a flush dependency */
/* Link related errors */
hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */
diff --git a/src/H5Einit.h b/src/H5Einit.h
index 20e156c..204644f 100644
--- a/src/H5Einit.h
+++ b/src/H5Einit.h
@@ -622,6 +622,16 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to resize a metadata cache entr
HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
if((H5E_CANTRESIZE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTDEPEND_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to create a flush dependency"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
+assert(H5E_CANTUNDEPEND_g==(-1));
+if((msg = H5E_create_msg(cls, H5E_MINOR, "Unable to destroy a flush dependency"))==NULL)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed")
+if((H5E_CANTUNDEPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message")
/* Link related errors */
assert(H5E_TRAVERSE_g==(-1));
diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h
index 4e981dc..736349a 100644
--- a/src/H5Epubgen.h
+++ b/src/H5Epubgen.h
@@ -266,6 +266,8 @@ H5_DLLVAR hid_t H5E_NOIDS_g; /* Out of IDs for group */
#define H5E_CANTDIRTY (H5OPEN H5E_CANTDIRTY_g)
#define H5E_CANTEXPUNGE (H5OPEN H5E_CANTEXPUNGE_g)
#define H5E_CANTRESIZE (H5OPEN H5E_CANTRESIZE_g)
+#define H5E_CANTDEPEND (H5OPEN H5E_CANTDEPEND_g)
+#define H5E_CANTUNDEPEND (H5OPEN H5E_CANTUNDEPEND_g)
H5_DLLVAR hid_t H5E_CANTFLUSH_g; /* Unable to flush data from cache */
H5_DLLVAR hid_t H5E_CANTSERIALIZE_g; /* Unable to serialize data from cache */
H5_DLLVAR hid_t H5E_CANTLOAD_g; /* Unable to load metadata into cache */
@@ -282,6 +284,8 @@ H5_DLLVAR hid_t H5E_CANTMARKDIRTY_g; /* Unable to mark a pinned entry as dirty *
H5_DLLVAR hid_t H5E_CANTDIRTY_g; /* Unable to mark metadata as dirty */
H5_DLLVAR hid_t H5E_CANTEXPUNGE_g; /* Unable to expunge a metadata cache entry */
H5_DLLVAR hid_t H5E_CANTRESIZE_g; /* Unable to resize a metadata cache entry */
+H5_DLLVAR hid_t H5E_CANTDEPEND_g; /* Unable to create a flush dependency */
+H5_DLLVAR hid_t H5E_CANTUNDEPEND_g; /* Unable to destroy a flush dependency */
/* Link related errors */
#define H5E_TRAVERSE (H5OPEN H5E_TRAVERSE_g)
diff --git a/src/H5Eterm.h b/src/H5Eterm.h
index 7595e7f..8936dc0 100644
--- a/src/H5Eterm.h
+++ b/src/H5Eterm.h
@@ -165,7 +165,9 @@ H5E_CANTUNPIN_g=
H5E_CANTMARKDIRTY_g=
H5E_CANTDIRTY_g=
H5E_CANTEXPUNGE_g=
-H5E_CANTRESIZE_g=
+H5E_CANTRESIZE_g=
+H5E_CANTDEPEND_g=
+H5E_CANTUNDEPEND_g=
/* Link related errors */
H5E_TRAVERSE_g=
diff --git a/src/H5err.txt b/src/H5err.txt
index 7f110b8..64e9729 100644
--- a/src/H5err.txt
+++ b/src/H5err.txt
@@ -169,6 +169,8 @@ MINOR, CACHE, H5E_CANTMARKDIRTY, Unable to mark a pinned entry as dirty
MINOR, CACHE, H5E_CANTDIRTY, Unable to mark metadata as dirty
MINOR, CACHE, H5E_CANTEXPUNGE, Unable to expunge a metadata cache entry
MINOR, CACHE, H5E_CANTRESIZE, Unable to resize a metadata cache entry
+MINOR, CACHE, H5E_CANTDEPEND, Unable to create a flush dependency
+MINOR, CACHE, H5E_CANTUNDEPEND, Unable to destroy a flush dependency
# B-tree related errors
MINOR, BTREE, H5E_NOTFOUND, Object not found
diff --git a/src/H5private.h b/src/H5private.h
index ea55a61..695b015 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1898,6 +1898,11 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
} /*end scope from beginning of FUNC_ENTER*/
+/* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */
+/* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */
+#define H5_STRINGIZE(x) #x
+#define H5_TOSTRING(x) H5_STRINGIZE(x)
+
/* Macro for "glueing" together items, for re-scanning macros */
#define H5_GLUE(x,y) x##y
#define H5_GLUE3(x,y,z) x##y##z
diff --git a/test/cache.c b/test/cache.c
index ff3e57e..c5e45ea 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -123,6 +123,8 @@ static unsigned check_auto_cache_resize_epoch_markers(void);
static unsigned check_auto_cache_resize_input_errs(void);
static unsigned check_auto_cache_resize_aux_fcns(void);
static unsigned check_metadata_blizzard_absence(hbool_t fill_via_insertion);
+static unsigned check_flush_deps(void);
+static unsigned check_flush_deps_err(void);
/**************************************************************************/
@@ -9791,61 +9793,61 @@ check_flush_cache__flush_op_eviction_test(H5C_t * cache_ptr)
* array only processes as much of it as it is told to, we don't have to
* worry about maintaining the status of entries that we haven't used yet.
*/
- /* entry entry in at main */
- /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: */
- { VARIABLE_ENTRY_TYPE, 0, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 1, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 2, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 3, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 4, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 5, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 6, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { VARIABLE_ENTRY_TYPE, 7, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 0, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 1, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 2, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 3, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 4, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 5, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 6, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 7, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 8, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 9, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 10, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 11, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 12, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE },
- { LARGE_ENTRY_TYPE, 13, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE }
+ /* entry entry in at main flush dep flush dep child flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: */
+ { VARIABLE_ENTRY_TYPE, 0, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 1, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 2, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 3, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 4, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 5, VARIABLE_ENTRY_SIZE/2, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 6, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { VARIABLE_ENTRY_TYPE, 7, VARIABLE_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 0, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 1, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 2, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 3, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 4, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 5, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 6, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 7, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 8, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 9, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 10, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 11, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 12, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 13, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 14, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 15, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 16, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 17, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 18, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 19, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 20, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 21, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 22, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 23, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 25, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 26, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 27, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 28, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 29, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 0, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 1, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 2, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 3, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 4, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 5, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 6, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 7, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 8, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 9, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 10, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 11, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 12, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { LARGE_ENTRY_TYPE, 13, LARGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 }
};
if ( pass ) {
@@ -25779,33 +25781,61 @@ check_auto_cache_resize_epoch_markers(void)
/* Epsilon for floating-point comparisons */
#define FP_EPSILON 0.000001
-#define RESIZE_CONFIGS_ARE_EQUAL(a, b, compare_init) \
-( ( (a).version == (b).version ) && \
- ( (a).rpt_fcn == (b).rpt_fcn ) && \
- ( ( ! compare_init ) || \
- ( (a).set_initial_size == (b).set_initial_size ) ) && \
- ( ( ! compare_init ) || \
- ( (a).initial_size == (b).initial_size ) ) && \
- ( HDfabs((a).min_clean_fraction - (b).min_clean_fraction) < FP_EPSILON ) && \
- ( (a).max_size == (b).max_size ) && \
- ( (a).min_size == (b).min_size ) && \
- ( (a).epoch_length == (b).epoch_length ) && \
- ( (a).incr_mode == (b).incr_mode ) && \
- ( HDfabs((a).lower_hr_threshold - (b).lower_hr_threshold) < FP_EPSILON ) && \
- ( HDfabs((a).increment - (b).increment) < FP_EPSILON ) && \
- ( (a).apply_max_increment == (b).apply_max_increment ) && \
- ( (a).max_increment == (b).max_increment ) && \
- ( (a).flash_incr_mode == (b).flash_incr_mode ) && \
- ( HDfabs((a).flash_multiple - (b).flash_multiple) < FP_EPSILON ) && \
- ( HDfabs((a).flash_threshold - (b).flash_threshold) < FP_EPSILON ) && \
- ( (a).decr_mode == (b).decr_mode ) && \
- ( HDfabs((a).upper_hr_threshold - (b).upper_hr_threshold) < FP_EPSILON ) && \
- ( HDfabs((a).decrement - (b).decrement) < FP_EPSILON ) && \
- ( (a).apply_max_decrement == (b).apply_max_decrement ) && \
- ( (a).max_decrement == (b).max_decrement ) && \
- ( (a).epochs_before_eviction == (b).epochs_before_eviction ) && \
- ( (a).apply_empty_reserve == (b).apply_empty_reserve ) && \
- ( HDfabs((a).empty_reserve - (b).empty_reserve) < FP_EPSILON ) )
+static hbool_t
+resize_configs_are_equal(const H5C_auto_size_ctl_t *a,
+ const H5C_auto_size_ctl_t *b,
+ hbool_t compare_init)
+{
+ if(a->version != b->version)
+ return(FALSE);
+ else if(a->rpt_fcn != b->rpt_fcn)
+ return(FALSE);
+ else if(compare_init && (a->set_initial_size != b->set_initial_size))
+ return(FALSE);
+ else if(compare_init && (a->initial_size != b->initial_size))
+ return(FALSE);
+ else if(HDfabs(a->min_clean_fraction - b->min_clean_fraction) > FP_EPSILON)
+ return(FALSE);
+ else if(a->max_size != b->max_size)
+ return(FALSE);
+ else if(a->min_size != b->min_size)
+ return(FALSE);
+ else if(a->epoch_length != b->epoch_length)
+ return(FALSE);
+ else if(a->incr_mode != b->incr_mode)
+ return(FALSE);
+ else if(HDfabs(a->lower_hr_threshold - b->lower_hr_threshold) > FP_EPSILON)
+ return(FALSE);
+ else if(HDfabs(a->increment - b->increment) > FP_EPSILON)
+ return(FALSE);
+ else if(a->apply_max_increment != b->apply_max_increment)
+ return(FALSE);
+ else if(a->max_increment != b->max_increment)
+ return(FALSE);
+ else if(a->flash_incr_mode != b->flash_incr_mode)
+ return(FALSE);
+ else if(HDfabs(a->flash_multiple - b->flash_multiple) > FP_EPSILON)
+ return(FALSE);
+ else if(HDfabs(a->flash_threshold - b->flash_threshold) > FP_EPSILON)
+ return(FALSE);
+ else if(a->decr_mode != b->decr_mode)
+ return(FALSE);
+ else if(HDfabs(a->upper_hr_threshold - b->upper_hr_threshold) > FP_EPSILON)
+ return(FALSE);
+ else if(HDfabs(a->decrement - b->decrement) > FP_EPSILON)
+ return(FALSE);
+ else if(a->apply_max_decrement != b->apply_max_decrement)
+ return(FALSE);
+ else if(a->max_decrement != b->max_decrement)
+ return(FALSE);
+ else if(a->epochs_before_eviction != b->epochs_before_eviction)
+ return(FALSE);
+ else if(a->apply_empty_reserve != b->apply_empty_reserve)
+ return(FALSE);
+ else if(HDfabs(a->empty_reserve - b->empty_reserve) > FP_EPSILON)
+ return(FALSE);
+ return(TRUE);
+}
static unsigned
check_auto_cache_resize_input_errs(void)
@@ -25912,8 +25942,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 1.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 1.";
@@ -25985,8 +26015,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 2.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 2.";
@@ -26061,8 +26091,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 3.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 3.";
@@ -26138,8 +26168,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 4.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 4.";
@@ -26212,8 +26242,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 5.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 5.";
@@ -26288,8 +26318,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 6.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 6.";
@@ -26361,8 +26391,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 7.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 7.";
@@ -26438,8 +26468,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 8.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 8.";
@@ -26511,8 +26541,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 9.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 9.";
@@ -26584,8 +26614,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 10.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 10.";
@@ -26660,8 +26690,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 11.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 11.";
@@ -26733,8 +26763,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 12.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 12.";
@@ -26810,8 +26840,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 13.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 13.";
@@ -26884,8 +26914,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 14.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 14.";
@@ -26960,8 +26990,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 15.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 15.";
@@ -27033,8 +27063,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 16.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 16.";
@@ -27106,8 +27136,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 17.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 17.";
@@ -27183,8 +27213,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 18.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 18.";
@@ -27260,8 +27290,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 19.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 19.";
@@ -27336,8 +27366,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 20.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 20.";
@@ -27410,8 +27440,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 21.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 21.";
@@ -27486,8 +27516,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 22.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 22.";
@@ -27560,8 +27590,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 23.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 23.";
@@ -27636,8 +27666,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 24.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 24.";
@@ -27710,8 +27740,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 25.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 25.";
@@ -27786,8 +27816,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 26.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 26.";
@@ -27859,8 +27889,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 27.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 27.";
@@ -27934,8 +27964,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 28.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 28.";
@@ -28007,8 +28037,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 29.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 29.";
@@ -28082,8 +28112,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 30.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 30.";
@@ -28155,8 +28185,8 @@ check_auto_cache_resize_input_errs(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_auto_resize_config failed 31.";
- } else if ( ! RESIZE_CONFIGS_ARE_EQUAL(test_auto_size_ctl, \
- ref_auto_size_ctl, FALSE) ) {
+ } else if ( ! resize_configs_are_equal(&test_auto_size_ctl, \
+ &ref_auto_size_ctl, FALSE) ) {
pass = FALSE;
failure_mssg = "Unexpected auto resize config 31.";
@@ -28855,158 +28885,158 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
*/
struct expected_entry_status expected[150] =
{
- /* entry entry in at main */
- /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: */
- { entry_type, 0, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 1, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 2, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 3, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 4, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 5, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 6, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 7, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 8, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 9, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 10, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 11, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 12, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 13, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 14, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 15, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 16, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 17, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 18, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 19, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 20, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 21, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 22, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 23, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 24, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 25, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 26, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 27, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 28, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 29, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 30, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 31, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 32, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 33, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 34, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 35, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 36, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 37, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 38, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 39, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 40, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 41, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 42, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 43, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 44, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 45, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 46, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 47, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 48, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 49, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 50, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 51, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 52, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 53, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 54, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 55, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 56, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 57, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 58, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 59, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 60, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 61, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 62, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 63, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 64, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 65, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 66, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 67, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 68, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 69, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 70, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 71, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 72, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 73, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 74, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 75, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 76, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 77, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 78, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 79, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 80, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 81, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 82, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 83, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 84, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 85, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 86, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 87, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 88, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 89, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 90, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 91, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 92, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 93, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 94, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 95, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 96, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 97, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 98, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 99, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 100, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 101, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 102, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 103, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 104, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 105, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 106, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 107, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 108, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 109, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 110, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 111, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 112, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 113, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 114, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 115, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 116, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 117, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 118, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 119, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 120, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 121, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 122, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 123, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 124, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 125, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 126, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 127, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 128, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 129, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 130, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 131, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 132, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 133, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 134, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 135, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 136, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 137, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 138, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 139, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 140, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 141, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 142, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 143, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 144, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 145, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 146, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 147, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 148, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE },
- { entry_type, 149, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE }
+ /* entry entry in at main flush dep flush dep child flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: */
+ { entry_type, 0, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 1, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 2, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 3, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 4, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 5, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 6, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 7, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 8, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 9, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 10, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 11, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 12, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 13, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 14, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 15, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 16, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 17, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 18, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 19, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 20, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 21, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 22, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 23, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 24, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 25, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 26, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 27, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 28, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 29, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 30, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 31, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 32, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 33, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 34, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 35, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 36, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 37, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 38, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 39, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 40, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 41, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 42, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 43, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 44, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 45, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 46, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 47, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 48, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 49, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 50, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 51, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 52, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 53, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 54, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 55, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 56, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 57, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 58, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 59, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 60, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 61, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 62, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 63, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 64, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 65, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 66, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 67, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 68, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 69, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 70, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 71, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 72, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 73, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 74, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 75, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 76, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 77, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 78, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 79, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 80, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 81, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 82, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 83, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 84, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 85, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 86, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 87, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 88, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 89, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 90, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 91, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 92, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 93, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 94, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 95, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 96, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 97, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 98, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 99, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 100, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 101, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 102, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 103, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 104, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 105, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 106, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 107, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 108, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 109, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 110, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 111, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 112, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 113, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 114, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 115, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 116, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 117, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 118, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 119, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 120, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 121, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 122, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 123, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 124, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 125, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 126, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 127, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 128, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 129, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 130, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 131, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 132, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 133, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 134, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 135, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 136, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 137, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 138, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 139, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 140, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 141, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 142, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 143, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 144, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 145, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 146, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 147, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 148, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 149, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 }
};
pass = TRUE;
@@ -29089,7 +29119,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29149,7 +29179,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29205,7 +29235,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29259,7 +29289,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29333,7 +29363,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29398,7 +29428,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29531,7 +29561,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29573,7 +29603,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx++, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29629,7 +29659,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
entry_type, /* int32_t type */
entry_idx, /* int32_t idx */
- TRUE, /* int321_t dirty */
+ TRUE, /* int32_t dirty */
H5C__NO_FLAGS_SET); /* unsigned int flags */
}
@@ -29678,6 +29708,1924 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion)
/*-------------------------------------------------------------------------
+ * Function: check_flush_deps()
+ *
+ * Purpose: Exercise the flush dependency routines.
+ *
+ * Return: 0 on success, non-zero on failure
+ *
+ * Programmer: Quincey Koziol
+ * 3/12/09
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static unsigned
+check_flush_deps(void)
+{
+ H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
+ int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
+ size_t entry_size = PICO_ENTRY_SIZE; /* 1 byte */
+ unsigned u; /* Local index variable */
+ struct expected_entry_status expected[5] =
+ {
+ /* entry entry in at main flush dep flush dep child flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: loaded: clrd: flshd: dest: par type: par idx: dep ref.count: dep height: */
+ { entry_type, 0, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 1, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 2, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 3, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 },
+ { entry_type, 4, entry_size, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, -1, -1, {0,0,0,0}, 0 }
+ };
+
+ TESTING("flush dependencies");
+
+ pass = TRUE;
+
+ /* allocate a cache, build up flush dependency hierarchy and tear it down.
+ * Verify that all performs as expected.
+ */
+
+ reset_entries();
+ cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+
+ if ( !pass ) CACHE_ERROR("setup_cache failed")
+
+ /* Insert entries to work with into the cache */
+ for(u = 0; u < 5; u++) {
+ insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ if ( !pass ) CACHE_ERROR("insert_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after each insertion
+ */
+ expected[u].in_cache = TRUE;
+ expected[u].is_dirty = TRUE;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)u, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ } /* end for */
+
+/* Test Case #1 - Single flush dependency relationship */
+
+ /* Create flush dependency between entries 0 (child) & 1 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries 0 (child) & 1 (parent) */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroy flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #2 - Multiple children for one parent flush dependency relationship */
+
+ /* Create flush dependency between entries 0, 1 (children) & 2 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 2;
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[0] = 2;
+ expected[2].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries 0, 1 (children) & 2 (parent) */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroy flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[0] = 0;
+ expected[2].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #3a1 - Single chain of flush dependencies, 4 entries tall
+ * created from the "bottom up" and destroyed from the "top down"
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2->3 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[2].flush_dep_par_type = entry_type;
+ expected[2].flush_dep_par_idx = 3;
+ expected[3].is_protected = TRUE;
+ expected[3].is_pinned = TRUE;
+ expected[3].child_flush_dep_height_rc[2] = 1;
+ expected[3].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries, from the "top down" */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[2].flush_dep_par_type = -1;
+ expected[2].flush_dep_par_idx = -1;
+ expected[3].is_protected = FALSE;
+ expected[3].is_pinned = FALSE;
+ expected[3].child_flush_dep_height_rc[2] = 0;
+ expected[3].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #3a2 - Single chain of flush dependencies, 4 entries tall
+ * created from the "bottom up" and destroyed from the "bottom up"
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2->3 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[2].flush_dep_par_type = entry_type;
+ expected[2].flush_dep_par_idx = 3;
+ expected[3].is_protected = TRUE;
+ expected[3].is_pinned = TRUE;
+ expected[3].child_flush_dep_height_rc[2] = 1;
+ expected[3].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries, from the "bottom up" */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+ expected[2].child_flush_dep_height_rc[0] = 1;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 1;
+ expected[3].child_flush_dep_height_rc[1] = 1;
+ expected[3].child_flush_dep_height_rc[2] = 0;
+ expected[3].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[0] = 0;
+ expected[2].flush_dep_height = 0;
+ expected[3].child_flush_dep_height_rc[0] = 1;
+ expected[3].child_flush_dep_height_rc[1] = 0;
+ expected[3].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[2].flush_dep_par_type = -1;
+ expected[2].flush_dep_par_idx = -1;
+ expected[3].is_protected = FALSE;
+ expected[3].is_pinned = FALSE;
+ expected[3].child_flush_dep_height_rc[0] = 0;
+ expected[3].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #3b1 - Single chain of flush dependencies, 4 entries tall
+ * created from the "top down" and destroyed from the "top down"
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2->3 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[2].flush_dep_par_type = entry_type;
+ expected[2].flush_dep_par_idx = 3;
+ expected[3].is_protected = TRUE;
+ expected[3].is_pinned = TRUE;
+ expected[3].child_flush_dep_height_rc[0] = 1;
+ expected[3].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[0] = 1;
+ expected[2].flush_dep_height = 1;
+ expected[3].child_flush_dep_height_rc[0] = 0;
+ expected[3].child_flush_dep_height_rc[1] = 1;
+ expected[3].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+ expected[2].child_flush_dep_height_rc[0] = 0;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+ expected[3].child_flush_dep_height_rc[1] = 0;
+ expected[3].child_flush_dep_height_rc[2] = 1;
+ expected[3].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries, from the "top down" */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[2].flush_dep_par_type = -1;
+ expected[2].flush_dep_par_idx = -1;
+ expected[3].is_protected = FALSE;
+ expected[3].is_pinned = FALSE;
+ expected[3].child_flush_dep_height_rc[2] = 0;
+ expected[3].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #3b2 - Single chain of flush dependencies, 4 entries tall
+ * created from the "top down" and destroyed from the "bottom up"
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2->3 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[2].flush_dep_par_type = entry_type;
+ expected[2].flush_dep_par_idx = 3;
+ expected[3].is_protected = TRUE;
+ expected[3].is_pinned = TRUE;
+ expected[3].child_flush_dep_height_rc[0] = 1;
+ expected[3].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[0] = 1;
+ expected[2].flush_dep_height = 1;
+ expected[3].child_flush_dep_height_rc[0] = 0;
+ expected[3].child_flush_dep_height_rc[1] = 1;
+ expected[3].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+ expected[2].child_flush_dep_height_rc[0] = 0;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+ expected[3].child_flush_dep_height_rc[1] = 0;
+ expected[3].child_flush_dep_height_rc[2] = 1;
+ expected[3].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+ /* Destroy flush dependency between entries, from the "bottom up" */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+ expected[2].child_flush_dep_height_rc[0] = 1;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 1;
+ expected[3].child_flush_dep_height_rc[1] = 1;
+ expected[3].child_flush_dep_height_rc[2] = 0;
+ expected[3].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[0] = 0;
+ expected[2].flush_dep_height = 0;
+ expected[3].child_flush_dep_height_rc[0] = 1;
+ expected[3].child_flush_dep_height_rc[1] = 0;
+ expected[3].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[2].flush_dep_par_type = -1;
+ expected[2].flush_dep_par_idx = -1;
+ expected[3].is_protected = FALSE;
+ expected[3].is_pinned = FALSE;
+ expected[3].child_flush_dep_height_rc[0] = 0;
+ expected[3].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #4 - Multiple children for a single parent */
+
+ /* Create flush dependency between entries (child) 0,1,2,3->4 (parent) */
+ {
+ protect_entry(cache_ptr, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ for(u = 0; u < 4; u++) {
+ create_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[u].flush_dep_par_type = entry_type;
+ expected[u].flush_dep_par_idx = 4;
+ expected[4].is_protected = TRUE;
+ expected[4].is_pinned = TRUE;
+ expected[4].child_flush_dep_height_rc[0] = u + 1;
+ expected[4].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ } /* end for */
+ }
+
+ /* Destroy flush dependency between entries */
+ {
+ for(u = 0; u < 4; u++) {
+ destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, (int32_t)u);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[u].flush_dep_par_type = -1;
+ expected[u].flush_dep_par_idx = -1;
+ expected[4].child_flush_dep_height_rc[0] = 3 - u;
+
+ /* Check for destroying flush dependency on last entry */
+ if(3 == u) {
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 4, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[4].is_protected = FALSE;
+ expected[4].is_pinned = FALSE;
+ expected[4].flush_dep_height = 0;
+ } /* end if */
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ } /* end for */
+ }
+
+/* Test Case #5a - Join two flush dependency chains together, creating a single
+ * un-forked dependency chain
+ */
+
+ /* Create flush dependency between entries (child) 0->1 and 3->4 (parent)
+ * then add entry 4 as a child of 0
+ */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[3].flush_dep_par_type = entry_type;
+ expected[3].flush_dep_par_idx = 4;
+ expected[4].is_protected = TRUE;
+ expected[4].is_pinned = TRUE;
+ expected[4].child_flush_dep_height_rc[0] = 1;
+ expected[4].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[4].flush_dep_par_type = entry_type;
+ expected[4].flush_dep_par_idx = 0;
+ expected[0].is_protected = TRUE;
+ expected[0].is_pinned = TRUE;
+ expected[0].child_flush_dep_height_rc[1] = 1;
+ expected[0].flush_dep_height = 2;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].child_flush_dep_height_rc[2] = 1;
+ expected[1].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ }
+
+ /* Destroy flush dependency between entries, detaching 3->4 from 0 first */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[4].flush_dep_par_type = -1;
+ expected[4].flush_dep_par_idx = -1;
+ expected[0].is_protected = FALSE;
+ expected[0].is_pinned = FALSE;
+ expected[0].child_flush_dep_height_rc[1] = 0;
+ expected[0].flush_dep_height = 0;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].child_flush_dep_height_rc[2] = 0;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 4, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[3].flush_dep_par_type = -1;
+ expected[3].flush_dep_par_idx = -1;
+ expected[4].is_protected = FALSE;
+ expected[4].is_pinned = FALSE;
+ expected[4].child_flush_dep_height_rc[0] = 0;
+ expected[4].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #5b - Join two flush dependency chains together, creating a
+ * forked dependency chain
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2 and 3->4 (parent)
+ * then add entry 4 as a child of 1
+ */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[3].flush_dep_par_type = entry_type;
+ expected[3].flush_dep_par_idx = 4;
+ expected[4].is_protected = TRUE;
+ expected[4].is_pinned = TRUE;
+ expected[4].child_flush_dep_height_rc[0] = 1;
+ expected[4].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[4].flush_dep_par_type = entry_type;
+ expected[4].flush_dep_par_idx = 1;
+ expected[1].child_flush_dep_height_rc[1] = 1;
+ expected[1].flush_dep_height = 2;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].child_flush_dep_height_rc[2] = 1;
+ expected[2].flush_dep_height = 3;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ }
+
+ /* Destroy flush dependency between entries, detaching 3->4 from 1 first */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[4].flush_dep_par_type = -1;
+ expected[4].flush_dep_par_idx = -1;
+ expected[1].child_flush_dep_height_rc[1] = 0;
+ expected[1].flush_dep_height = 1;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].child_flush_dep_height_rc[2] = 0;
+ expected[2].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 4, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[3].flush_dep_par_type = -1;
+ expected[3].flush_dep_par_idx = -1;
+ expected[4].is_protected = FALSE;
+ expected[4].is_pinned = FALSE;
+ expected[4].child_flush_dep_height_rc[0] = 0;
+ expected[4].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+/* Test Case #5c - Join two flush dependency chains together, creating a
+ * forked dependency chain
+ */
+
+ /* Create flush dependency between entries (child) 0->1->2 and 3->4 (parent)
+ * then add entry 4 as a child of 2
+ */
+ {
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[0].flush_dep_par_type = entry_type;
+ expected[0].flush_dep_par_idx = 1;
+ expected[1].is_protected = TRUE;
+ expected[1].is_pinned = TRUE;
+ expected[1].child_flush_dep_height_rc[0] = 1;
+ expected[1].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[1].flush_dep_par_type = entry_type;
+ expected[1].flush_dep_par_idx = 2;
+ expected[2].is_protected = TRUE;
+ expected[2].is_pinned = TRUE;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+ expected[2].flush_dep_height = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ protect_entry(cache_ptr, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[3].flush_dep_par_type = entry_type;
+ expected[3].flush_dep_par_idx = 4;
+ expected[4].is_protected = TRUE;
+ expected[4].is_pinned = TRUE;
+ expected[4].child_flush_dep_height_rc[0] = 1;
+ expected[4].flush_dep_height = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after creating flush dependency
+ */
+ expected[4].flush_dep_par_type = entry_type;
+ expected[4].flush_dep_par_idx = 2;
+ expected[2].child_flush_dep_height_rc[1] = 2;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ }
+
+ /* Destroy flush dependency between entries, detaching 3->4 from 2 first */
+ {
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[4].flush_dep_par_type = -1;
+ expected[4].flush_dep_par_idx = -1;
+ expected[2].child_flush_dep_height_rc[1] = 1;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 4, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 4, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[3].flush_dep_par_type = -1;
+ expected[3].flush_dep_par_idx = -1;
+ expected[4].is_protected = FALSE;
+ expected[4].is_pinned = FALSE;
+ expected[4].child_flush_dep_height_rc[0] = 0;
+ expected[4].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[1].flush_dep_par_type = -1;
+ expected[1].flush_dep_par_idx = -1;
+ expected[2].is_protected = FALSE;
+ expected[2].is_pinned = FALSE;
+ expected[2].child_flush_dep_height_rc[1] = 0;
+ expected[2].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ /* Change expected values, and verify the status of the entries
+ * after destroying flush dependency
+ */
+ expected[0].flush_dep_par_type = -1;
+ expected[0].flush_dep_par_idx = -1;
+ expected[1].is_protected = FALSE;
+ expected[1].is_pinned = FALSE;
+ expected[1].child_flush_dep_height_rc[0] = 0;
+ expected[1].flush_dep_height = 0;
+
+ /* Verify the status */
+ verify_entry_status(cache_ptr, /* H5C_t * cache_ptr */
+ (int)0, /* int tag */
+ (int)5, /* int num_entries */
+ expected); /* struct expected_entry_staus[] */
+ if ( !pass ) CACHE_ERROR("verify_entry_status failed")
+ }
+
+
+done:
+ if(cache_ptr)
+ takedown_cache(cache_ptr, FALSE, FALSE);
+
+ if ( pass )
+ PASSED()
+ else {
+ H5_FAILED();
+ HDfprintf(stdout, "%s.\n", failure_mssg);
+ } /* end else */
+
+ return (unsigned)!pass;
+} /* check_flush_deps() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: check_flush_deps_err()
+ *
+ * Purpose: Check the flush dependency routines for error conditions.
+ *
+ * Return: 0 on success, non-zero on failure
+ *
+ * Programmer: Quincey Koziol
+ * 3/16/09
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static unsigned
+check_flush_deps_err(void)
+{
+ H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
+ int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
+ unsigned test_count; /* Test iteration variable */
+
+ TESTING("flush dependency errors");
+
+ pass = TRUE;
+
+ /* Loop over test cases, check for various errors in configuring flush
+ * dependencies. Verify that all performs as expected.
+ */
+ for(test_count = 0; test_count < 11; test_count++) {
+ unsigned u; /* Local index variable */
+ herr_t result; /* Generic return value */
+
+ /* Allocate a cache */
+ reset_entries();
+ cache_ptr = setup_cache((size_t)(2 * 1024), (size_t)(1 * 1024));
+ if ( !pass ) CACHE_ERROR("setup_cache failed")
+
+ /* Insert entries to work with into the cache */
+ for(u = 0; u < 10; u++) {
+ insert_entry(cache_ptr, entry_type, (int32_t)u, TRUE, H5C__NO_FLAGS_SET);
+ if ( !pass ) CACHE_ERROR("insert_entry failed")
+ } /* end for */
+
+ /* Various test cases */
+ switch(test_count) {
+ /* Verify that parent entry in flush dependency must be protected */
+ case 0:
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ if( result != FAIL ) CACHE_ERROR("Creating flush dependency with unprotected entry succeeded")
+ break;
+
+ /* Verify that entry can't have flush dependency on itself */
+ case 1:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[0]));
+ if( result != FAIL ) CACHE_ERROR("Creating flush dependency with parent == child")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that a child entry can only have one flush dependency parent */
+ case 2:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[1]), &((entries[entry_type])[2]));
+ if( result != FAIL ) CACHE_ERROR("Creating second flush dependency for child")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that a flush dependency chain can't be higher than (H5C__NUM_FLUSH_DEP_HEIGHTS - 1) */
+ case 3:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[4]), &((entries[entry_type])[5]));
+ if( result != FAIL ) CACHE_ERROR("Creating second flush dependency for child")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 4, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ protect_entry(cache_ptr, entry_type, 5);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[5]), &((entries[entry_type])[0]));
+ if( result != FAIL ) CACHE_ERROR("Creating second flush dependency for child")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 5, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that parent entry isn't already pinned */
+ case 4:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ pin_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("pin_entry failed")
+
+ result = H5C_create_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ if( result != FAIL ) CACHE_ERROR("Creating dependency when parent is pinned")
+
+ unpin_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("unpin_entry failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that parent entry must be protected */
+ case 5:
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ if( result != FAIL ) CACHE_ERROR("Destroying [non-existant] dependency when parent isn't protected")
+ break;
+
+ /* Verify that parent entry has flush dependency */
+ case 6:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent isn't in relationship")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that parent entry is still pinned */
+ case 7:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ unpin_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("unpin_entry failed")
+
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[1]));
+ if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent isn't in relationship")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that child entry is in flush dependency relationship */
+ case 8:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[2]));
+ if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ /* Verify that parent has child entries at this height */
+ case 9:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[4]));
+ if( result != FAIL ) CACHE_ERROR("Destroying dependency when parent has no children at child's height")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 1, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 1, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 3, entry_type, 4);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 3, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+
+ /* Verify that child entry is child of parent */
+ case 10:
+ protect_entry(cache_ptr, entry_type, 0);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ protect_entry(cache_ptr, entry_type, 2);
+ if ( !pass ) CACHE_ERROR("protect_entry failed")
+
+ create_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("create_flush_dependency failed")
+
+ result = H5C_destroy_flush_dependency(cache_ptr, &((entries[entry_type])[0]), &((entries[entry_type])[3]));
+ if( result != FAIL ) CACHE_ERROR("Destroying dependency when child isn't in relationship")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 0, entry_type, 1);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 0, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+
+ destroy_flush_dependency(cache_ptr, entry_type, 2, entry_type, 3);
+ if ( !pass ) CACHE_ERROR("destroy_flush_dependency failed")
+
+ unprotect_entry(cache_ptr, /* H5C_t * cache_ptr */
+ entry_type, /* int32_t type */
+ 2, /* int32_t idx */
+ FALSE, /* int32_t dirty */
+ H5C__NO_FLAGS_SET); /* unsigned int flags */
+ if ( !pass ) CACHE_ERROR("unprotect_entry failed")
+ break;
+
+ default:
+ CACHE_ERROR("Unknown test case!")
+ } /* end switch */
+
+ takedown_cache(cache_ptr, FALSE, FALSE);
+ if ( !pass ) CACHE_ERROR("takedown_cache failed")
+ cache_ptr = NULL;
+ } /* end for */
+
+
+done:
+ if(cache_ptr)
+ takedown_cache(cache_ptr, FALSE, FALSE);
+
+ if ( pass )
+ PASSED()
+ else {
+ H5_FAILED();
+ HDfprintf(stdout, "%s.\n", failure_mssg);
+ } /* end else */
+
+ return (unsigned)!pass;
+} /* check_flush_deps_err() */
+
+
+/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Run tests on the cache code contained in H5C.c
@@ -29753,6 +31701,8 @@ main(void)
nerrs += check_auto_cache_resize_aux_fcns();
nerrs += check_metadata_blizzard_absence(TRUE);
nerrs += check_metadata_blizzard_absence(FALSE);
+ nerrs += check_flush_deps();
+ nerrs += check_flush_deps_err();
return(nerrs > 0);
}
diff --git a/test/cache_common.c b/test/cache_common.c
index 4595d7c..0c16b36 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -33,16 +33,18 @@ hbool_t skip_long_tests = TRUE;
hbool_t run_full_test = TRUE;
const char *failure_mssg = NULL;
-test_entry_t pico_entries[NUM_PICO_ENTRIES];
-test_entry_t nano_entries[NUM_NANO_ENTRIES];
-test_entry_t micro_entries[NUM_MICRO_ENTRIES];
-test_entry_t tiny_entries[NUM_TINY_ENTRIES];
-test_entry_t small_entries[NUM_SMALL_ENTRIES];
-test_entry_t medium_entries[NUM_MEDIUM_ENTRIES];
-test_entry_t large_entries[NUM_LARGE_ENTRIES];
-test_entry_t huge_entries[NUM_HUGE_ENTRIES];
-test_entry_t monster_entries[NUM_MONSTER_ENTRIES];
-test_entry_t variable_entries[NUM_VARIABLE_ENTRIES];
+test_entry_t pico_entries[NUM_PICO_ENTRIES], orig_pico_entries[NUM_PICO_ENTRIES];
+test_entry_t nano_entries[NUM_NANO_ENTRIES], orig_nano_entries[NUM_NANO_ENTRIES];
+test_entry_t micro_entries[NUM_MICRO_ENTRIES], orig_micro_entries[NUM_MICRO_ENTRIES];
+test_entry_t tiny_entries[NUM_TINY_ENTRIES], orig_tiny_entries[NUM_TINY_ENTRIES];
+test_entry_t small_entries[NUM_SMALL_ENTRIES], orig_small_entries[NUM_SMALL_ENTRIES];
+test_entry_t medium_entries[NUM_MEDIUM_ENTRIES], orig_medium_entries[NUM_MEDIUM_ENTRIES];
+test_entry_t large_entries[NUM_LARGE_ENTRIES], orig_large_entries[NUM_LARGE_ENTRIES];
+test_entry_t huge_entries[NUM_HUGE_ENTRIES], orig_huge_entries[NUM_HUGE_ENTRIES];
+test_entry_t monster_entries[NUM_MONSTER_ENTRIES], orig_monster_entries[NUM_MONSTER_ENTRIES];
+test_entry_t variable_entries[NUM_VARIABLE_ENTRIES], orig_variable_entries[NUM_VARIABLE_ENTRIES];
+
+hbool_t orig_entry_arrays_init = FALSE;
test_entry_t * entries[NUMBER_OF_ENTRY_TYPES] =
{
@@ -58,6 +60,20 @@ test_entry_t * entries[NUMBER_OF_ENTRY_TYPES] =
variable_entries
};
+test_entry_t * orig_entries[NUMBER_OF_ENTRY_TYPES] =
+{
+ orig_pico_entries,
+ orig_nano_entries,
+ orig_micro_entries,
+ orig_tiny_entries,
+ orig_small_entries,
+ orig_medium_entries,
+ orig_large_entries,
+ orig_huge_entries,
+ orig_monster_entries,
+ orig_variable_entries
+};
+
const int32_t max_indices[NUMBER_OF_ENTRY_TYPES] =
{
NUM_PICO_ENTRIES - 1,
@@ -1524,7 +1540,7 @@ entry_in_cache(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
* Function: reset_entries
*
- * Purpose: reset the contents of the entries arrays to know values.
+ * Purpose: reset the contents of the entries arrays to known values.
*
* Return: void
*
@@ -1549,87 +1565,119 @@ reset_entries(void)
{
int i;
- int j;
- int k;
- int32_t max_index;
- haddr_t addr = 0;
- haddr_t alt_addr = PICO_ALT_BASE_ADDR;
- size_t entry_size;
- test_entry_t * base_addr;
- for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
+ if( !orig_entry_arrays_init)
{
- entry_size = entry_sizes[i];
- max_index = max_indices[i];
- base_addr = entries[i];
-
- HDassert( base_addr );
+ haddr_t addr = 0;
+ haddr_t alt_addr = PICO_ALT_BASE_ADDR;
- for ( j = 0; j <= max_index; j++ )
+ for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
{
- /* one can argue that we should fill the header with garbage.
- * If this is desired, we can simply comment out the header
- * initialization - the headers will be full of garbage soon
- * enough.
- */
+ int32_t max_index;
+ size_t entry_size;
+ test_entry_t * base_addr;
+ test_entry_t * orig_base_addr;
+ int j;
- base_addr[j].header.addr = (haddr_t)0;
- base_addr[j].header.size = (size_t)0;
- base_addr[j].header.type = NULL;
- base_addr[j].header.is_dirty = FALSE;
- base_addr[j].header.is_protected = FALSE;
- base_addr[j].header.is_read_only = FALSE;
- base_addr[j].header.ro_ref_count = FALSE;
- base_addr[j].header.next = NULL;
- base_addr[j].header.prev = NULL;
- base_addr[j].header.aux_next = NULL;
- base_addr[j].header.aux_prev = NULL;
-
- base_addr[j].self = &(base_addr[j]);
- base_addr[j].cache_ptr = NULL;
- base_addr[j].addr = addr;
- base_addr[j].at_main_addr = TRUE;
- base_addr[j].main_addr = addr;
- base_addr[j].alt_addr = alt_addr;
- base_addr[j].size = entry_size;
- base_addr[j].type = i;
- base_addr[j].index = j;
- base_addr[j].reads = 0;
- base_addr[j].writes = 0;
- base_addr[j].is_dirty = FALSE;
- base_addr[j].is_protected = FALSE;
- base_addr[j].is_read_only = FALSE;
- base_addr[j].ro_ref_count = FALSE;
-
- base_addr[j].is_pinned = FALSE;
- base_addr[j].pinning_ref_count = 0;
- base_addr[j].num_pins = 0;
- for ( k = 0; k < MAX_PINS; k++ )
- {
- base_addr[j].pin_type[k] = -1;
- base_addr[j].pin_idx[k] = -1;
- }
+ entry_size = entry_sizes[i];
+ max_index = max_indices[i];
+ base_addr = entries[i];
+ orig_base_addr = orig_entries[i];
- base_addr[j].num_flush_ops = 0;
- for ( k = 0; k < MAX_FLUSH_OPS; k++ )
- {
- base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
- base_addr[j].flush_ops[k].type = -1;
- base_addr[j].flush_ops[k].idx = -1;
- base_addr[j].flush_ops[k].flag = FALSE;
- base_addr[j].flush_ops[k].size = 0;
- }
- base_addr[j].flush_op_self_resize_in_progress = FALSE;
+ HDassert( base_addr );
+ HDassert( orig_base_addr );
+
+ for ( j = 0; j <= max_index; j++ )
+ {
+ int k;
+
+ /* one can argue that we should fill the header with garbage.
+ * If this is desired, we can simply comment out the header
+ * initialization - the headers will be full of garbage soon
+ * enough.
+ */
+
+ base_addr[j].header.addr = (haddr_t)0;
+ base_addr[j].header.size = (size_t)0;
+ base_addr[j].header.type = NULL;
+ base_addr[j].header.is_dirty = FALSE;
+ base_addr[j].header.is_protected = FALSE;
+ base_addr[j].header.is_read_only = FALSE;
+ base_addr[j].header.ro_ref_count = FALSE;
+ base_addr[j].header.next = NULL;
+ base_addr[j].header.prev = NULL;
+ base_addr[j].header.aux_next = NULL;
+ base_addr[j].header.aux_prev = NULL;
+
+ base_addr[j].self = &(base_addr[j]);
+ base_addr[j].cache_ptr = NULL;
+ base_addr[j].addr = addr;
+ base_addr[j].at_main_addr = TRUE;
+ base_addr[j].main_addr = addr;
+ base_addr[j].alt_addr = alt_addr;
+ base_addr[j].size = entry_size;
+ base_addr[j].type = i;
+ base_addr[j].index = j;
+ base_addr[j].reads = 0;
+ base_addr[j].writes = 0;
+ base_addr[j].is_dirty = FALSE;
+ base_addr[j].is_protected = FALSE;
+ base_addr[j].is_read_only = FALSE;
+ base_addr[j].ro_ref_count = FALSE;
+
+ base_addr[j].is_pinned = FALSE;
+ base_addr[j].pinning_ref_count = 0;
+ base_addr[j].num_pins = 0;
+ for ( k = 0; k < MAX_PINS; k++ )
+ {
+ base_addr[j].pin_type[k] = -1;
+ base_addr[j].pin_idx[k] = -1;
+ }
- base_addr[j].loaded = FALSE;
- base_addr[j].cleared = FALSE;
- base_addr[j].flushed = FALSE;
- base_addr[j].destroyed = FALSE;
+ base_addr[j].num_flush_ops = 0;
+ for ( k = 0; k < MAX_FLUSH_OPS; k++ )
+ {
+ base_addr[j].flush_ops[k].op_code = FLUSH_OP__NO_OP;
+ base_addr[j].flush_ops[k].type = -1;
+ base_addr[j].flush_ops[k].idx = -1;
+ base_addr[j].flush_ops[k].flag = FALSE;
+ base_addr[j].flush_ops[k].size = 0;
+ }
+ base_addr[j].flush_op_self_resize_in_progress = FALSE;
+
+ base_addr[j].loaded = FALSE;
+ base_addr[j].cleared = FALSE;
+ base_addr[j].flushed = FALSE;
+ base_addr[j].destroyed = FALSE;
+
+ base_addr[j].flush_dep_par_type = -1;
+ base_addr[j].flush_dep_par_idx = -1;
+ for ( k = 0; k < H5C__NUM_FLUSH_DEP_HEIGHTS; k++ )
+ base_addr[j].child_flush_dep_height_rc[k] = 0;
+ base_addr[j].flush_dep_height = 0;
+
+ addr += (haddr_t)entry_size;
+ alt_addr += (haddr_t)entry_size;
+ } /* end for */
+
+ /* Make copy of entries in base_addr for later */
+ HDmemcpy(orig_base_addr, base_addr, (size_t)(max_index + 1) * sizeof( *base_addr ));
+ } /* end for */
+
+ /* Indicate that we've made a copy for later */
+ orig_entry_arrays_init = TRUE;
+ } /* end if */
+ else {
+ for ( i = 0; i < NUMBER_OF_ENTRY_TYPES; i++ )
+ {
+ int32_t max_index = max_indices[i];
+ test_entry_t * base_addr = entries[i];
+ test_entry_t * orig_base_addr = orig_entries[i];
- addr += (haddr_t)entry_size;
- alt_addr += (haddr_t)entry_size;
- }
- }
+ /* Make copy of entries in base_addr for later */
+ HDmemcpy(base_addr, orig_base_addr, (size_t)(max_index + 1) * sizeof( *base_addr ));
+ } /* end for */
+ } /* end else */
return;
@@ -1891,16 +1939,15 @@ verify_entry_status(H5C_t * cache_ptr,
struct expected_entry_status expected[])
{
static char msg[128];
- hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
int i;
- test_entry_t * entry_ptr;
- test_entry_t * base_addr;
i = 0;
while ( ( pass ) && ( i < num_entries ) )
{
- base_addr = entries[expected[i].entry_type];
- entry_ptr = &(base_addr[expected[i].entry_index]);
+ test_entry_t * base_addr = entries[expected[i].entry_type];
+ test_entry_t * entry_ptr = &(base_addr[expected[i].entry_index]);
+ hbool_t in_cache = FALSE; /* will set to TRUE if necessary */
+ unsigned u; /* Local index variable */
if ( ( ! expected[i].in_cache ) &&
( ( expected[i].is_dirty ) ||
@@ -1937,7 +1984,7 @@ verify_entry_status(H5C_t * cache_ptr,
pass = FALSE;
sprintf(msg,
- "%d entry (%d, %d) size actualexpected = %ld/%ld.\n",
+ "%d entry (%d, %d) size actual/expected = %ld/%ld.\n",
tag,
(int)expected[i].entry_type,
(int)expected[i].entry_index,
@@ -2099,6 +2146,112 @@ verify_entry_status(H5C_t * cache_ptr,
failure_mssg = msg;
}
}
+
+ /* Check flush dependency fields */
+
+ /* Flush dependency parent type & index */
+ if ( pass ) {
+ if ( entry_ptr->flush_dep_par_type != expected[i].flush_dep_par_type ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) flush_dep_par_type actual/expected = %d/%d.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ entry_ptr->flush_dep_par_type,
+ expected[i].flush_dep_par_type);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+ if ( pass ) {
+ if ( entry_ptr->flush_dep_par_idx != expected[i].flush_dep_par_idx ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) flush_dep_par_idx actual/expected = %d/%d.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ entry_ptr->flush_dep_par_idx,
+ expected[i].flush_dep_par_idx);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+ if ( ( pass ) && ( in_cache ) && expected[i].flush_dep_par_idx >= 0 ) {
+ test_entry_t * par_base_addr = entries[expected[i].flush_dep_par_type];
+
+ if ( entry_ptr->header.flush_dep_parent != (H5C_cache_entry_t *)&(par_base_addr[expected[i].flush_dep_par_idx]) ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) header flush_dep_parent actual/expected = %p/%p.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ (void *)entry_ptr->header.flush_dep_parent,
+ (void *)&(par_base_addr[expected[i].flush_dep_par_idx]));
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+
+ /* Flush dependency child ref. counts */
+ for(u = 0; u < H5C__NUM_FLUSH_DEP_HEIGHTS; u++) {
+ if ( pass ) {
+ if ( entry_ptr->child_flush_dep_height_rc[u] != expected[i].child_flush_dep_height_rc[u] ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) child_flush_dep_height_rc[%u] actual/expected = %llu/%llu.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ u,
+ (unsigned long long)(entry_ptr->child_flush_dep_height_rc[u]),
+ (unsigned long long)expected[i].child_flush_dep_height_rc[u]);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+ if ( ( pass ) && ( in_cache ) ) {
+ if ( entry_ptr->header.child_flush_dep_height_rc[u] != expected[i].child_flush_dep_height_rc[u] ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) header child_flush_dep_height_rc[%u] actual/expected = %llu/%llu.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ u,
+ (unsigned long long)entry_ptr->header.child_flush_dep_height_rc[u],
+ (unsigned long long)expected[i].child_flush_dep_height_rc[u]);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+ } /* end for */
+
+ /* Flush dependency height */
+ if ( pass ) {
+ if ( entry_ptr->flush_dep_height != expected[i].flush_dep_height ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) flush_dep_height actual/expected = %u/%u.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ entry_ptr->flush_dep_height,
+ expected[i].flush_dep_height);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+ if ( ( pass ) && ( in_cache ) ) {
+ if ( entry_ptr->header.flush_dep_height != expected[i].flush_dep_height ) {
+ pass = FALSE;
+ sprintf(msg,
+ "%d entry (%d, %d) header flush_dep_height actual/expected = %u/%u.\n",
+ tag,
+ expected[i].entry_type,
+ expected[i].entry_index,
+ entry_ptr->header.flush_dep_height,
+ expected[i].flush_dep_height);
+ failure_mssg = msg;
+ } /* end if */
+ } /* end if */
+
i++;
} /* while */
@@ -2461,7 +2614,7 @@ insert_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0 );
+ insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0 );
entry_ptr->is_dirty = TRUE;
@@ -2852,7 +3005,7 @@ protect_entry(H5C_t * cache_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
entry_ptr->addr, NULL, NULL,
H5C__NO_FLAGS_SET);
@@ -2951,7 +3104,7 @@ protect_entry_ro(H5C_t * cache_ptr,
( ( entry_ptr->is_read_only ) &&
( entry_ptr->ro_ref_count > 0 ) ) );
- cache_entry_ptr = H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(NULL, -1, -1, cache_ptr, &(types[type]),
entry_ptr->addr, NULL, NULL,
H5C__READ_ONLY_FLAG);
@@ -2986,6 +3139,67 @@ protect_entry_ro(H5C_t * cache_ptr,
/*-------------------------------------------------------------------------
+ * Function: pin_entry()
+ *
+ * Purpose: Pin the entry indicated by the type and index.
+ *
+ * Do nothing if pass is FALSE on entry.
+ *
+ * Return: void
+ *
+ * Programmer: Quincey Koziol
+ * 3/17/09
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void
+pin_entry(H5C_t * cache_ptr,
+ int32_t type,
+ int32_t idx)
+{
+ HDassert( cache_ptr );
+ HDassert( ( 0 <= type ) && ( type < NUMBER_OF_ENTRY_TYPES ) );
+ HDassert( ( 0 <= idx ) && ( idx <= max_indices[type] ) );
+
+ if ( pass ) {
+ test_entry_t * base_addr;
+ test_entry_t * entry_ptr;
+ herr_t result;
+
+ base_addr = entries[type];
+ entry_ptr = &(base_addr[idx]);
+
+ HDassert( entry_ptr->index == idx );
+ HDassert( entry_ptr->type == type );
+ HDassert( entry_ptr == entry_ptr->self );
+ HDassert( entry_ptr->is_protected );
+ HDassert( !(entry_ptr->is_pinned) );
+
+ result = H5C_pin_protected_entry(cache_ptr, (void *)entry_ptr);
+
+ if ( result < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "H5C_pin_protected_entry() reports failure.";
+
+ } else if ( ! ( entry_ptr->header.is_pinned ) ) {
+
+ pass = FALSE;
+ failure_mssg = "entry not pinned when it should be.";
+
+ } else {
+
+ entry_ptr->is_pinned = TRUE;
+ }
+ } /* end if */
+
+ return;
+
+} /* pin_entry() */
+
+
+/*-------------------------------------------------------------------------
* Function: unpin_entry()
*
* Purpose: Unpin the entry indicated by the type and index.
@@ -3027,7 +3241,6 @@ unpin_entry(H5C_t * cache_ptr,
HDassert( entry_ptr->type == type );
HDassert( entry_ptr == entry_ptr->self );
HDassert( entry_ptr->cache_ptr == cache_ptr );
- HDassert( ! (entry_ptr->header.is_protected) );
HDassert( entry_ptr->header.is_pinned );
HDassert( entry_ptr->is_pinned );
@@ -3120,8 +3333,8 @@ unprotect_entry(H5C_t * cache_ptr,
HDassert( entry_ptr->header.is_protected );
HDassert( entry_ptr->is_protected );
- pin_flag_set = ((flags & H5C__PIN_ENTRY_FLAG) != 0 );
- unpin_flag_set = ((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
+ pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0 );
+ unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
HDassert ( ! ( pin_flag_set && unpin_flag_set ) );
HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) );
@@ -3130,7 +3343,7 @@ unprotect_entry(H5C_t * cache_ptr,
if ( ( dirty == TRUE ) || ( dirty == FALSE ) ) {
flags |= (dirty ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET);
- entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty);
+ entry_ptr->is_dirty = (hbool_t)(entry_ptr->is_dirty || dirty);
}
result = H5C_unprotect(NULL, -1, -1, cache_ptr, &(types[type]),
@@ -3278,10 +3491,10 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
HDassert( entry_ptr->header.is_protected );
HDassert( entry_ptr->is_protected );
- dirty_flag_set = ((flags & H5C__DIRTIED_FLAG) != 0 );
- pin_flag_set = ((flags & H5C__PIN_ENTRY_FLAG) != 0 );
- unpin_flag_set = ((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
- size_changed_flag_set = ((flags & H5C__SIZE_CHANGED_FLAG) != 0 );
+ dirty_flag_set = (hbool_t)((flags & H5C__DIRTIED_FLAG) != 0 );
+ pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0 );
+ unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0 );
+ size_changed_flag_set = (hbool_t)((flags & H5C__SIZE_CHANGED_FLAG) != 0 );
HDassert ( ! ( pin_flag_set && unpin_flag_set ) );
HDassert ( ( ! pin_flag_set ) || ( ! (entry_ptr->is_pinned) ) );
@@ -3290,7 +3503,7 @@ unprotect_entry_with_size_change(H5C_t * cache_ptr,
HDassert ( ( ! size_changed_flag_set ) ||
( type == VARIABLE_ENTRY_TYPE ) );
- entry_ptr->is_dirty = (entry_ptr->is_dirty || dirty_flag_set);
+ entry_ptr->is_dirty = (hbool_t)(entry_ptr->is_dirty || dirty_flag_set);
if ( size_changed_flag_set ) {
@@ -4667,3 +4880,214 @@ hl_col_major_scan_backward(H5C_t * cache_ptr,
} /* hl_col_major_scan_backward() */
+
+/*-------------------------------------------------------------------------
+ * Function: create_flush_dependency()
+ *
+ * Purpose: Create a 'flush dependency' between two entries.
+ *
+ * Do nothing if pass is false.
+ *
+ * Return: void
+ *
+ * Programmer: Quincey Koziol
+ * 3/16/09
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void
+create_flush_dependency(H5C_t * cache_ptr,
+ int32_t par_type,
+ int32_t par_idx,
+ int32_t chd_type,
+ int32_t chd_idx)
+{
+ HDassert( cache_ptr );
+ HDassert( ( 0 <= par_type ) && ( par_type < NUMBER_OF_ENTRY_TYPES ) );
+ HDassert( ( 0 <= par_idx ) && ( par_idx <= max_indices[par_type] ) );
+ HDassert( ( 0 <= chd_type ) && ( chd_type < NUMBER_OF_ENTRY_TYPES ) );
+ HDassert( ( 0 <= chd_idx ) && ( chd_idx <= max_indices[chd_type] ) );
+
+ if ( pass ) {
+ test_entry_t * par_base_addr; /* Base entry of parent's entry array */
+ test_entry_t * par_entry_ptr; /* Parent entry */
+ test_entry_t * chd_base_addr; /* Base entry of child's entry array */
+ test_entry_t * chd_entry_ptr; /* Child entry */
+ hbool_t par_is_pinned; /* Whether parent is already pinned */
+ herr_t result; /* API routine status */
+
+ /* Get parent entry */
+ par_base_addr = entries[par_type];
+ par_entry_ptr = &(par_base_addr[par_idx]);
+ par_is_pinned = par_entry_ptr->header.is_pinned;
+
+ /* Sanity check parent entry */
+ HDassert( par_entry_ptr->index == par_idx );
+ HDassert( par_entry_ptr->type == par_type );
+ HDassert( par_entry_ptr->header.is_protected );
+ HDassert( par_entry_ptr == par_entry_ptr->self );
+
+ /* Get parent entry */
+ chd_base_addr = entries[chd_type];
+ chd_entry_ptr = &(chd_base_addr[chd_idx]);
+
+ /* Sanity check child entry */
+ HDassert( chd_entry_ptr->index == chd_idx );
+ HDassert( chd_entry_ptr->type == chd_type );
+ HDassert( chd_entry_ptr == chd_entry_ptr->self );
+
+ result = H5C_create_flush_dependency(cache_ptr, par_entry_ptr,
+ chd_entry_ptr);
+
+ if ( ( result < 0 ) ||
+ ( !par_entry_ptr->header.is_pinned ) ||
+ ( !(par_entry_ptr->header.flush_dep_height > 0) ) ) {
+
+ pass = FALSE;
+ failure_mssg = "error in H5C_create_flush_dependency().";
+ } /* end if */
+
+ /* Update information about entries */
+ chd_entry_ptr->flush_dep_par_type = par_type;
+ chd_entry_ptr->flush_dep_par_idx = par_idx;
+ par_entry_ptr->child_flush_dep_height_rc[chd_entry_ptr->flush_dep_height]++;
+ if( !par_is_pinned )
+ par_entry_ptr->is_pinned = TRUE;
+
+ /* Check flush dependency heights */
+ while(chd_entry_ptr->flush_dep_height >= par_entry_ptr->flush_dep_height) {
+ unsigned prev_par_flush_dep_height = par_entry_ptr->flush_dep_height; /* Save the previous height */
+
+ par_entry_ptr->flush_dep_height = chd_entry_ptr->flush_dep_height + 1;
+
+ /* Check for parent entry being in flush dependency relationship */
+ if(par_entry_ptr->flush_dep_par_idx >= 0) {
+ /* Move parent & child entries up the flushd dependency 'chain' */
+ chd_entry_ptr = par_entry_ptr;
+ par_base_addr = entries[chd_entry_ptr->flush_dep_par_type];
+ par_entry_ptr = &(par_base_addr[chd_entry_ptr->flush_dep_par_idx]);
+
+ /* Adjust the ref. counts in new parent */
+ HDassert(par_entry_ptr->child_flush_dep_height_rc[prev_par_flush_dep_height] > 0);
+ par_entry_ptr->child_flush_dep_height_rc[prev_par_flush_dep_height]--;
+ par_entry_ptr->child_flush_dep_height_rc[chd_entry_ptr->flush_dep_height]++;
+ } /* end if */
+ } /* end if */
+ } /* end if */
+
+ return;
+
+} /* create_flush_dependency() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: destroy_flush_dependency()
+ *
+ * Purpose: Destroy a 'flush dependency' between two entries.
+ *
+ * Do nothing if pass is false.
+ *
+ * Return: void
+ *
+ * Programmer: Quincey Koziol
+ * 3/16/09
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void
+destroy_flush_dependency(H5C_t * cache_ptr,
+ int32_t par_type,
+ int32_t par_idx,
+ int32_t chd_type,
+ int32_t chd_idx)
+{
+ HDassert( cache_ptr );
+ HDassert( ( 0 <= par_type ) && ( par_type < NUMBER_OF_ENTRY_TYPES ) );
+ HDassert( ( 0 <= par_idx ) && ( par_idx <= max_indices[par_type] ) );
+ HDassert( ( 0 <= chd_type ) && ( chd_type < NUMBER_OF_ENTRY_TYPES ) );
+ HDassert( ( 0 <= chd_idx ) && ( chd_idx <= max_indices[chd_type] ) );
+
+ if ( pass ) {
+ test_entry_t * par_base_addr; /* Base entry of parent's entry array */
+ test_entry_t * par_entry_ptr; /* Parent entry */
+ test_entry_t * chd_base_addr; /* Base entry of child's entry array */
+ test_entry_t * chd_entry_ptr; /* Child entry */
+ unsigned chd_flush_dep_height; /* Child flush dep. height */
+
+ /* Get parent entry */
+ par_base_addr = entries[par_type];
+ par_entry_ptr = &(par_base_addr[par_idx]);
+
+ /* Sanity check parent entry */
+ HDassert( par_entry_ptr->index == par_idx );
+ HDassert( par_entry_ptr->type == par_type );
+ HDassert( par_entry_ptr->is_protected );
+ HDassert( par_entry_ptr->is_pinned );
+ HDassert( par_entry_ptr->flush_dep_height > 0 );
+ HDassert( par_entry_ptr == par_entry_ptr->self );
+
+ /* Get parent entry */
+ chd_base_addr = entries[chd_type];
+ chd_entry_ptr = &(chd_base_addr[chd_idx]);
+
+ /* Sanity check child entry */
+ HDassert( chd_entry_ptr->index == chd_idx );
+ HDassert( chd_entry_ptr->type == chd_type );
+ HDassert( chd_entry_ptr->flush_dep_height < par_entry_ptr->flush_dep_height );
+ HDassert( chd_entry_ptr == chd_entry_ptr->self );
+
+ if ( H5C_destroy_flush_dependency(cache_ptr, par_entry_ptr, chd_entry_ptr) < 0 ) {
+ pass = FALSE;
+ failure_mssg = "error in H5C_destroy_flush_dependency().";
+ } /* end if */
+
+ /* Update information about entries */
+ chd_entry_ptr->flush_dep_par_type = -1;
+ chd_entry_ptr->flush_dep_par_idx = -1;
+ par_entry_ptr->child_flush_dep_height_rc[chd_entry_ptr->flush_dep_height]--;
+
+ /* Check flush dependency heights */
+ chd_flush_dep_height = chd_entry_ptr->flush_dep_height;
+ while( 0 == par_entry_ptr->child_flush_dep_height_rc[chd_flush_dep_height] ) {
+ unsigned prev_par_flush_dep_height = par_entry_ptr->flush_dep_height; /* Save the previous height */
+ int i; /* Local index variable */
+
+ /* Check for new flush dependency height of parent */
+ for(i = (H5C__NUM_FLUSH_DEP_HEIGHTS - 1); i >= 0; i--)
+ if(par_entry_ptr->child_flush_dep_height_rc[i] > 0)
+ break;
+
+ HDassert((i + 1) <= (int)prev_par_flush_dep_height);
+
+ if((unsigned)(i + 1) < prev_par_flush_dep_height) {
+ par_entry_ptr->flush_dep_height = (unsigned)(i + 1);
+ if(i < 0)
+ par_entry_ptr->is_pinned = FALSE;
+
+ /* Check for parent entry being in flush dependency relationship */
+ if(par_entry_ptr->flush_dep_par_idx >= 0) {
+ /* Move parent & child entries up the flushd dependency 'chain' */
+ chd_entry_ptr = par_entry_ptr;
+ par_base_addr = entries[chd_entry_ptr->flush_dep_par_type];
+ par_entry_ptr = &(par_base_addr[chd_entry_ptr->flush_dep_par_idx]);
+
+ /* Adjust the ref. counts in new parent */
+ HDassert(par_entry_ptr->child_flush_dep_height_rc[prev_par_flush_dep_height] > 0);
+ par_entry_ptr->child_flush_dep_height_rc[prev_par_flush_dep_height]--;
+ par_entry_ptr->child_flush_dep_height_rc[chd_entry_ptr->flush_dep_height]++;
+ chd_flush_dep_height = prev_par_flush_dep_height;
+ } /* end if */
+ else
+ break;
+ } /* end if */
+ else
+ break;
+ } /* end while */
+ } /* end if */
+
+ return;
+
+} /* destroy_flush_dependency() */
+
diff --git a/test/cache_common.h b/test/cache_common.h
index f76f47c..fd00db8 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -19,17 +19,23 @@
* This file contains common #defines, type definitions, and
* externs for tests of the cache implemented in H5C.c
*/
-#include "h5test.h"
-#include "H5Iprivate.h"
-#include "H5ACprivate.h"
+#ifndef _CACHE_COMMON_H
+#define _CACHE_COMMON_H
#define H5C_PACKAGE /*suppress error about including H5Cpkg */
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Include library header files */
+#include "H5ACprivate.h"
#include "H5Cpkg.h"
+#include "H5Fpkg.h"
+#include "H5Iprivate.h"
-#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Include test header files */
+#include "h5test.h"
-#include "H5Fpkg.h"
+/* Macro to make error reporting easier */
+#define CACHE_ERROR(s) {failure_mssg = "Line #" H5_TOSTRING(__LINE__) ": " s ; goto done;}
#define NO_CHANGE -1
@@ -287,6 +293,13 @@ typedef struct test_entry_t
hbool_t destroyed; /* entry has been destroyed since the
* last time it was reset.
*/
+ int flush_dep_par_type; /* Entry type of flush dependency parent */
+ int flush_dep_par_idx; /* Index of flush dependency parent */
+ uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
+ /* flush dependency heights of flush
+ * dependency children
+ */
+ unsigned flush_dep_height; /* flush dependency height of entry */
} test_entry_t;
/* The following is a cut down copy of the hash table manipulation
@@ -451,6 +464,13 @@ struct expected_entry_status
hbool_t cleared;
hbool_t flushed;
hbool_t destroyed;
+ int flush_dep_par_type; /* Entry type of flush dependency parent */
+ int flush_dep_par_idx; /* Index of flush dependency parent */
+ uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
+ /* flush dependency heights of flush
+ * dependency children
+ */
+ unsigned flush_dep_height; /* flush dependency height of entry */
};
@@ -632,6 +652,10 @@ void protect_entry_ro(H5C_t * cache_ptr,
int32_t type,
int32_t idx);
+void pin_entry(H5C_t * cache_ptr,
+ int32_t type,
+ int32_t idx);
+
hbool_t entry_in_cache(H5C_t * cache_ptr,
int32_t type,
int32_t idx);
@@ -784,3 +808,17 @@ void verify_entry_status(H5C_t * cache_ptr,
void verify_unprotected(void);
+void create_flush_dependency(H5C_t * cache_ptr,
+ int32_t parent_type,
+ int32_t parent_idx,
+ int32_t child_type,
+ int32_t child_idx);
+
+void destroy_flush_dependency(H5C_t * cache_ptr,
+ int32_t parent_type,
+ int32_t parent_idx,
+ int32_t child_type,
+ int32_t child_idx);
+
+#endif /* _CACHE_COMMON_H */
+