summaryrefslogtreecommitdiffstats
path: root/src/H5B2dbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-08-26 07:26:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-08-26 07:26:07 (GMT)
commitf49a8d1afca48329120460f5092bcb3c37f773b0 (patch)
tree82c0d2a0656f639dded3794e4df7fdc238625488 /src/H5B2dbg.c
parente9889fe2d30c46af826f791eba87a8ed816b60db (diff)
downloadhdf5-f49a8d1afca48329120460f5092bcb3c37f773b0.zip
hdf5-f49a8d1afca48329120460f5092bcb3c37f773b0.tar.gz
hdf5-f49a8d1afca48329120460f5092bcb3c37f773b0.tar.bz2
[svn-r12631] Description:
Refactor the file storage of "twig" nodes in the B-tree to allow them to store more records, increasing the average density of the B-tree 30-40%. Increase # of records in "insert lots" regression test to still create B-tree of depth 4 Update h5debug to interpret difference of 'branch' and 'twig' internal nodes in B-tree correctly. Tested on: FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) Linux/64 2.4 (mir) Solaris/64 2.9 (shanti)
Diffstat (limited to 'src/H5B2dbg.c')
-rw-r--r--src/H5B2dbg.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 6f1799f..c1bea51 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -151,8 +151,11 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
"Address of root node:",
bt2->root.addr);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Max. number of records per internal node:",
- shared->internal_nrec);
+ "Max. number of records per internal 'branch' node:",
+ shared->branch_nrec);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ "Max. number of records per internal 'twig' node:",
+ shared->twig_nrec);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Max. number of records per leaf node:",
shared->leaf_nrec);
@@ -163,14 +166,20 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
"Merge percent:",
shared->merge_percent);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Internal records to split at:",
- shared->split_int_nrec);
+ "Internal 'branch' node records to split at:",
+ shared->split_brch_nrec);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ "Internal 'twig' node records to split at:",
+ shared->split_twig_nrec);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Leaf records to split at:",
shared->split_leaf_nrec);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
- "Internal records to merge at:",
- shared->merge_int_nrec);
+ "Internal 'branch' node records to merge at:",
+ shared->merge_brch_nrec);
+ HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
+ "Internal 'twig' node records to merge at:",
+ shared->merge_twig_nrec);
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Leaf records to merge at:",
shared->merge_leaf_nrec);
@@ -198,7 +207,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)
+ const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth)
{
H5B2_t *bt2 = NULL;
H5B2_internal_t *internal = NULL;
@@ -234,7 +243,7 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
/*
* Load the B-tree internal node
*/
- if(NULL == (internal = H5AC_protect(f, dxpl_id, H5AC_BT2_INT, addr, &nrec, bt2->shared, H5AC_READ)))
+ if(NULL == (internal = H5B2_protect_internal(f, dxpl_id, bt2->shared, addr, nrec, depth, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
/* Release the B-tree header */