summaryrefslogtreecommitdiffstats
path: root/src/H5HFdbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-19 02:42:18 (GMT)
commit5a7ef381b26985886a88ad88b2afda703b578d24 (patch)
tree55b1938c7711683b77c10dfd296c5e518437f4eb /src/H5HFdbg.c
parentc83c6dd945d44cdf9de44087c4063876ab378ac1 (diff)
downloadhdf5-5a7ef381b26985886a88ad88b2afda703b578d24.zip
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.gz
hdf5-5a7ef381b26985886a88ad88b2afda703b578d24.tar.bz2
[svn-r12598] Description:
- Migrate "direct block location" routine from H5HFman.c to H5HFdblock.c, which is a more appropriate location - Optimize performance of heap code by taking advantage of pinned indirect blocks and use them without putting a metadata cache protect/unprotect pair around them. - Other minor compiler warning cleanups and optimizations... Tested On: FreeBSD/32 4.11 (sleipnir) Linux/64 2.4 (mir) Solaris/64 2.9 (shanti)
Diffstat (limited to 'src/H5HFdbg.c')
-rw-r--r--src/H5HFdbg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index b7d8b79..ce17e60 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -508,6 +508,7 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
{
H5HF_hdr_t *hdr = NULL; /* Fractal heap header info */
H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */
+ hbool_t did_protect; /* Whether we protected the indirect block or not */
char temp_str[64]; /* Temporary string, for formatting */
size_t u, v; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -532,9 +533,9 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap header")
/*
- * Load the heap direct block
+ * Load the heap indirect block
*/
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, H5AC_READ)))
+ if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, addr, nrows, NULL, 0, FALSE, H5AC_READ, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Print opening message */
@@ -604,7 +605,7 @@ H5HF_iblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream,
"<none>");
done:
- if(iblock && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_IBLOCK, addr, iblock, H5AC__NO_FLAGS_SET) < 0)
+ if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap direct block")
if(hdr && H5AC_unprotect(f, dxpl_id, H5AC_FHEAP_HDR, hdr_addr, hdr, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release fractal heap header")