summaryrefslogtreecommitdiffstats
path: root/src/H5Cdbg.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-10-09 14:17:31 (GMT)
committerGitHub <noreply@github.com>2020-10-09 14:17:31 (GMT)
commitd4b1ee1d861686b97a887f47ff3857e338d3f690 (patch)
tree8e0de772d9992287c1b169fb3fdaee624ab63844 /src/H5Cdbg.c
parent29874423bf155e23cfdc1920336c91674865f417 (diff)
parentd62e0753021df5510b97b38aa632ba570ca84275 (diff)
downloadhdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.zip
hdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.tar.gz
hdf5-d4b1ee1d861686b97a887f47ff3857e338d3f690.tar.bz2
Merge pull request #30 from byrnHDF/hdf5_1_12
Hdf5 1 12 merge changes from develop
Diffstat (limited to 'src/H5Cdbg.c')
-rw-r--r--src/H5Cdbg.c41
1 files changed, 29 insertions, 12 deletions
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 7dc7d34..0752673 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,31 @@ 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 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 +310,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 +610,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,