diff options
Diffstat (limited to 'src/H5FSdbg.c')
-rw-r--r-- | src/H5FSdbg.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index b5d2a6f..cf165ca 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -30,6 +30,7 @@ #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 */ @@ -38,6 +39,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5FSpkg.h" /* File free space */ #include "H5HFprivate.h" /* Fractal heaps */ +#include "H5MFprivate.h" /* File memory management */ /****************/ /* Local Macros */ @@ -85,6 +87,10 @@ * koziol@ncsa.uiuc.edu * May 9 2006 * + * Modifications: + * Vailin Choi, July 29th, 2008 + * Add H5FS_CLIENT_FILE_ID for File Memory Management + * *------------------------------------------------------------------------- */ herr_t @@ -124,7 +130,8 @@ H5FS_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Free space client:", - (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" : "Unknown")); + (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" : + (fspace->client == H5FS_CLIENT_FILE_ID ? "File Memory Management" : "Unknown"))); HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Total free space tracked:", fspace->tot_space); @@ -259,7 +266,10 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int client = fspace->client; /* Release the free space header */ - if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__NO_FLAGS_SET) < 0) + /* (set the "deleted" flag for the unprotect, so the cache entry is removed + * and reloaded later, with the correct client information -QAK) + */ + if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fs_addr, fspace, H5AC__DELETED_FLAG) < 0) HDONE_ERROR(H5E_FSPACE, H5E_PROTECT, FAIL, "unable to release free space header") fspace = NULL; @@ -275,6 +285,13 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump fractal heap free space sections") break; + case H5FS_CLIENT_FILE_ID: +#ifdef NOT_YET + if(H5MF_sects_debug(f, dxpl_id, client_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0) + HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections") +#endif /* NOT_YET */ + break; + default: HDfprintf(stream, "Unknown client!\n"); break; |