summaryrefslogtreecommitdiffstats
path: root/src/H5MFdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5MFdbg.c')
-rw-r--r--src/H5MFdbg.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index 1ae902f..43e2305 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -67,6 +67,7 @@ typedef struct {
/* Local Prototypes */
/********************/
+static herr_t H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata);
/*********************/
/* Package Variables */
@@ -84,7 +85,7 @@ typedef struct {
/*-------------------------------------------------------------------------
- * Function: H5MF_sects_debug_cb
+ * Function: H5MF__sects_debug_cb
*
* Purpose: Prints debugging info about a free space section for a file
*
@@ -97,13 +98,13 @@ typedef struct {
*-------------------------------------------------------------------------
*/
static herr_t
-H5MF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
+H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
{
H5MF_free_section_t *sect = (H5MF_free_section_t *)_sect; /* Section to dump info */
H5MF_debug_iter_ud_t *udata = (H5MF_debug_iter_ud_t *)_udata; /* User data for callbacks */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/*
* Check arguments.
@@ -114,8 +115,8 @@ H5MF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
/* Print generic section information */
HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth,
"Section type:",
- (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE ? "simple" :
- (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL ? "small" :
+ (sect->sect_info.type == H5MF_FSPACE_SECT_SIMPLE ? "simple" :
+ (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL ? "small" :
(sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown"))));
HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth,
"Section address:",
@@ -136,7 +137,7 @@ H5MF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5MF_sects_debug_cb() */
+} /* end H5MF__sects_debug_cb() */
/*-------------------------------------------------------------------------
@@ -153,12 +154,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int indent, int fwidth)
+H5MF_sects_debug(H5F_t *f, haddr_t fs_addr, FILE *stream, int indent, int fwidth)
{
- herr_t ret_value = SUCCEED; /* Return value */
H5F_mem_page_t type; /* Memory type for iteration */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
/*
* Check arguments.
@@ -168,10 +169,10 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind
HDassert(indent >= 0);
HDassert(fwidth >= 0);
- for(type = H5F_MEM_PAGE_DEFAULT; type < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, type))
+ for(type = H5F_MEM_PAGE_DEFAULT; type < H5F_MEM_PAGE_NTYPES; type++)
if(H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) {
if(!f->shared->fs_man[type])
- if(H5MF_open_fstype(f, dxpl_id, type) < 0)
+ if(H5MF__open_fstype(f, type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
if(f->shared->fs_man[type]) {
@@ -184,24 +185,24 @@ H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int ind
udata.fwidth = fwidth;
/* Iterate over all the free space sections */
- if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0)
+ if(H5FS_sect_iterate(f, f->shared->fs_man[type], H5MF__sects_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
/* Close the free space information */
- if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ if(H5FS_close(f, f->shared->fs_man[type]) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
} /* end if */
break;
} /* end if */
done:
- FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* H5MF_sects_debug() */
#ifdef H5MF_ALLOC_DEBUG_DUMP
/*-------------------------------------------------------------------------
- * Function: H5MF_sects_dump
+ * Function: H5MF__sects_dump
*
* Purpose: Prints debugging info about free space sections for a file.
*
@@ -214,14 +215,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5MF_sects_dump(H5F_t *f, hid_t dxpl_id, FILE *stream)
+H5MF__sects_dump(H5F_t *f, FILE *stream)
{
haddr_t eoa; /* End of allocated space in the file */
int indent = 0; /* Amount to indent */
int fwidth = 50; /* Field width */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_TAG(dxpl_id, H5AC__FREESPACE_TAG, FAIL)
+ FUNC_ENTER_PACKAGE_TAG(H5AC__FREESPACE_TAG)
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG */
@@ -234,7 +235,7 @@ HDfprintf(stderr, "%s: Dumping file free space sections\n", FUNC);
/* Retrieve the 'eoa' for the file */
if(HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed")
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
#endif /* H5MF_ALLOC_DEBUG */
@@ -242,7 +243,7 @@ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
if(H5F_PAGED_AGGR(f)) { /* File space paging */
H5F_mem_page_t ptype; /* Memory type for iteration -- page fs */
- for(ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, ptype)) {
+ for(ptype = H5F_MEM_PAGE_META; ptype < H5F_MEM_PAGE_NTYPES; ptype++) {
/* Print header for type */
HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)ptype);
@@ -260,7 +261,7 @@ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
udata.fwidth = MAX(0, fwidth - 6);
/* Iterate over all the free space sections */
- if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[ptype], H5MF_sects_debug_cb, &udata) < 0)
+ if(H5FS_sect_iterate(f, f->shared->fs_man[ptype], H5MF__sects_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
} /* end if */
else
@@ -276,19 +277,19 @@ HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa);
hsize_t sda_size = 0; /* Size of "small data aggregator" */
/* Retrieve metadata aggregator info, if available */
- H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
+ H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: ma_addr = %a, ma_size = %Hu, end of ma = %a\n", FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Retrieve 'small data' aggregator info, if available */
- H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
+ H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size);
#ifdef H5MF_ALLOC_DEBUG
HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1));
#endif /* H5MF_ALLOC_DEBUG */
/* Iterate over all the free space types that have managers and dump each free list's space */
- for(atype = H5FD_MEM_DEFAULT; atype < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, atype)) {
+ for(atype = H5FD_MEM_DEFAULT; atype < H5FD_MEM_NTYPES; atype++) {
/* Print header for type */
HDfprintf(stream, "%*sFile Free Space Info for type = %u:\n", indent, "", (unsigned)atype);
@@ -303,7 +304,7 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC,
HDfprintf(stream, "%*sSections:\n", indent + 3, "");
/* If there is a free space manager for this type, iterate over them */
- if(f->shared->fs.aggr.fs_man[atype]) {
+ if(f->shared->fs_man[atype]) {
H5MF_debug_iter_ud_t udata; /* User data for callbacks */
/* Prepare user data for section iteration callback */
@@ -313,7 +314,7 @@ HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC,
udata.fwidth = MAX(0, fwidth - 6);
/* Iterate over all the free space sections */
- if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[atype], H5MF_sects_debug_cb, &udata) < 0)
+ if(H5FS_sect_iterate(f, f->shared->fs_man[atype], H5MF__sects_debug_cb, &udata) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
} /* end if */
else /* No sections of this type */
@@ -326,7 +327,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_TAG(ret_value, FAIL)
-} /* end H5MF_sects_dump() */
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
+} /* end H5MF__sects_dump() */
#endif /* H5MF_ALLOC_DEBUG_DUMP */