summaryrefslogtreecommitdiffstats
path: root/src/H5FSdbg.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2012-09-25 21:29:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2012-09-25 21:29:40 (GMT)
commit6edac6e2df7e30807bd41b09765a44c37d1f1bc1 (patch)
treee8d12cb7a41969177179ef7257199862cbe7fd56 /src/H5FSdbg.c
parent6de27c149724322135ad1049e55d2b3f6245a4d7 (diff)
downloadhdf5-6edac6e2df7e30807bd41b09765a44c37d1f1bc1.zip
hdf5-6edac6e2df7e30807bd41b09765a44c37d1f1bc1.tar.gz
hdf5-6edac6e2df7e30807bd41b09765a44c37d1f1bc1.tar.bz2
[svn-r22812] Purpose:
Mainly to add SWMR flush dependencies to the free space manager (H5FS) code. Also fixes a few issues with the local heap and the fixed array code, and brings the MANIFEST up to date. Tested on: jam
Diffstat (limited to 'src/H5FSdbg.c')
-rw-r--r--src/H5FSdbg.c127
1 files changed, 60 insertions, 67 deletions
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index fe3ca71..c1c8c29 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
*
*-------------------------------------------------------------------------
*/
@@ -28,18 +28,18 @@
/* Module Setup */
/****************/
-#define H5FS_PACKAGE /*suppress error about including H5FSpkg */
-#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
-#define H5MF_DEBUGGING /* Need access to file space debugging routines */
+#define H5FS_PACKAGE /* Suppress error about including H5FSpkg */
+#define H5HF_DEBUGGING /* Need access to fractal heap debugging routines */
+#define H5MF_DEBUGGING /* Need access to file space debugging routines */
/***********/
/* 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 */
/****************/
/* Local Macros */
@@ -77,26 +77,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 */
@@ -122,7 +117,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)))
- 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, "");
@@ -131,45 +126,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:",
- fspace->nclasses);
+ "Number of free space section classes:",
+ 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)
@@ -180,15 +175,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
*
*-------------------------------------------------------------------------
*/
@@ -219,15 +213,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
*
*-------------------------------------------------------------------------
*/
@@ -235,7 +228,7 @@ herr_t
H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t 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 */
@@ -264,7 +257,7 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int
* Load the free space header.
*/
if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, &cache_udata, H5AC_READ)))
- 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;
@@ -290,8 +283,8 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int
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: