Lines Matching refs:oh

93 H5O_assert(const H5O_t *oh)  in H5O_assert()  argument
108 … meta_space = (size_t)H5O_SIZEOF_HDR(oh) + (size_t)(H5O_SIZEOF_CHKHDR_OH(oh) * (oh->nchunks - 1)); in H5O_assert()
113 for(u = 0; u < oh->nchunks; u++) { in H5O_assert()
115 hdr_size += oh->chunk[u].size; in H5O_assert()
118 free_space += oh->chunk[u].gap; in H5O_assert()
121 HDassert(oh->chunk[u].image); in H5O_assert()
122 HDassert(oh->chunk[u].size > (size_t)H5O_SIZEOF_CHKHDR_OH(oh)); in H5O_assert()
125 HDassert(H5F_addr_defined(oh->chunk[u].addr)); in H5O_assert()
128 if(oh->version > H5O_VERSION_1) { in H5O_assert()
130 …HDassert(!HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC)); in H5O_assert()
133 HDassert(oh->chunk[u].gap < (size_t)H5O_SIZEOF_MSGHDR_OH(oh)); in H5O_assert()
137 HDassert(oh->chunk[u].gap == 0); in H5O_assert()
141 if(oh->version > H5O_VERSION_1) { in H5O_assert()
142 uint64_t chunk0_size = oh->chunk[0].size - (size_t)H5O_SIZEOF_HDR(oh); in H5O_assert()
145 HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_1); in H5O_assert()
147 HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_2); in H5O_assert()
149 HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_4); in H5O_assert()
151 HDassert((oh->flags & H5O_HDR_CHUNK0_SIZE) == H5O_HDR_CHUNK0_8); in H5O_assert()
155 for(u = 0, curr_msg = &oh->mesg[0]; u < oh->nmesgs; u++, curr_msg++) { in H5O_assert()
159 curr_hdr = curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh); in H5O_assert()
160 curr_tot_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh); in H5O_assert()
176 for(v = 0; v < oh->nchunks; v++) { in H5O_assert()
177 if(H5F_addr_eq(cont->addr, oh->chunk[v].addr) && cont->size == oh->chunk[v].size) { in H5O_assert()
188 meta_space += (size_t)H5O_SIZEOF_MSGHDR_OH(oh); in H5O_assert()
196 HDassert(curr_msg->chunkno < oh->nchunks); in H5O_assert()
200 HDassert(oh->chunk[curr_msg->chunkno].gap == 0); in H5O_assert()
203 …HDassert(curr_tot_size <= (oh->chunk[curr_msg->chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->ch… in H5O_assert()
205 …HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_HDR(oh) - H5O_SIZEOF_CHKSUM_… in H5O_assert()
207 …HDassert(curr_hdr >= oh->chunk[curr_msg->chunkno].image + (H5O_SIZEOF_CHKHDR_OH(oh) - H5O_SIZEOF_C… in H5O_assert()
208 … curr_msg->raw_size <= (oh->chunk[curr_msg->chunkno].image + oh->chunk[curr_msg->chunkno].size) - … in H5O_assert()
211 for(v = 0, tmp_msg = &oh->mesg[0]; v < oh->nmesgs; v++, tmp_msg++) { in H5O_assert()
213 HDassert(!((tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) >= curr_hdr in H5O_assert()
214 && (tmp_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh)) in H5O_assert()
220 HDassert(oh->nchunks == (cont_msgs_found + 1)); in H5O_assert()
290 H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth) in H5O_debug_real() argument
301 HDassert(oh); in H5O_debug_real()
312 oh->cache_info.is_dirty); in H5O_debug_real()
315 oh->version); in H5O_debug_real()
318 (unsigned)H5O_SIZEOF_HDR(oh)); in H5O_debug_real()
321 oh->nlink); in H5O_debug_real()
324 if(oh->version > H5O_VERSION_1) { in H5O_debug_real()
328 (oh->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED) ? "Yes" : "No"); in H5O_debug_real()
331 (oh->flags & H5O_HDR_ATTR_CRT_ORDER_INDEXED) ? "Yes" : "No"); in H5O_debug_real()
334 (oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? "Non-default" : "Default"); in H5O_debug_real()
337 (oh->flags & H5O_HDR_STORE_TIMES) ? "Enabled" : "Disabled"); in H5O_debug_real()
338 if(oh->flags & ~H5O_HDR_ALL_FLAGS) in H5O_debug_real()
340 (unsigned)oh->flags); in H5O_debug_real()
343 if(oh->flags & H5O_HDR_STORE_TIMES) { in H5O_debug_real()
348 tm = HDlocaltime(&oh->atime); in H5O_debug_real()
352 tm = HDlocaltime(&oh->mtime); in H5O_debug_real()
356 tm = HDlocaltime(&oh->ctime); in H5O_debug_real()
360 tm = HDlocaltime(&oh->btime); in H5O_debug_real()
367 if(oh->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) { in H5O_debug_real()
370 (unsigned)oh->max_compact); in H5O_debug_real()
373 (unsigned)oh->min_dense); in H5O_debug_real()
379 oh->nmesgs, oh->alloc_nmesgs); in H5O_debug_real()
382 oh->nchunks, oh->alloc_nchunks); in H5O_debug_real()
385 for(i = 0, chunk_total = 0; i < oh->nchunks; i++) { in H5O_debug_real()
392 oh->chunk[i].addr); in H5O_debug_real()
396 if(H5F_addr_ne(oh->chunk[i].addr, addr)) in H5O_debug_real()
398 chunk_size = oh->chunk[i].size - (size_t)H5O_SIZEOF_HDR(oh); in H5O_debug_real()
401 chunk_size = oh->chunk[i].size; in H5O_debug_real()
405 gap_total += oh->chunk[i].gap; in H5O_debug_real()
413 oh->chunk[i].gap); in H5O_debug_real()
419 for(i = 0, mesg_total = 0; i < oh->nmesgs; i++) { in H5O_debug_real()
424 mesg_total += (size_t)H5O_SIZEOF_MSGHDR_OH(oh) + oh->mesg[i].raw_size; in H5O_debug_real()
427 if (oh->mesg[i].type->id == H5O_CONT_ID) in H5O_debug_real()
428 mesg_total += H5O_SIZEOF_CHKHDR_OH(oh); in H5O_debug_real()
433 if(oh->mesg[i].type->id >= (int)NELMTS(H5O_msg_class_g)) { in H5O_debug_real()
435 oh->mesg[i].type->id); in H5O_debug_real()
443 (unsigned) (oh->mesg[i].type->id), in H5O_debug_real()
444 oh->mesg[i].type->name, in H5O_debug_real()
445 sequence[oh->mesg[i].type->id]++); in H5O_debug_real()
448 oh->mesg[i].dirty); in H5O_debug_real()
451 if(oh->mesg[i].flags) { in H5O_debug_real()
457 if(oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) { in H5O_debug_real()
461 if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) { in H5O_debug_real()
465 if(oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) { in H5O_debug_real()
469 if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) { in H5O_debug_real()
473 if(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) { in H5O_debug_real()
477 if(oh->mesg[i].flags & H5O_MSG_FLAG_WAS_UNKNOWN) { in H5O_debug_real()
478 HDassert(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN); in H5O_debug_real()
482 if(oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) { in H5O_debug_real()
486 if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) { in H5O_debug_real()
493 if(oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS) in H5O_debug_real()
496 oh->mesg[i].flags & ~H5O_MSG_FLAG_BITS); in H5O_debug_real()
502 oh->mesg[i].chunkno); in H5O_debug_real()
503 chunkno = oh->mesg[i].chunkno; in H5O_debug_real()
504 if(chunkno >= oh->nchunks) in H5O_debug_real()
508 (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), in H5O_debug_real()
509 oh->mesg[i].raw_size); in H5O_debug_real()
512 if((oh->mesg[i].raw + oh->mesg[i].raw_size > in H5O_debug_real()
513 oh->chunk[chunkno].image + oh->chunk[chunkno].size) || in H5O_debug_real()
514 (oh->mesg[i].raw < oh->chunk[chunkno].image)) in H5O_debug_real()
518 debug_type = oh->mesg[i].type; in H5O_debug_real()
519 if(NULL == oh->mesg[i].native && debug_type->decode) in H5O_debug_real()
520 H5O_LOAD_NATIVE(f, H5O_DECODEIO_NOCHANGE, oh, &oh->mesg[i], FAIL) in H5O_debug_real()
525 if(debug_type->debug && oh->mesg[i].native != NULL) in H5O_debug_real()
526 (debug_type->debug)(f, oh->mesg[i].native, stream, indent + 6, MAX(0, fwidth - 6)); in H5O_debug_real()
559 H5O_t *oh = NULL; /* Object header to display */ in H5O_debug() local
577 if(NULL == (oh = H5O_protect(&loc, H5AC__READ_ONLY_FLAG, FALSE))) in H5O_debug()
581 H5O_debug_real(f, oh, addr, stream, indent, fwidth); in H5O_debug()
584 if(oh && H5O_unprotect(&loc, oh, H5AC__NO_FLAGS_SET) < 0) in H5O_debug()