summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-11-28 18:19:23 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-11-28 18:19:23 (GMT)
commita6ab26c74b29fff10e6a40bb351eb4a6eaa24162 (patch)
tree6961ed43c5317f40768c5822f0ff9746c0f6981a /src
parent1921f7f4ad8cf3e7ef271183b6af897b3af87ab9 (diff)
parent7a8c7c6063e328fdac28aa3f77ead4bdc91860e5 (diff)
downloadhdf5-a6ab26c74b29fff10e6a40bb351eb4a6eaa24162.zip
hdf5-a6ab26c74b29fff10e6a40bb351eb4a6eaa24162.tar.gz
hdf5-a6ab26c74b29fff10e6a40bb351eb4a6eaa24162.tar.bz2
Merge pull request #175 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:new_H5AC_dump_cache to develop
Updated H5AC_dump_cache() to emit more information. * commit '7a8c7c6063e328fdac28aa3f77ead4bdc91860e5': Updated the cache dump to use the stored type name instead of the (redundant) array of names I previously created. Updated the format of H5AC/C_dump_cache() to include more information and be easier to read.
Diffstat (limited to 'src')
-rw-r--r--src/H5Cdbg.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 3961aa4..16077c8 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -126,24 +126,39 @@ H5C_dump_cache(H5C_t * cache_ptr, const char * cache_name)
* skip list -- scan the skip list generating the desired output.
*/
- HDfprintf(stdout, "\n\nDump of metadata cache \"%s\".\n", cache_name);
- HDfprintf(stdout,
- "Num: Addr: Len: Type: Prot: Pinned: Dirty:\n");
+ HDfprintf(stdout, "\n\nDump of metadata cache \"%s\"\n", cache_name);
+
+ /* Print header */
+ HDfprintf(stdout, "Entry ");
+ HDfprintf(stdout, "| Address ");
+ HDfprintf(stdout, "| Tag ");
+ HDfprintf(stdout, "| Size ");
+ HDfprintf(stdout, "| Ring ");
+ HDfprintf(stdout, "| Type ");
+ HDfprintf(stdout, "| Prot/Pin/Dirty");
+ HDfprintf(stdout, "\n");
+
+ HDfprintf(stdout, "----------------------------------------------------------------------------------------------------------------\n");
i = 0;
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);
while(entry_ptr != NULL) {
HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDfprintf(stdout,
- "%s%d 0x%16llx 0x%3llx %2d %d %d %d\n",
- cache_ptr->prefix, i,
- (long long)(entry_ptr->addr),
- (long long)(entry_ptr->size),
- (int)(entry_ptr->type->id),
- (int)(entry_ptr->is_protected),
- (int)(entry_ptr->is_pinned),
- (int)(entry_ptr->is_dirty));
+ /* Print entry */
+ HDfprintf(stdout, "%s%5d ", cache_ptr->prefix, i);
+ HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->addr));
+ if(NULL == entry_ptr->tag_info)
+ HDfprintf(stdout, " %16s ", "N/A");
+ else
+ HDfprintf(stdout, " 0x%16llx ", (long long)(entry_ptr->tag_info->tag));
+ HDfprintf(stdout, " %5lld ", (long long)(entry_ptr->size));
+ HDfprintf(stdout, " %d ", (int)(entry_ptr->ring));
+ HDfprintf(stdout, " %2d %-32s ", (int)(entry_ptr->type->id), (entry_ptr->type->name));
+ HDfprintf(stdout, " %d", (int)(entry_ptr->is_protected));
+ HDfprintf(stdout, " %d", (int)(entry_ptr->is_pinned));
+ HDfprintf(stdout, " %d", (int)(entry_ptr->is_dirty));
+ HDfprintf(stdout, "\n");
/* remove the next (first) item in the skip list */
entry_ptr = (H5C_cache_entry_t *)H5SL_remove_first(slist_ptr);