summaryrefslogtreecommitdiffstats
path: root/src/H5Cdbg.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-08 14:40:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-08 15:48:21 (GMT)
commitcdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3 (patch)
treed2effdc8a5999cb263ec0d0f607ed36d45fd3160 /src/H5Cdbg.c
parent29874423bf155e23cfdc1920336c91674865f417 (diff)
downloadhdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.zip
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.gz
hdf5-cdbe6b78f0e5dfd90b8a85beeb762b668ba29fe3.tar.bz2
Merge changes from develop
Comments and whitespace Skip file-locking and cache changes
Diffstat (limited to 'src/H5Cdbg.c')
-rw-r--r--src/H5Cdbg.c42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 7dc7d34..f45e52c 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -248,11 +248,12 @@ H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name)
#endif /* NDEBUG */
/*-------------------------------------------------------------------------
+ *
* Function: H5C_dump_cache_skip_list
*
* Purpose: Debugging routine that prints a summary of the contents of
- * the skip list used by the metadata cache metadata cache to
- * maintain an address sorted list of dirty entries.
+ * the skip list used by the metadata cache metadata cache to
+ * maintain an address sorted list of dirty entries.
*
* Return: Non-negative on success/Negative on failure
*
@@ -277,23 +278,32 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
HDassert(calling_fcn != NULL);
HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn);
- HDfprintf(stdout, " slist len = %u.\n", cache_ptr->slist_len);
- HDfprintf(stdout, " slist size = %lld.\n", (long long)(cache_ptr->slist_size));
+ HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled");
+ HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len);
+ HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size);
if (cache_ptr->slist_len > 0) {
+
/* If we get this far, all entries in the cache are listed in the
* skip list -- scan the skip list generating the desired output.
*/
HDfprintf(stdout, "Num: Addr: Len: Prot/Pind: Dirty: Type:\n");
- i = 0;
+ i = 0;
+
node_ptr = H5SL_first(cache_ptr->slist_ptr);
- if (node_ptr != NULL)
+
+ if (node_ptr != NULL) {
+
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- else
+ }
+ else {
+
entry_ptr = NULL;
+ }
while (entry_ptr != NULL) {
+
HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDfprintf(stdout, "%s%d 0x%016llx %4lld %d/%d %d %s\n", cache_ptr->prefix, i,
@@ -301,22 +311,30 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn)
(int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty),
entry_ptr->type->name);
- HDfprintf(stdout, " node_ptr = %p, item = %p\n", node_ptr, H5SL_item(node_ptr));
+ HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr));
/* increment node_ptr before we delete its target */
+
node_ptr = H5SL_next(node_ptr);
- if (node_ptr != NULL)
+
+ if (node_ptr != NULL) {
+
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- else
+ }
+ else {
+
entry_ptr = NULL;
+ }
i++;
+
} /* end while */
} /* end if */
HDfprintf(stdout, "\n\n");
FUNC_LEAVE_NOAPI(ret_value)
+
} /* H5C_dump_cache_skip_list() */
#endif /* NDEBUG */
@@ -593,8 +611,8 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
(long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts),
(long long)(cache_ptr->index_scan_restarts));
- HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %Hu\n", cache_ptr->prefix,
- cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
+ HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n",
+ cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded,
cache_ptr->last_image_size);
HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix,