summaryrefslogtreecommitdiffstats
path: root/src/H5Odbg.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2009-02-05 15:29:27 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2009-02-05 15:29:27 (GMT)
commitf65a6a6473a1252862bc6370e5351d4d94f6a8d8 (patch)
treeb7ac4334de72aefead4ce8fded07910fccf38085 /src/H5Odbg.c
parent3c67d2972c33045bb81130b21ffe5cdf076bd0a6 (diff)
downloadhdf5-f65a6a6473a1252862bc6370e5351d4d94f6a8d8.zip
hdf5-f65a6a6473a1252862bc6370e5351d4d94f6a8d8.tar.gz
hdf5-f65a6a6473a1252862bc6370e5351d4d94f6a8d8.tar.bz2
[svn-r16436] Checkin for moving messages forward into continuation message:
src/H5Oalloc.c, test/ohdr.c, toshm.c Fixed couple of problems in src/H5Odbg.c.
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: