summaryrefslogtreecommitdiffstats
path: root/src/H5HLdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-07 22:45:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-07 22:45:21 (GMT)
commit86d40d2265865e2c601204ca50f9528543b96caa (patch)
tree99aa552b4f9e58ed0a7738e8162494b1b1714441 /src/H5HLdbg.c
parent27c3c4fc9ab24b04e289a5ae07f3c5b791584eb8 (diff)
downloadhdf5-86d40d2265865e2c601204ca50f9528543b96caa.zip
hdf5-86d40d2265865e2c601204ca50f9528543b96caa.tar.gz
hdf5-86d40d2265865e2c601204ca50f9528543b96caa.tar.bz2
[svn-r18072] Description:
Bring r18071 from metadata journaling merge branch: Refactor local heap routines with changes from metadata journaling branch, along with other misc. changes as the changes on the metadata journaling branch are being converged with the current state of the trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5HLdbg.c')
-rw-r--r--src/H5HLdbg.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 6bf35ad..8107164 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -69,28 +69,25 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- if(NULL == (h = (H5HL_t *)H5AC_protect(f, dxpl_id, H5AC_LHEAP, addr, NULL, NULL, H5AC_READ)))
+ if(NULL == (h = (H5HL_t *)H5HL_protect(f, dxpl_id, addr, H5AC_READ)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load heap")
fprintf(stream, "%*sLocal Heap...\n", indent, "");
- fprintf(stream, "%*s%-*s %d\n", indent, "", fwidth,
- "Dirty:",
- (int) (h->cache_info.is_dirty));
fprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Header size (in bytes):",
- (unsigned long) H5HL_SIZEOF_HDR(f));
+ (unsigned long)h->prfx_size);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"Address of heap data:",
- h->addr);
+ h->dblk_addr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Data bytes allocated for heap:",
- h->heap_alloc);
+ h->dblk_size);
/*
* Traverse the free list and check that all free blocks fall within
* the heap and that no two free blocks point to the same region of
* the heap. */
- if(NULL == (marker = (uint8_t *)H5MM_calloc(h->heap_alloc)))
+ if(NULL == (marker = (uint8_t *)H5MM_calloc(h->dblk_size)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed")
fprintf(stream, "%*sFree Blocks (offset, size):\n", indent, "");
@@ -102,7 +99,7 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent+3, "", MAX(0,fwidth-9),
temp_str,
freelist->offset, freelist->size);
- if(freelist->offset + freelist->size > h->heap_alloc)
+ if((freelist->offset + freelist->size) > h->dblk_size)
fprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n");
else {
for(i = overlap = 0; i < (int)(freelist->size); i++) {
@@ -111,25 +108,24 @@ H5HL_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent, int
marker[freelist->offset + i] = 1;
} /* end for */
if(overlap)
- fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS "
- "ONE!\n");
+ fprintf(stream, "***THAT FREE BLOCK OVERLAPPED A PREVIOUS ONE!\n");
else
amount_free += freelist->size;
} /* end for */
} /* end for */
- if(h->heap_alloc)
+ if(h->dblk_size)
fprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth,
"Percent of heap used:",
- (100.0 * (double)(h->heap_alloc - amount_free) / (double)h->heap_alloc));
+ (100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
/*
* Print the data in a VMS-style octal dump.
*/
- H5_buffer_dump(stream, indent, h->chunk, marker, H5HL_SIZEOF_HDR(f), h->heap_alloc);
+ H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
done:
- if(h && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP, addr, h, FALSE) < 0)
+ if(h && H5HL_unprotect(f, h) < 0)
HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
H5MM_xfree(marker);