diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-16 11:38:10 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-09-16 11:38:10 (GMT) |
commit | e5575571d4faaee78c67fc7dbae7d8229b1bfb94 (patch) | |
tree | 85d7b94bbf3fceac4a5c1cc7cdb27031612d5267 /src | |
parent | aa0772d9b2f5349d703e769b8c60515cf1bb1946 (diff) | |
download | hdf5-e5575571d4faaee78c67fc7dbae7d8229b1bfb94.zip hdf5-e5575571d4faaee78c67fc7dbae7d8229b1bfb94.tar.gz hdf5-e5575571d4faaee78c67fc7dbae7d8229b1bfb94.tar.bz2 |
[svn-r19396] Description:
Bring back various modifications to the v2 B-trees that were introduced
in the revise_chunks branch but aren't dependent on any file format or API
changes.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'src')
-rw-r--r-- | src/H5B2.c | 4 | ||||
-rw-r--r-- | src/H5B2dbg.c | 19 | ||||
-rw-r--r-- | src/H5B2pkg.h | 6 | ||||
-rw-r--r-- | src/H5B2private.h | 14 | ||||
-rw-r--r-- | src/H5B2test.c | 1 | ||||
-rw-r--r-- | src/H5HFbtree2.c | 1 | ||||
-rw-r--r-- | src/H5Olayout.c | 5 | ||||
-rwxr-xr-x | src/H5SMbtree2.c | 1 |
8 files changed, 26 insertions, 25 deletions
@@ -90,10 +90,10 @@ const H5B2_class_t *const H5B2_client_class_g[] = { H5HF_HUGE_BT2_DIR, /* 3 - H5B2_FHEAP_HUGE_DIR_ID */ H5HF_HUGE_BT2_FILT_DIR, /* 4 - H5B2_FHEAP_HUGE_FILT_DIR_ID */ H5G_BT2_NAME, /* 5 - H5B2_GRP_DENSE_NAME_ID */ - H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */ + H5G_BT2_CORDER, /* 6 - H5B2_GRP_DENSE_CORDER_ID */ H5SM_INDEX, /* 7 - H5B2_SOHM_INDEX_ID */ H5A_BT2_NAME, /* 8 - H5B2_ATTR_DENSE_NAME_ID */ - H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */ + H5A_BT2_CORDER, /* 9 - H5B2_ATTR_DENSE_CORDER_ID */ }; diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index cf7301d..a7f6819 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -88,7 +88,7 @@ */ herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type) + const H5B2_class_t *type, haddr_t obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header info */ void *dbg_ctx = NULL; /* v2 B-tree debugging context */ @@ -104,6 +104,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, */ HDassert(f); HDassert(H5F_addr_defined(addr)); + HDassert(H5F_addr_defined(obj_addr)); HDassert(stream); HDassert(indent >= 0); HDassert(fwidth >= 0); @@ -114,7 +115,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, /* Check for debugging context callback available */ if(type->crt_dbg_ctx) { /* Create debugging context */ - if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr))) + if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context") } /* end if */ @@ -202,7 +203,7 @@ done: */ herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_internal_t *internal = NULL; /* B-tree internal node */ @@ -226,12 +227,13 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) || (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx)); HDassert(H5F_addr_defined(hdr_addr)); + HDassert(H5F_addr_defined(obj_addr)); HDassert(nrec > 0); /* Check for debugging context callback available */ if(type->crt_dbg_ctx) { /* Create debugging context */ - if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr))) + if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context") } /* end if */ @@ -292,7 +294,7 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, temp_str); HDassert(H5B2_INT_NREC(internal, hdr, u)); (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6), - H5B2_INT_NREC(internal, hdr, u), NULL); + H5B2_INT_NREC(internal, hdr, u), dbg_ctx); } /* end for */ /* Print final node pointer */ @@ -333,7 +335,7 @@ done: */ herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */ @@ -357,12 +359,13 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, HDassert((type->crt_dbg_ctx && type->dst_dbg_ctx) || (NULL == type->crt_dbg_ctx && NULL == type->dst_dbg_ctx)); HDassert(H5F_addr_defined(hdr_addr)); + HDassert(H5F_addr_defined(obj_addr)); HDassert(nrec > 0); /* Check for debugging context callback available */ if(type->crt_dbg_ctx) { /* Create debugging context */ - if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, addr))) + if(NULL == (dbg_ctx = (type->crt_dbg_ctx)(f, dxpl_id, obj_addr))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "unable to create v2 B-tree debugging context") } /* end if */ @@ -412,7 +415,7 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, temp_str); HDassert(H5B2_LEAF_NREC(leaf, hdr, u)); (void)(type->debug)(stream, f, dxpl_id, indent + 6, MAX (0, fwidth-6), - H5B2_LEAF_NREC(leaf, hdr, u), NULL); + H5B2_LEAF_NREC(leaf, hdr, u), dbg_ctx); } /* end for */ done: diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index 543fa3f..b820853 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -346,13 +346,13 @@ H5_DLL herr_t H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, /* Debugging routines for dumping file structures */ H5_DLL herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, - FILE *stream, int indent, int fwidth, const H5B2_class_t *type); + FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t obj_addr); H5_DLL herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B2_class_t *type, - haddr_t hdr_addr, unsigned nrec, unsigned depth); + haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr); H5_DLL herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B2_class_t *type, - haddr_t hdr_addr, unsigned nrec); + haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr); /* Testing routines */ #ifdef H5B2_TESTING diff --git a/src/H5B2private.h b/src/H5B2private.h index 4880ab2..08d3ce1 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -88,13 +88,13 @@ struct H5B2_class_t { /* Extensible array client callback methods */ void *(*crt_context)(void *udata); /* Create context for other client callbacks */ herr_t (*dst_context)(void *ctx); /* Destroy client callback context */ - herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */ - herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */ - herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */ - herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */ - herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */ - int indent, int fwidth, const void *record, const void *udata); - void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */ + herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */ + herr_t (*compare)(const void *rec1, const void *rec2); /* Compare two native records */ + herr_t (*encode)(uint8_t *raw, const void *record, void *ctx); /* Encode record from native form to disk storage form */ + herr_t (*decode)(const uint8_t *raw, void *record, void *ctx); /* Decode record from disk storage form to native form */ + herr_t (*debug)(FILE *stream, const H5F_t *f, hid_t dxpl_id, /* Print a record for debugging */ + int indent, int fwidth, const void *record, const void *ctx); + void *(*crt_dbg_ctx)(H5F_t *f, hid_t dxpl_id, haddr_t obj_addr); /* Create debugging context */ herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ }; diff --git a/src/H5B2test.c b/src/H5B2test.c index a0508fe..8076343 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -333,7 +333,6 @@ H5B2_test_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr) /* Sanity check */ HDassert(f); - HDassert(H5F_addr_defined(addr)); /* Allocate callback context */ if(NULL == (ctx = H5FL_MALLOC(H5B2_test_ctx_t))) diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c index 3f208e7..bce58b7 100644 --- a/src/H5HFbtree2.c +++ b/src/H5HFbtree2.c @@ -287,7 +287,6 @@ H5HF_huge_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED add /* Sanity check */ HDassert(f); - HDassert(H5F_addr_defined(addr)); /* Allocate callback context */ if(NULL == (ctx = H5FL_MALLOC(H5HF_huge_bt2_ctx_t))) diff --git a/src/H5Olayout.c b/src/H5Olayout.c index e413598..4a119ac 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -32,6 +32,9 @@ #include "H5Pprivate.h" /* Property lists */ +/* Local macros */ + + /* PRIVATE PROTOTYPES */ static void *H5O_layout_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); @@ -668,8 +671,6 @@ done: * Programmer: Robb Matzke * Wednesday, October 8, 1997 * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index 95527f9..156a6c5 100755 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -240,7 +240,6 @@ H5SM_bt2_crt_dbg_context(H5F_t *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr) /* Sanity check */ HDassert(f); - HDassert(H5F_addr_defined(addr)); /* Allocate callback context */ if(NULL == (ctx = H5FL_MALLOC(H5SM_bt2_ctx_t))) |