summaryrefslogtreecommitdiffstats
path: root/src/H5Odbg.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2009-02-16 21:33:04 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2009-02-16 21:33:04 (GMT)
commit61346d50fab0dbaadd313e46cc968d4e4ad26c82 (patch)
treec97b8cd021fdf412cd5d1e13d77088c55136626b /src/H5Odbg.c
parentf023ea68dc0fd97a313c292e9b6f2ea847a50768 (diff)
downloadhdf5-61346d50fab0dbaadd313e46cc968d4e4ad26c82.zip
hdf5-61346d50fab0dbaadd313e46cc968d4e4ad26c82.tar.gz
hdf5-61346d50fab0dbaadd313e46cc968d4e4ad26c82.tar.bz2
[svn-r16487] Checkin for moving messages forward into continuation message:
src/H5Oalloc.c, test/ohdr.c, toshm.c Fixed couple of problems in src/H5Odbg.c. h5committested.
Diffstat (limited to 'src/H5Odbg.c')
-rw-r--r--src/H5Odbg.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index 8a8b783..cd041e0 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -270,12 +270,16 @@ done:
* matzke@llnl.gov
* Aug 6 1997
*
+ * Modifications:
+ * Feb. 2009: Vailin Choi
+ * Fixed bug in the accumulation of chunk_total
+ * Used the appropriate flag when printing creation order tracked/indexed
*-------------------------------------------------------------------------
*/
herr_t
H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth)
{
- size_t mesg_total = 0, chunk_total = 0;
+ size_t mesg_total = 0, chunk_total = 0, gap_total = 0;
unsigned *sequence;
unsigned i; /* Local index variable */
herr_t ret_value = SUCCEED;
@@ -311,10 +315,10 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
/* Display object's status flags */
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Attribute creation order tracked:",
- (oh->flags & H5P_CRT_ORDER_TRACKED) ? "Yes" : "No");
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No");
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Attribute creation order indexed:",
- (oh->flags & H5P_CRT_ORDER_INDEXED) ? "Yes" : "No");
+ (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No");
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Attribute storage phase change values:",
(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default");
@@ -392,6 +396,7 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
/* Accumulate chunk's size to total */
chunk_total += chunk_size;
+ gap_total += oh->chunk[i].gap;
HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Size in bytes:",
@@ -412,6 +417,10 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
/* Accumulate message's size to total */
mesg_total += H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[i].raw_size;
+ /* For version 2 object header, add size of "OCHK" for continuation chunk */
+ if (oh->mesg[i].type->id == H5O_CONT_ID)
+ mesg_total += H5O_SIZEOF_CHKHDR_OH(oh);
+
HDfprintf(stream, "%*sMessage %d...\n", indent, "", i);
/* check for bad message id */
@@ -501,7 +510,7 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
} /* end for */
sequence = (unsigned *)H5MM_xfree(sequence);
- if(mesg_total != chunk_total)
+ if((mesg_total + gap_total) != chunk_total)
HDfprintf(stream, "*** TOTAL SIZE DOES NOT MATCH ALLOCATED SIZE!\n");
done: