summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-07-09 18:00:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-07-09 18:00:43 (GMT)
commit839de1e367efcc7d56cc71ff96a5e7cee8507f16 (patch)
treea4f4a5a2eb979517f42580fda9c011b3f535389e /src/H5F.c
parent2bbf08c3fc35ca5d60a7618c73069af3e7476e85 (diff)
downloadhdf5-839de1e367efcc7d56cc71ff96a5e7cee8507f16.zip
hdf5-839de1e367efcc7d56cc71ff96a5e7cee8507f16.tar.gz
hdf5-839de1e367efcc7d56cc71ff96a5e7cee8507f16.tar.bz2
[svn-r7189] Purpose:
Code cleanup Description: Break some of the "debugging" routines into their own module, so they aren't pulled into every executable, which certainly isn't going to use them. Platforms tested: h5committested
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c120
1 files changed, 5 insertions, 115 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 23e30d3..6f37aa9 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -3045,8 +3045,12 @@ H5F_close(H5F_t *f)
/* Only flush at this point if the file will be closed */
if (closing) {
/* Dump debugging info */
- H5AC_debug(f);
+#ifdef H5AC_DEBUG
+ H5AC_stats(f);
+#endif /* H5AC_DEBUG */
+#ifdef H5F_ISTORE_DEBUG
H5F_istore_stats(f, FALSE);
+#endif /* H5F_ISTORE_DEBUG */
#ifdef H5_HAVE_FPHDF5
/*
@@ -4198,117 +4202,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5F_sieve_overlap_clear() */
-
-/*-------------------------------------------------------------------------
- * Function: H5F_debug
- *
- * Purpose: Prints a file header to the specified stream. Each line
- * is indented and the field name occupies the specified width
- * number of characters.
- *
- * Errors:
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: Robb Matzke
- * matzke@llnl.gov
- * Aug 1 1997
- *
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Raymond Lu, 2001-10-14
- * Changed to the new generic property list.
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5F_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE * stream, int indent,
- int fwidth)
-{
- hsize_t userblock_size;
- int super_vers, freespace_vers, obj_dir_vers, share_head_vers;
- H5P_genplist_t *plist; /* Property list */
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5F_debug, FAIL);
-
- /* check args */
- assert(f);
- assert(H5F_addr_defined(addr));
- assert(stream);
- assert(indent >= 0);
- assert(fwidth >= 0);
-
- /* Get property list */
- if(NULL == (plist = H5I_object(f->shared->fcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
-
- if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get user block size");
- if(H5P_get(plist, H5F_CRT_BOOT_VERS_NAME, &super_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version");
- if(H5P_get(plist, H5F_CRT_FREESPACE_VERS_NAME, &freespace_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version");
- if(H5P_get(plist, H5F_CRT_OBJ_DIR_VERS_NAME, &obj_dir_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object directory version");
- if(H5P_get(plist, H5F_CRT_SHARE_HEAD_VERS_NAME, &share_head_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get shared-header format version");
-
- /* debug */
- HDfprintf(stream, "%*sFile Super Block...\n", indent, "");
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name:",
- f->name);
- HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth,
- "File access flags",
- (unsigned) (f->shared->flags));
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "File open reference count:",
- (unsigned) (f->shared->nrefs));
- HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth,
- "Address of super block:", f->shared->boot_addr);
- HDfprintf(stream, "%*s%-*s %lu bytes\n", indent, "", fwidth,
- "Size of user block:", (unsigned long) userblock_size);
-
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Super block version number:", (unsigned) super_vers);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Free list version number:", (unsigned) freespace_vers);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Root group symbol table entry version number:", (unsigned) obj_dir_vers);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared header version number:", (unsigned) share_head_vers);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file offsets (haddr_t type):", (unsigned) f->shared->sizeof_addr);
- HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
- "Size of file lengths (hsize_t type):", (unsigned) f->shared->sizeof_size);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table leaf node 1/2 rank:", f->shared->sym_leaf_k);
- HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Symbol table internal node 1/2 rank:",
- (unsigned) (f->shared->btree_k[H5B_SNODE_ID]));
- HDfprintf(stream, "%*s%-*s 0x%08lx\n", indent, "", fwidth,
- "File consistency flags:",
- (unsigned long) (f->shared->consist_flags));
- HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth,
- "Base address:", f->shared->base_addr);
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Free list address:", f->shared->freespace_addr);
-
- HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth,
- "Address of driver information block:", f->shared->driver_addr);
-
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Root group symbol table entry:",
- f->shared->root_grp ? "" : "(none)");
- if (f->shared->root_grp) {
- H5G_ent_debug(f, dxpl_id, H5G_entof(f->shared->root_grp), stream,
- indent+3, MAX(0, fwidth-3), HADDR_UNDEF);
- }
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
-}