summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Ctag.c11
-rw-r--r--src/H5FS.c29
-rw-r--r--src/H5FSsection.c4
-rw-r--r--src/H5MF.c56
-rw-r--r--src/H5MFdbg.c8
-rw-r--r--test/cache_tagging.c213
-rw-r--r--test/evict_on_close.c4
7 files changed, 90 insertions, 235 deletions
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 6b47cc7..3920475 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -647,20 +647,13 @@ H5C_verify_tag(int id, haddr_t tag)
} /* end else */
/* Free Space Manager */
- if((id == H5AC_FSPACE_HDR_ID) || (id == H5AC_FSPACE_SINFO_ID)) {
- if(tag != H5AC__FREESPACE_TAG)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "freespace entry not tagged with H5AC__FREESPACE_TAG")
- } /* end if */
- else {
- if(tag == H5AC__FREESPACE_TAG)
+ if(tag == H5AC__FREESPACE_TAG && ((id != H5AC_FSPACE_HDR_ID) && (id != H5AC_FSPACE_SINFO_ID)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "H5AC__FREESPACE_TAG applied to non-freespace entry")
- } /* end else */
/* SOHM */
- if((id == H5AC_SOHM_TABLE_ID) || (id == H5AC_SOHM_LIST_ID)) {
+ if((id == H5AC_SOHM_TABLE_ID) || (id == H5AC_SOHM_LIST_ID))
if(tag != H5AC__SOHM_TAG)
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "sohm entry not tagged with H5AC__SOHM_TAG")
- } /* end if */
/* Global Heap */
if(id == H5AC_GHEAP_ID) {
diff --git a/src/H5FS.c b/src/H5FS.c
index 8211404..2193d84 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -109,7 +109,7 @@ H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_c
H5FS_t *fspace = NULL; /* New free space structure */
H5FS_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL)
+ FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, nclasses);
#endif /* H5FS_DEBUG */
@@ -168,7 +168,7 @@ done:
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#endif /* H5FS_DEBUG */
- FUNC_LEAVE_NOAPI_TAG(ret_value, NULL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_create() */
@@ -193,7 +193,7 @@ H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, uint16_t nclasses,
H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
H5FS_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, NULL)
+ FUNC_ENTER_NOAPI(NULL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Opening free space manager, fs_addr = %a, nclasses = %Zu\n", FUNC, fs_addr, nclasses);
#endif /* H5FS_DEBUG */
@@ -237,7 +237,7 @@ HDfprintf(stderr, "%s: fspace->rc = %u\n", FUNC, fspace->rc);
ret_value = fspace;
done:
- FUNC_LEAVE_NOAPI_TAG(ret_value, NULL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_open() */
@@ -260,7 +260,7 @@ H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr)
H5FS_hdr_cache_ud_t cache_udata; /* User-data for metadata cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Deleting free space manager, fs_addr = %a\n", FUNC, fs_addr);
#endif /* H5FS_DEBUG */
@@ -387,7 +387,7 @@ done:
if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG | H5AC__FREE_FILE_SPACE_FLAG) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space header")
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_delete() */
@@ -409,7 +409,7 @@ H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -570,7 +570,7 @@ done:
#ifdef H5FS_DEBUG
HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_value, fspace->rc);
#endif /* H5FS_DEBUG */
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_close() */
@@ -825,7 +825,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -845,7 +845,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id)
*fs_addr = fspace->addr;
done:
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_alloc_hdr() */
@@ -866,7 +866,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -892,7 +892,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
} /* end if */
done:
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_alloc_sect() */
@@ -915,7 +915,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
unsigned cache_flags; /* Flags for unprotecting cache entries */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI(FAIL)
/* Check arguments. */
HDassert(f);
@@ -1001,7 +1001,7 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
} /* end if */
done:
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_free() */
@@ -1213,3 +1213,4 @@ HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu\n", "H5FS_assert", fspace->t
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FS_assert() */
#endif /* H5FS_DEBUG_ASSERT */
+
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 4697bd50..766a823 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -208,7 +208,7 @@ H5FS_sinfo_lock(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, unsigned accmode)
H5FS_sinfo_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_NOINIT
#ifdef H5FS_SINFO_DEBUG
HDfprintf(stderr, "%s: Called, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr);
@@ -298,7 +298,7 @@ done:
HDfprintf(stderr, "%s: Leaving, fspace->addr = %a, fspace->sinfo = %p, fspace->sect_addr = %a\n", FUNC, fspace->addr, fspace->sinfo, fspace->sect_addr);
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
#endif /* H5FS_SINFO_DEBUG */
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FS_sinfo_lock() */
diff --git a/src/H5MF.c b/src/H5MF.c
index fcc4d46..024cf19 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -85,7 +85,7 @@ typedef struct {
/* Allocator routines */
static herr_t H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
-static herr_t H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
+static herr_t H5MF__alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type);
static herr_t H5MF__close_delete(H5F_t *f, hid_t dxpl_id);
@@ -245,7 +245,7 @@ H5MF_alloc_open(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/*
* Check arguments.
@@ -274,7 +274,7 @@ done:
if(H5AC_reset_ring(dxpl, orig_ring) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_alloc_open() */
@@ -301,7 +301,7 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
herr_t ret_value = SUCCEED; /* Return value */
H5FS_create_t fs_create; /* Free space creation parameters */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/*
* Check arguments.
@@ -329,7 +329,7 @@ H5MF_alloc_create(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
f->shared->fs_state[type] = H5F_FS_STATE_OPEN;
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_alloc_create() */
@@ -379,7 +379,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5MF_alloc_close
+ * Function: H5MF__alloc_close
*
* Purpose: Close an existing free space manager of TYPE for file
*
@@ -391,11 +391,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
+H5MF__alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/*
* Check arguments.
@@ -413,8 +413,8 @@ H5MF_alloc_close(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type)
f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MF_alloc_close() */
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+} /* end H5MF__alloc_close() */
/*-------------------------------------------------------------------------
@@ -442,7 +442,7 @@ H5MF_alloc(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, hsize_t size)
H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
- FUNC_ENTER_NOAPI(HADDR_UNDEF)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, HADDR_UNDEF)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_type, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -543,7 +543,7 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %a, size = %Hu\n", FUNC, ret_value,
H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, HADDR_UNDEF)
} /* end H5MF_alloc() */
@@ -633,7 +633,7 @@ H5MF_xfree(const H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id, haddr_t addr,
H5FD_mem_t fs_type; /* Free space type (mapped from allocation type) */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)alloc_type, addr, size);
#endif /* H5MF_ALLOC_DEBUG */
@@ -774,7 +774,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d\n", FUNC, ret_value);
#ifdef H5MF_ALLOC_DEBUG_DUMP
H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_xfree() */
@@ -802,7 +802,7 @@ H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t alloc_type, haddr_t addr,
H5FD_mem_t map_type; /* Mapped type */
htri_t ret_value = FAIL; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering: alloc_type = %u, addr = %a, size = %Hu, extra_requested = %Hu\n", FUNC, (unsigned)alloc_type, addr, size, extra_requested);
#endif /* H5MF_ALLOC_DEBUG */
@@ -861,7 +861,7 @@ HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value);
H5MF_sects_dump(f, dxpl_id, stderr);
#endif /* H5MF_ALLOC_DEBUG_DUMP */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_try_extend() */
@@ -900,7 +900,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si
hbool_t eoa_shrank; /* Whether an EOA shrink occurs */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* check args */
HDassert(f);
@@ -991,7 +991,7 @@ H5MF_get_freespace(H5F_t *f, hid_t dxpl_id, hsize_t *tot_space, hsize_t *meta_si
/* Close the free-space managers if they were opened earlier in this routine */
for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
if(fs_started[type])
- if(H5MF_alloc_close(f, dxpl_id, type) < 0)
+ if(H5MF__alloc_close(f, dxpl_id, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't close file free space")
} /* end for */
@@ -1007,7 +1007,7 @@ done:
if(H5AC_reset_ring(dxpl, orig_ring) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_get_freespace() */
@@ -1108,7 +1108,7 @@ H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id)
H5MF_sect_ud_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* check args */
HDassert(f);
@@ -1143,7 +1143,7 @@ H5MF_close_shrink_eoa(H5F_t *f, hid_t dxpl_id)
} while(eoa_shrank);
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_close_shrink_eoa() */
@@ -1166,7 +1166,7 @@ H5MF__close_delete(H5F_t *f, hid_t dxpl_id)
H5FD_mem_t type; /* Memory type for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC
+ FUNC_ENTER_STATIC_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
@@ -1229,7 +1229,7 @@ done:
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Leaving\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* H5MF__close_delete() */
@@ -1308,7 +1308,7 @@ H5MF_close(H5F_t *f, hid_t dxpl_id)
H5FD_mem_t type; /* Memory type for iteration */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Entering\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
@@ -1446,7 +1446,7 @@ done:
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Leaving\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_close() */
@@ -1506,7 +1506,7 @@ H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects,
H5FD_mem_t ty; /* Memory type for iteration */
ssize_t ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/* check args */
HDassert(f);
@@ -1567,7 +1567,7 @@ H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects,
/* Close the free space manager of this type, if we started it here */
if(fs_started)
- if(H5MF_alloc_close(f, dxpl_id, ty) < 0)
+ if(H5MF__alloc_close(f, dxpl_id, ty) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space")
} /* end for */
@@ -1579,6 +1579,6 @@ done:
if(H5AC_reset_ring(dxpl, orig_ring) < 0)
HDONE_ERROR(H5E_RESOURCE, H5E_CANTSET, FAIL, "unable to set property value")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* H5MF_get_free_sections() */
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 59da9e8..6d5d994 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -158,7 +158,7 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind
herr_t ret_value = SUCCEED; /* Return value */
H5FD_mem_t type; /* Memory type for iteration */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
/*
* Check arguments.
@@ -195,7 +195,7 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind
}
done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* H5MF_sects_debug() */
#ifdef H5MF_ALLOC_DEBUG_DUMP
@@ -226,7 +226,7 @@ H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream)
int fwidth = 50; /* Field width */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
@@ -300,7 +300,7 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC,
done:
HDfprintf(stderr, "%s: Done dumping file free space sections\n", FUNC);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5MF_sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index b94ceb9..473851e 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -56,8 +56,7 @@
/* ===================== */
/* Helper Functions */
-static void print_entry_type_to_screen(int id);
-static int print_index(hid_t fid);
+static int dump_cache(hid_t fid);
static int verify_no_unknown_tags(hid_t fid);
static int mark_all_entries_investigated(hid_t fid);
static int reset_all_entries_investigated(hid_t fid);
@@ -98,126 +97,10 @@ static unsigned check_invalid_tag_application(void);
/* Helper Functions */
/* ================ */
-
-/*-------------------------------------------------------------------------
- *
- * Function: print_entry_type_to_screen
- *
- * Purpose: DEBUG CODE (for when verbose is set).
- *
- * Prints type of entry to stdout.
- *
- * Return: void
- *
- * Programmer: Mike McGreevy
- * September 3, 2009
- *
- *-------------------------------------------------------------------------
- */
-static void
-print_entry_type_to_screen(int id)
-{
- HDfprintf(stdout, "Type = ");
-
- switch (id) {
- case H5AC_BT_ID:
- HDfprintf(stdout, "v1 B-tree Node");
- break;
- case H5AC_SNODE_ID:
- HDfprintf(stdout, "Symbol Table Node");
- break;
- case H5AC_LHEAP_PRFX_ID:
- HDfprintf(stdout, "Local Heap Prefix");
- break;
- case H5AC_LHEAP_DBLK_ID:
- HDfprintf(stdout, "Local Heap Data Block");
- break;
- case H5AC_GHEAP_ID:
- HDfprintf(stdout, "Global Heap");
- break;
- case H5AC_OHDR_ID:
- HDfprintf(stdout, "Object Header");
- break;
- case H5AC_OHDR_CHK_ID:
- HDfprintf(stdout, "Object Header Chunk");
- break;
- case H5AC_BT2_HDR_ID:
- HDfprintf(stdout, "v2 B-tree Header");
- break;
- case H5AC_BT2_INT_ID:
- HDfprintf(stdout, "v2 B-tree Internal Node");
- break;
- case H5AC_BT2_LEAF_ID:
- HDfprintf(stdout, "v2 B-tree Leaf Node");
- break;
- case H5AC_FHEAP_HDR_ID:
- HDfprintf(stdout, "Fractal Heap Header");
- break;
- case H5AC_FHEAP_DBLOCK_ID:
- HDfprintf(stdout, "Fractal Heap Direct Block");
- break;
- case H5AC_FHEAP_IBLOCK_ID:
- HDfprintf(stdout, "Fractal Heap Indirect Block");
- break;
- case H5AC_FSPACE_HDR_ID:
- HDfprintf(stdout, "Free Space Header");
- break;
- case H5AC_FSPACE_SINFO_ID:
- HDfprintf(stdout, "Free Space Section");
- break;
- case H5AC_SOHM_TABLE_ID:
- HDfprintf(stdout, "Shared Object Header Message Master Table");
- break;
- case H5AC_SOHM_LIST_ID:
- HDfprintf(stdout, "Shared Message Index Stored As A List");
- break;
- case H5AC_EARRAY_HDR_ID:
- HDfprintf(stdout, "Extensible Array Header");
- break;
- case H5AC_EARRAY_IBLOCK_ID:
- HDfprintf(stdout, "Extensible Array Index Block");
- break;
- case H5AC_EARRAY_SBLOCK_ID:
- HDfprintf(stdout, "Extensible Array Super Block");
- break;
- case H5AC_EARRAY_DBLOCK_ID:
- HDfprintf(stdout, "Extensible Array Data Block");
- break;
- case H5AC_EARRAY_DBLK_PAGE_ID:
- HDfprintf(stdout, "Extensible Array Data Block Page");
- break;
- case H5AC_FARRAY_HDR_ID:
- HDfprintf(stdout, "Fixed Array Header");
- break;
- case H5AC_FARRAY_DBLOCK_ID:
- HDfprintf(stdout, "Fixed Array Data Block");
- break;
- case H5AC_FARRAY_DBLK_PAGE_ID:
- HDfprintf(stdout, "Fixed Array Data Block Page");
- break;
- case H5AC_SUPERBLOCK_ID:
- HDfprintf(stdout, "File Superblock");
- break;
- case H5AC_DRVRINFO_ID:
- HDfprintf(stdout, "Driver Info Block");
- break;
- case H5AC_TEST_ID:
- HDfprintf(stdout, "Test Entry");
- break;
- case H5AC_NTYPES:
- HDfprintf(stdout, "BADNESS: Number of Types");
- break;
- default:
- HDfprintf(stdout, "BADNESS: *Unknown*");
- break;
- } /* end switch */
-
- HDfprintf(stdout, " (%d)", id);
-} /* print_entry_type_to_screen */
/*-------------------------------------------------------------------------
- * Function: print_index()
+ * Function: dump_cache()
*
* Purpose: DEBUG CODE (for when verbose is set).
*
@@ -231,41 +114,23 @@ print_entry_type_to_screen(int id)
*
*-------------------------------------------------------------------------
*/
-static int print_index(hid_t fid)
+static int dump_cache(hid_t fid)
{
H5F_t *f; /* File Pointer */
- H5C_t *cache_ptr; /* Cache Pointer */
- int i; /* Iterator */
/* Get Internal File / Cache Pointers */
if(NULL == (f = (H5F_t *)H5I_object(fid)))
TEST_ERROR;
- cache_ptr = f->shared->cache;
-
- /* Initial (debugging) loop */
- printf("CACHE SNAPSHOT:\n");
- for(i = 0; i < H5C__HASH_TABLE_LEN; i++) {
- H5C_cache_entry_t *entry_ptr; /* entry pointer */
- entry_ptr = cache_ptr->index[i];
- while(entry_ptr != NULL) {
- HDfprintf(stdout, "Addr = %a, ", entry_ptr->addr);
- HDfprintf(stdout, "Tag = %a, ", entry_ptr->tag_info ? entry_ptr->tag_info->tag : HADDR_UNDEF);
- HDfprintf(stdout, "Dirty = %t, ", entry_ptr->is_dirty);
- HDfprintf(stdout, "Dirtied = %t, ", entry_ptr->dirtied);
- print_entry_type_to_screen(entry_ptr->type->id);
- printf("\n");
-
- entry_ptr = entry_ptr->ht_next;
- } /* end while */
- } /* end for */
- printf("\n");
+ /* Dump the cache */
+ if(H5AC_dump_cache(f) < 0)
+ TEST_ERROR;
return 0;
error:
return -1;
-} /* print_index */
+} /* dump_cache */
/*-------------------------------------------------------------------------
@@ -584,7 +449,7 @@ check_file_creation_tags(hid_t fcpl_id, int type)
if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT)) < 0 ) TEST_ERROR;
/* if verbose, print cache index to screen before verification . */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify there is a superblock entry with superblock tag */
if ( verify_tag(fid, H5AC_SUPERBLOCK_ID, H5AC__SUPERBLOCK_TAG) < 0 ) TEST_ERROR;
@@ -690,7 +555,7 @@ check_file_open_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen before verification . */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify there is a superblock entry with superblock tag. */
if ( verify_tag(fid, H5AC_SUPERBLOCK_ID, H5AC__SUPERBLOCK_TAG) < 0 ) TEST_ERROR;
@@ -792,7 +657,7 @@ check_group_creation_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -895,7 +760,7 @@ check_multi_group_creation_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify there is an object header for each group */
for (i = 0; i < MULTIGROUPS; i++) {
@@ -919,8 +784,8 @@ check_multi_group_creation_tags(void)
} /* end for */
/* Verify free space header and section info */
- if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, root_tag) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, root_tag) < 0 ) TEST_ERROR;
/* verify fractal heap header belonging to root group */
if ( verify_tag(fid, H5AC_FHEAP_HDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -1027,7 +892,7 @@ check_link_iteration_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -1144,11 +1009,11 @@ check_dense_attribute_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify free space header and section info */
- if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, d_tag) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, d_tag) < 0 ) TEST_ERROR;
/* verify object header belonging to dataset */
if ( verify_tag(fid, H5AC_OHDR_ID, d_tag) < 0 ) TEST_ERROR;
@@ -1200,7 +1065,7 @@ check_dense_attribute_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify object header belonging to dataset */
if ( verify_tag(fid, H5AC_OHDR_ID, d_tag) < 0 ) TEST_ERROR;
@@ -1308,7 +1173,7 @@ check_group_open_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -1412,7 +1277,7 @@ check_attribute_creation_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify object header belonging to group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -1436,8 +1301,8 @@ check_attribute_creation_tags(hid_t fcpl, int type)
if ( verify_tag(fid, H5AC_FHEAP_DBLOCK_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
/* Verify free space header and free space section */
- if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
- if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__FREESPACE_TAG) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
+ if ( verify_tag(fid, H5AC_FSPACE_SINFO_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
/* verify btree header and leaf node belonging to group */
if ( verify_tag(fid, H5AC_BT2_HDR_ID, H5AC__SOHM_TAG) < 0 ) TEST_ERROR;
@@ -1546,7 +1411,7 @@ check_attribute_open_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify object header belonging to group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -1688,7 +1553,7 @@ check_attribute_rename_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -1850,7 +1715,7 @@ check_attribute_delete_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify object header belonging to group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -1972,7 +1837,7 @@ check_dataset_creation_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -2097,7 +1962,7 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -2235,7 +2100,7 @@ check_dataset_open_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -2366,7 +2231,7 @@ check_dataset_write_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify 10 b-tree nodes belonging to dataset */
for (i=0; i<10; i++)
@@ -2489,7 +2354,7 @@ check_attribute_write_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify object header of group */
if ( verify_tag(fid, H5AC_OHDR_ID, g_tag) < 0 ) TEST_ERROR;
@@ -2644,7 +2509,7 @@ check_dataset_read_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify 19 b-tree nodes belonging to dataset */
for (i=0; i<19; i++)
@@ -2774,7 +2639,7 @@ check_dataset_size_retrieval(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify 19 b-tree nodes belonging to dataset */
for (i=0; i<19; i++)
@@ -2907,7 +2772,7 @@ check_dataset_extend_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, d_tag) < 0 ) TEST_ERROR;
@@ -3004,7 +2869,7 @@ check_object_info_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3110,7 +2975,7 @@ check_object_copy_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3260,7 +3125,7 @@ check_link_removal_tags(hid_t fcpl, int type)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3409,7 +3274,7 @@ check_link_getname_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group's tagged metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3509,7 +3374,7 @@ check_external_link_creation_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* Verify root group metadata */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
@@ -3616,7 +3481,7 @@ check_external_link_open_tags(void)
/* =================================== */
/* if verbose, print cache index to screen for visual verification */
- if ( verbose ) print_index(fid);
+ if ( verbose ) dump_cache(fid);
/* verify tag value of first file's root group */
if ( verify_tag(fid, H5AC_OHDR_ID, root_tag) < 0 ) TEST_ERROR;
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index c42c4b3..e0a7a73 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -294,12 +294,10 @@ generate_eoc_test_file(hid_t fapl_id)
if(HDsnprintf(subgroup_name, (size_t)(SUBGROUP_NAME_SIZE - 1), "%d", i) < 0)
TEST_ERROR
-/* DER - Restore when EoC new-style group bug is resolved.
if((gid2 = H5Gcreate2(gid1, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR;
if(H5Gclose(gid2) < 0)
TEST_ERROR;
-*/
} /* end for */
if(H5Gclose(gid1) < 0)
@@ -955,10 +953,8 @@ main(void)
*/
TESTING("evict on close with old-style groups");
nerrors += check_group_layout(fid, GROUP_OLD_STYLE_NAME) < 0 ? 1 : 0;
-/* DER - Enable when EoC new-style groups bug is fixed
TESTING("evict on close with new-style groups");
nerrors += check_group_layout(fid, GROUP_NEW_STYLE_NAME) < 0 ? 1 : 0;
-*/
/* Close the test file */
if(H5Fclose(fid) < 0) {