summaryrefslogtreecommitdiffstats
path: root/src/H5FSdbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FSdbg.c')
-rw-r--r--src/H5FSdbg.c121
1 files changed, 57 insertions, 64 deletions
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index 7303b73..fbdeb70 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -15,11 +15,11 @@
/*-------------------------------------------------------------------------
*
- * Created: H5FSdbg.c
- * May 9 2006
- * Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Created: H5FSdbg.c
+ * May 9 2006
+ * Quincey Koziol <koziol@hdfgroup.org>
*
- * Purpose: Dump debugging information about a free space manager
+ * Purpose: Dump debugging information about a free space manager
*
*-------------------------------------------------------------------------
*/
@@ -36,11 +36,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FSpkg.h" /* File free space */
-#include "H5HFprivate.h" /* Fractal heaps */
-#include "H5MFprivate.h" /* File memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FSpkg.h" /* File free space */
+#include "H5HFprivate.h" /* Fractal heaps */
+#include "H5MFprivate.h" /* File memory management */
/****************/
@@ -79,26 +79,21 @@
/*-------------------------------------------------------------------------
- * Function: H5FS_debug
+ * Function: H5FS_debug
*
- * Purpose: Prints debugging info about a free space manager.
+ * Purpose: Prints debugging info about a free space manager.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
- *
- * Modifications:
- * Vailin Choi, July 29th, 2008
- * Add H5FS_CLIENT_FILE_ID for File Memory Management
+ * Programmer: Quincey Koziol
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
herr_t
H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- H5FS_t *fspace = NULL; /* Free space header info */
+ H5FS_t *fspace = NULL; /* Free space header info */
H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -124,7 +119,7 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
* Load the free space header.
*/
if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Print opening message */
HDfprintf(stream, "%*sFree Space Header...\n", indent, "");
@@ -133,45 +128,45 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Free space client:",
- (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" :
- (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
+ "Free space client:",
+ (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" :
+ (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown")));
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total free space tracked:",
- fspace->tot_space);
+ "Total free space tracked:",
+ fspace->tot_space);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Total number of free space sections tracked:",
- fspace->tot_sect_count);
+ "Total number of free space sections tracked:",
+ fspace->tot_sect_count);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of serializable free space sections tracked:",
- fspace->serial_sect_count);
+ "Number of serializable free space sections tracked:",
+ fspace->serial_sect_count);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Number of ghost free space sections tracked:",
- fspace->ghost_sect_count);
+ "Number of ghost free space sections tracked:",
+ fspace->ghost_sect_count);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Number of free space section classes:",
- (unsigned)fspace->nclasses);
+ "Number of free space section classes:",
+ (unsigned)fspace->nclasses);
HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth,
- "Shrink percent:",
- fspace->shrink_percent);
+ "Shrink percent:",
+ fspace->shrink_percent);
HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth,
- "Expand percent:",
- fspace->expand_percent);
+ "Expand percent:",
+ fspace->expand_percent);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "# of bits for section address space:",
- fspace->max_sect_addr);
+ "# of bits for section address space:",
+ fspace->max_sect_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Maximum section size:",
- fspace->max_sect_size);
+ "Maximum section size:",
+ fspace->max_sect_size);
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
- "Serialized sections address:",
- fspace->sect_addr);
+ "Serialized sections address:",
+ fspace->sect_addr);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Serialized sections size used:",
- fspace->sect_size);
+ "Serialized sections size used:",
+ fspace->sect_size);
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
- "Serialized sections size allocated:",
- fspace->alloc_sect_size);
+ "Serialized sections size allocated:",
+ fspace->alloc_sect_size);
done:
if(fspace && H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, addr, fspace, H5AC__NO_FLAGS_SET) < 0)
@@ -182,15 +177,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FS_sect_debug
+ * Function: H5FS_sect_debug
*
- * Purpose: Prints debugging info about a free space section.
+ * Purpose: Prints debugging info about a free space section.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 30 2006
+ * Programmer: Quincey Koziol
+ * May 30 2006
*
*-------------------------------------------------------------------------
*/
@@ -221,15 +215,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FS_sects_debug
+ * Function: H5FS_sects_debug
*
- * Purpose: Prints debugging info about the free space sections.
+ * Purpose: Prints debugging info about the free space sections.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * May 9 2006
+ * Programmer: Quincey Koziol
+ * May 9 2006
*
*-------------------------------------------------------------------------
*/
@@ -237,7 +230,7 @@ herr_t
H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *stream, int indent, int fwidth,
haddr_t fs_addr, haddr_t client_addr)
{
- H5FS_t *fspace = NULL; /* Free space header info */
+ H5FS_t *fspace = NULL; /* Free space header info */
H5FS_client_t client; /* The client of the free space */
H5FS_hdr_cache_ud_t cache_udata; /* User-data for cache callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -266,7 +259,7 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
* Load the free space header.
*/
if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC__READ_ONLY_FLAG)))
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, FAIL, "unable to load free space header")
/* Retrieve the client id */
client = fspace->client;
@@ -292,8 +285,8 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, FILE *str
break;
case H5FS_CLIENT_FILE_ID:
- if(H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections")
+ if(H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections")
break;
case H5FS_NUM_CLIENT_ID: