2005-02-04 03:59:05 +08:00
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
|
* Copyright by The HDF Group. *
|
2005-02-04 03:59:05 +08:00
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
|
* All rights reserved. *
|
|
|
|
|
* *
|
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
2017-04-18 03:32:16 +08:00
|
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
|
|
|
|
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
|
|
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
|
* help@hdfgroup.org. *
|
2005-02-04 03:59:05 +08:00
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
|
|
|
|
* Created: H5B2dbg.c
|
|
|
|
|
* Feb 2 2005
|
|
|
|
|
* Quincey Koziol <koziol@ncsa.uiuc.edu>
|
|
|
|
|
*
|
|
|
|
|
* Purpose: Dump debugging information about a v2 B-tree.
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Module Setup */
|
|
|
|
|
/****************/
|
|
|
|
|
|
2015-09-14 11:58:59 +08:00
|
|
|
|
#include "H5B2module.h" /* This source code file is part of the H5B2 module */
|
|
|
|
|
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/***********/
|
|
|
|
|
/* Headers */
|
|
|
|
|
/***********/
|
2005-02-04 03:59:05 +08:00
|
|
|
|
#include "H5private.h" /* Generic Functions */
|
2006-03-12 05:57:18 +08:00
|
|
|
|
#include "H5B2pkg.h" /* v2 B-trees */
|
2005-02-04 03:59:05 +08:00
|
|
|
|
#include "H5Eprivate.h" /* Error handling */
|
|
|
|
|
#include "H5FLprivate.h" /* Free Lists */
|
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/****************/
|
|
|
|
|
/* Local Macros */
|
|
|
|
|
/****************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************/
|
|
|
|
|
/* Local Typedefs */
|
|
|
|
|
/******************/
|
|
|
|
|
|
|
|
|
|
|
2006-03-16 04:16:04 +08:00
|
|
|
|
/********************/
|
|
|
|
|
/* Package Typedefs */
|
|
|
|
|
/********************/
|
|
|
|
|
|
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/********************/
|
|
|
|
|
/* Local Prototypes */
|
|
|
|
|
/********************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*********************/
|
|
|
|
|
/* Package Variables */
|
|
|
|
|
/*********************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************/
|
|
|
|
|
/* Library Private Variables */
|
|
|
|
|
/*****************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*******************/
|
|
|
|
|
/* Local Variables */
|
|
|
|
|
/*******************/
|
|
|
|
|
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2015-05-15 09:46:00 +08:00
|
|
|
|
* Function: H5B2__hdr_debug
|
2005-02-04 03:59:05 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Prints debugging info about a B-tree header.
|
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
|
|
|
|
* koziol@ncsa.uiuc.edu
|
|
|
|
|
* Feb 2 2005
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
herr_t
|
2018-03-16 05:54:30 +08:00
|
|
|
|
H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
const H5B2_class_t *type, haddr_t obj_addr)
|
2005-02-04 03:59:05 +08:00
|
|
|
|
{
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
H5B2_hdr_t *hdr = NULL; /* B-tree header info */
|
2006-09-06 04:53:16 +08:00
|
|
|
|
unsigned u; /* Local index variable */
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
char temp_str[128]; /* Temporary string, for formatting */
|
2006-02-27 11:30:22 +08:00
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
2015-05-15 09:46:00 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check arguments.
|
|
|
|
|
*/
|
2006-02-27 11:30:22 +08:00
|
|
|
|
HDassert(f);
|
|
|
|
|
HDassert(H5F_addr_defined(addr));
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
HDassert(H5F_addr_defined(obj_addr));
|
2006-02-27 11:30:22 +08:00
|
|
|
|
HDassert(stream);
|
|
|
|
|
HDassert(indent >= 0);
|
|
|
|
|
HDassert(fwidth >= 0);
|
2006-03-05 06:38:37 +08:00
|
|
|
|
HDassert(type);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
2015-12-19 22:42:15 +08:00
|
|
|
|
/* Load the B-tree header */
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(NULL == (hdr = H5B2__hdr_protect(f, addr, f, H5AC__READ_ONLY_FLAG)))
|
2018-05-30 05:06:01 +08:00
|
|
|
|
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
/* Set file pointer for this B-tree operation */
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->f = f;
|
2006-02-27 11:30:22 +08:00
|
|
|
|
|
|
|
|
|
/* Print opening message */
|
|
|
|
|
HDfprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Print the values.
|
|
|
|
|
*/
|
[svn-r17740] Description:
Refactor v2 B-tree code to take creation parameters to H5B2_create() as
a struct (instead of individual arguments), call the client's class "cls"
instead of "type" internally, and add client class name to client class struct.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-25 03:16:06 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
|
|
|
|
|
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
|
2015-08-22 11:08:43 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-04 03:59:05 +08:00
|
|
|
|
"Size of node:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->node_size);
|
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-08 09:03:48 +08:00
|
|
|
|
"Size of raw (disk) record:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->rrec_size);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
|
|
|
|
|
"Dirty flag:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->cache_info.is_dirty ? "True" : "False");
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Depth:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->depth);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
|
|
|
|
|
"Number of records in tree:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->root.all_nrec);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Number of records in root node:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->root.node_nrec);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
|
|
|
|
|
"Address of root node:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->root.addr);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Split percent:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->split_percent);
|
2005-02-04 03:59:05 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Merge percent:",
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->merge_percent);
|
2006-09-06 04:53:16 +08:00
|
|
|
|
|
|
|
|
|
/* Print relevant node info */
|
|
|
|
|
HDfprintf(stream, "%*sNode Info: (max_nrec/split_nrec/merge_nrec)\n", indent, "");
|
[svn-r17893] Descrption:
Remove old shim H5B2 routines from refactoring, rename new routines to
old routine names and switch all users of the H5B2 interface back to the old
routine names now that the switch to using the more current open -> <operation>
-> pattern is used for all the H5B2 code. This is the final change before
adding a context to the H5B2 client encode/decode callbacks.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-11-15 11:38:58 +08:00
|
|
|
|
for(u = 0; u < (unsigned)(hdr->depth + 1); u++) {
|
[svn-r20536] Description:
Clean up various warnings & code formatting issues.
Bring changes from Coverity branch to trunk:
r20085:
Purpose: Fix coverity issue 793
Description: Modified H5S_hyper_project_simple_higher() to free the entire span
list in new_space on failure.
r20091:
This is a fix for coverity bug #1683.
Changed the two printfs to use %lu (unsigned long) for printing "dset_size".
r20162:
Purpose: Fix coverity issue 785
Description: Modified H5T_enum_nameof() to free "name" on failure if it was
allocated. Also clarified some code in H5S_hyper_rebuild_helper().
r20189:
Addressed coverity defect 783.
H5SL_new_node() in H5SL.c was failing to free space allocated in its
first alloc if the second alloc failed. Added a call to H5FL_FREE
to address this issue.
This is purely to keep coverity happy -- if this code is ever triggered,
we have much larger problems.
Note that this fix will trigger an unused return value complaint
from coverity next week.
r20190:
Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call.
r20191:
Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN).
r20232:
Addressed coverity issues 923-925. Replaced calls to sprintf with calls
to HDsnprintf.
r20233:
Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c.
r20234:
Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c.
r20271:
Purpose: Fix coverity issue 784
Description: Modified H5_debug_mask() to keep a list of files opened for use as
a debugging output stream, and modified H5_term_library to close these files on
exit.
r20272:
addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing
code was safe, but modified to use strncpy() to keep coverity happy.
r20273:
Addresed coverity issues 1388 and 1389.
Initialized sel_iter->type to NULL in H5S_select_iter_init.
r20275:
Purpose: Fix valgrind issue in mf.c
Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so
the retrieved node gets freed.
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
2011-04-18 02:57:07 +08:00
|
|
|
|
HDsnprintf(temp_str, sizeof(temp_str), "Depth %u:", u);
|
2006-09-06 04:53:16 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s (%u/%u/%u)\n", indent + 3, "", MAX(0, fwidth - 3),
|
|
|
|
|
temp_str,
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->node_info[u].max_nrec, hdr->node_info[u].split_nrec, hdr->node_info[u].merge_nrec);
|
2006-09-06 04:53:16 +08:00
|
|
|
|
} /* end for */
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
|
|
|
|
done:
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
|
2015-12-19 22:42:15 +08:00
|
|
|
|
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release v2 B-tree header")
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2015-05-15 09:46:00 +08:00
|
|
|
|
} /* end H5B2__hdr_debug() */
|
2005-02-04 03:59:05 +08:00
|
|
|
|
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2015-05-15 09:46:00 +08:00
|
|
|
|
* Function: H5B2__int_debug
|
2005-02-08 09:03:48 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Prints debugging info about a B-tree internal node
|
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
|
|
|
|
* koziol@ncsa.uiuc.edu
|
|
|
|
|
* Feb 4 2005
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
herr_t
|
2018-03-16 05:54:30 +08:00
|
|
|
|
H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr)
|
2005-02-08 09:03:48 +08:00
|
|
|
|
{
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
H5B2_hdr_t *hdr = NULL; /* B-tree header */
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
H5B2_internal_t *internal = NULL; /* B-tree internal node */
|
2016-12-03 00:07:04 +08:00
|
|
|
|
H5B2_node_ptr_t node_ptr; /* Fake node pointer for protect */
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
unsigned u; /* Local index variable */
|
|
|
|
|
char temp_str[128]; /* Temporary string, for formatting */
|
2005-02-08 09:03:48 +08:00
|
|
|
|
herr_t ret_value=SUCCEED; /* Return value */
|
|
|
|
|
|
2015-05-15 09:46:00 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check arguments.
|
|
|
|
|
*/
|
2006-03-05 06:38:37 +08:00
|
|
|
|
HDassert(f);
|
|
|
|
|
HDassert(H5F_addr_defined(addr));
|
|
|
|
|
HDassert(stream);
|
|
|
|
|
HDassert(indent >= 0);
|
|
|
|
|
HDassert(fwidth >= 0);
|
|
|
|
|
HDassert(type);
|
|
|
|
|
HDassert(H5F_addr_defined(hdr_addr));
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
HDassert(H5F_addr_defined(obj_addr));
|
2006-03-05 06:38:37 +08:00
|
|
|
|
HDassert(nrec > 0);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
2015-12-19 22:42:15 +08:00
|
|
|
|
/* Load the B-tree header */
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
|
2018-05-30 05:06:01 +08:00
|
|
|
|
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load v2 B-tree header")
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
/* Set file pointer for this B-tree operation */
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->f = f;
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Load the B-tree internal node
|
|
|
|
|
*/
|
2015-05-15 09:46:00 +08:00
|
|
|
|
H5_CHECK_OVERFLOW(depth, unsigned, uint16_t);
|
2016-12-03 00:07:04 +08:00
|
|
|
|
node_ptr.addr = addr;
|
2018-04-06 15:11:18 +08:00
|
|
|
|
H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned)
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, FALSE, H5AC__READ_ONLY_FLAG)))
|
2018-05-30 05:06:01 +08:00
|
|
|
|
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/* Print opening message */
|
2015-08-22 11:08:43 +08:00
|
|
|
|
HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
|
2006-02-27 11:30:22 +08:00
|
|
|
|
|
2005-02-08 09:03:48 +08:00
|
|
|
|
/*
|
|
|
|
|
* Print the values.
|
|
|
|
|
*/
|
[svn-r17740] Description:
Refactor v2 B-tree code to take creation parameters to H5B2_create() as
a struct (instead of individual arguments), call the client's class "cls"
instead of "type" internally, and add client class name to client class struct.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-25 03:16:06 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
|
|
|
|
|
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
|
2015-08-22 11:08:43 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-08 09:03:48 +08:00
|
|
|
|
"Size of node:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->node_size);
|
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-08 09:03:48 +08:00
|
|
|
|
"Size of raw (disk) record:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->rrec_size);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
|
|
|
|
|
"Dirty flag:",
|
|
|
|
|
internal->cache_info.is_dirty ? "True" : "False");
|
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Number of records in node:",
|
|
|
|
|
internal->nrec);
|
|
|
|
|
|
|
|
|
|
/* Print all node pointers and records */
|
2006-03-05 06:38:37 +08:00
|
|
|
|
for(u = 0; u < internal->nrec; u++) {
|
2005-02-08 09:03:48 +08:00
|
|
|
|
/* Print node pointer */
|
[svn-r20536] Description:
Clean up various warnings & code formatting issues.
Bring changes from Coverity branch to trunk:
r20085:
Purpose: Fix coverity issue 793
Description: Modified H5S_hyper_project_simple_higher() to free the entire span
list in new_space on failure.
r20091:
This is a fix for coverity bug #1683.
Changed the two printfs to use %lu (unsigned long) for printing "dset_size".
r20162:
Purpose: Fix coverity issue 785
Description: Modified H5T_enum_nameof() to free "name" on failure if it was
allocated. Also clarified some code in H5S_hyper_rebuild_helper().
r20189:
Addressed coverity defect 783.
H5SL_new_node() in H5SL.c was failing to free space allocated in its
first alloc if the second alloc failed. Added a call to H5FL_FREE
to address this issue.
This is purely to keep coverity happy -- if this code is ever triggered,
we have much larger problems.
Note that this fix will trigger an unused return value complaint
from coverity next week.
r20190:
Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call.
r20191:
Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN).
r20232:
Addressed coverity issues 923-925. Replaced calls to sprintf with calls
to HDsnprintf.
r20233:
Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c.
r20234:
Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c.
r20271:
Purpose: Fix coverity issue 784
Description: Modified H5_debug_mask() to keep a list of files opened for use as
a debugging output stream, and modified H5_term_library to close these files on
exit.
r20272:
addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing
code was safe, but modified to use strncpy() to keep coverity happy.
r20273:
Addresed coverity issues 1388 and 1389.
Initialized sel_iter->type to NULL in H5S_select_iter_init.
r20275:
Purpose: Fix valgrind issue in mf.c
Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so
the retrieved node gets freed.
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
2011-04-18 02:57:07 +08:00
|
|
|
|
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
|
|
|
|
|
temp_str,
|
|
|
|
|
internal->node_ptrs[u].all_nrec,
|
|
|
|
|
internal->node_ptrs[u].node_nrec,
|
|
|
|
|
internal->node_ptrs[u].addr);
|
|
|
|
|
|
|
|
|
|
/* Print record */
|
[svn-r20536] Description:
Clean up various warnings & code formatting issues.
Bring changes from Coverity branch to trunk:
r20085:
Purpose: Fix coverity issue 793
Description: Modified H5S_hyper_project_simple_higher() to free the entire span
list in new_space on failure.
r20091:
This is a fix for coverity bug #1683.
Changed the two printfs to use %lu (unsigned long) for printing "dset_size".
r20162:
Purpose: Fix coverity issue 785
Description: Modified H5T_enum_nameof() to free "name" on failure if it was
allocated. Also clarified some code in H5S_hyper_rebuild_helper().
r20189:
Addressed coverity defect 783.
H5SL_new_node() in H5SL.c was failing to free space allocated in its
first alloc if the second alloc failed. Added a call to H5FL_FREE
to address this issue.
This is purely to keep coverity happy -- if this code is ever triggered,
we have much larger problems.
Note that this fix will trigger an unused return value complaint
from coverity next week.
r20190:
Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call.
r20191:
Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN).
r20232:
Addressed coverity issues 923-925. Replaced calls to sprintf with calls
to HDsnprintf.
r20233:
Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c.
r20234:
Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c.
r20271:
Purpose: Fix coverity issue 784
Description: Modified H5_debug_mask() to keep a list of files opened for use as
a debugging output stream, and modified H5_term_library to close these files on
exit.
r20272:
addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing
code was safe, but modified to use strncpy() to keep coverity happy.
r20273:
Addresed coverity issues 1388 and 1389.
Initialized sel_iter->type to NULL in H5S_select_iter_init.
r20275:
Purpose: Fix valgrind issue in mf.c
Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so
the retrieved node gets freed.
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
2011-04-18 02:57:07 +08:00
|
|
|
|
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
|
|
|
|
|
temp_str);
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
HDassert(H5B2_INT_NREC(internal, hdr, u));
|
2015-12-30 01:06:36 +08:00
|
|
|
|
(void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_INT_NREC(internal, hdr, u), hdr->cb_ctx);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
} /* end for */
|
|
|
|
|
|
|
|
|
|
/* Print final node pointer */
|
[svn-r20536] Description:
Clean up various warnings & code formatting issues.
Bring changes from Coverity branch to trunk:
r20085:
Purpose: Fix coverity issue 793
Description: Modified H5S_hyper_project_simple_higher() to free the entire span
list in new_space on failure.
r20091:
This is a fix for coverity bug #1683.
Changed the two printfs to use %lu (unsigned long) for printing "dset_size".
r20162:
Purpose: Fix coverity issue 785
Description: Modified H5T_enum_nameof() to free "name" on failure if it was
allocated. Also clarified some code in H5S_hyper_rebuild_helper().
r20189:
Addressed coverity defect 783.
H5SL_new_node() in H5SL.c was failing to free space allocated in its
first alloc if the second alloc failed. Added a call to H5FL_FREE
to address this issue.
This is purely to keep coverity happy -- if this code is ever triggered,
we have much larger problems.
Note that this fix will trigger an unused return value complaint
from coverity next week.
r20190:
Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call.
r20191:
Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN).
r20232:
Addressed coverity issues 923-925. Replaced calls to sprintf with calls
to HDsnprintf.
r20233:
Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c.
r20234:
Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c.
r20271:
Purpose: Fix coverity issue 784
Description: Modified H5_debug_mask() to keep a list of files opened for use as
a debugging output stream, and modified H5_term_library to close these files on
exit.
r20272:
addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing
code was safe, but modified to use strncpy() to keep coverity happy.
r20273:
Addresed coverity issues 1388 and 1389.
Initialized sel_iter->type to NULL in H5S_select_iter_init.
r20275:
Purpose: Fix valgrind issue in mf.c
Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so
the retrieved node gets freed.
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
2011-04-18 02:57:07 +08:00
|
|
|
|
HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3),
|
|
|
|
|
temp_str,
|
|
|
|
|
internal->node_ptrs[u].all_nrec,
|
|
|
|
|
internal->node_ptrs[u].node_nrec,
|
|
|
|
|
internal->node_ptrs[u].addr);
|
|
|
|
|
|
|
|
|
|
done:
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
|
2015-12-19 22:42:15 +08:00
|
|
|
|
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release v2 B-tree header")
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(internal && H5AC_unprotect(f, H5AC_BT2_INT, addr, internal, H5AC__NO_FLAGS_SET) < 0)
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree internal node")
|
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2015-05-15 09:46:00 +08:00
|
|
|
|
} /* end H5B2__int_debug() */
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2015-05-15 09:46:00 +08:00
|
|
|
|
* Function: H5B2__leaf_debug
|
2005-02-08 09:03:48 +08:00
|
|
|
|
*
|
|
|
|
|
* Purpose: Prints debugging info about a B-tree leaf node
|
|
|
|
|
*
|
|
|
|
|
* Return: Non-negative on success/Negative on failure
|
|
|
|
|
*
|
|
|
|
|
* Programmer: Quincey Koziol
|
|
|
|
|
* koziol@ncsa.uiuc.edu
|
|
|
|
|
* Feb 7 2005
|
|
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
herr_t
|
2018-03-16 05:54:30 +08:00
|
|
|
|
H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr)
|
2005-02-08 09:03:48 +08:00
|
|
|
|
{
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
H5B2_hdr_t *hdr = NULL; /* B-tree header */
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */
|
2016-12-03 00:07:04 +08:00
|
|
|
|
H5B2_node_ptr_t node_ptr; /* Fake node pointer for protect */
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
unsigned u; /* Local index variable */
|
|
|
|
|
char temp_str[128]; /* Temporary string, for formatting */
|
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
2015-05-15 09:46:00 +08:00
|
|
|
|
FUNC_ENTER_PACKAGE
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Check arguments.
|
|
|
|
|
*/
|
2006-03-05 06:38:37 +08:00
|
|
|
|
HDassert(f);
|
|
|
|
|
HDassert(H5F_addr_defined(addr));
|
|
|
|
|
HDassert(stream);
|
|
|
|
|
HDassert(indent >= 0);
|
|
|
|
|
HDassert(fwidth >= 0);
|
|
|
|
|
HDassert(type);
|
|
|
|
|
HDassert(H5F_addr_defined(hdr_addr));
|
[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
2010-09-16 19:38:10 +08:00
|
|
|
|
HDassert(H5F_addr_defined(obj_addr));
|
2006-03-05 06:38:37 +08:00
|
|
|
|
HDassert(nrec > 0);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
2015-12-19 22:42:15 +08:00
|
|
|
|
/* Load the B-tree header */
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(NULL == (hdr = H5B2__hdr_protect(f, hdr_addr, f, H5AC__READ_ONLY_FLAG)))
|
2018-05-30 05:06:01 +08:00
|
|
|
|
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
[svn-r17649] Description:
Refactor v2 B-trees to pin the B-tree header in the cache instead of
using separate reference counted data structure.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 02:26:50 +08:00
|
|
|
|
/* Set file pointer for this B-tree operation */
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
hdr->f = f;
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Load the B-tree leaf node
|
|
|
|
|
*/
|
2015-05-15 09:46:00 +08:00
|
|
|
|
H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t);
|
2016-12-03 00:07:04 +08:00
|
|
|
|
node_ptr.addr = addr;
|
2018-04-06 15:11:18 +08:00
|
|
|
|
H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned)
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
|
2018-05-30 05:06:01 +08:00
|
|
|
|
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|
2006-02-27 11:30:22 +08:00
|
|
|
|
/* Print opening message */
|
|
|
|
|
HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
|
|
|
|
|
|
2005-02-08 09:03:48 +08:00
|
|
|
|
/*
|
|
|
|
|
* Print the values.
|
|
|
|
|
*/
|
[svn-r17740] Description:
Refactor v2 B-tree code to take creation parameters to H5B2_create() as
a struct (instead of individual arguments), call the client's class "cls"
instead of "type" internally, and add client class name to client class struct.
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-25 03:16:06 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s (%u)\n", indent, "", fwidth,
|
|
|
|
|
"Tree type ID:", hdr->cls->name, (unsigned)hdr->cls->id);
|
2015-08-22 11:08:43 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-08 09:03:48 +08:00
|
|
|
|
"Size of node:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->node_size);
|
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
2005-02-08 09:03:48 +08:00
|
|
|
|
"Size of raw (disk) record:",
|
2015-08-22 11:08:43 +08:00
|
|
|
|
(unsigned)hdr->rrec_size);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
|
|
|
|
|
"Dirty flag:",
|
|
|
|
|
leaf->cache_info.is_dirty ? "True" : "False");
|
|
|
|
|
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
|
|
|
|
|
"Number of records in node:",
|
|
|
|
|
leaf->nrec);
|
|
|
|
|
|
|
|
|
|
/* Print all node pointers and records */
|
2006-03-05 06:38:37 +08:00
|
|
|
|
for(u = 0; u < leaf->nrec; u++) {
|
2005-02-08 09:03:48 +08:00
|
|
|
|
/* Print record */
|
[svn-r20536] Description:
Clean up various warnings & code formatting issues.
Bring changes from Coverity branch to trunk:
r20085:
Purpose: Fix coverity issue 793
Description: Modified H5S_hyper_project_simple_higher() to free the entire span
list in new_space on failure.
r20091:
This is a fix for coverity bug #1683.
Changed the two printfs to use %lu (unsigned long) for printing "dset_size".
r20162:
Purpose: Fix coverity issue 785
Description: Modified H5T_enum_nameof() to free "name" on failure if it was
allocated. Also clarified some code in H5S_hyper_rebuild_helper().
r20189:
Addressed coverity defect 783.
H5SL_new_node() in H5SL.c was failing to free space allocated in its
first alloc if the second alloc failed. Added a call to H5FL_FREE
to address this issue.
This is purely to keep coverity happy -- if this code is ever triggered,
we have much larger problems.
Note that this fix will trigger an unused return value complaint
from coverity next week.
r20190:
Fixed Coverity issues 1561 1565 and 1678 (UNUSED_VALUES) by moving checks of return values to after the function call.
r20191:
Fixed coverity issues 643 644 and 1678 (CHECKED_RETURN).
r20232:
Addressed coverity issues 923-925. Replaced calls to sprintf with calls
to HDsnprintf.
r20233:
Fix coverity issue 662. Don't try to sort 0 attributes in H5Aint.c.
r20234:
Fix coverity issue 664. Check for NULL before dereferencing in H5Gdeprec.c.
r20271:
Purpose: Fix coverity issue 784
Description: Modified H5_debug_mask() to keep a list of files opened for use as
a debugging output stream, and modified H5_term_library to close these files on
exit.
r20272:
addressed coverity issues 838 & 955. Issue was use of strcpy() -- existing
code was safe, but modified to use strncpy() to keep coverity happy.
r20273:
Addresed coverity issues 1388 and 1389.
Initialized sel_iter->type to NULL in H5S_select_iter_init.
r20275:
Purpose: Fix valgrind issue in mf.c
Description: Fixed bug (incomplete if statement) in test_mf_fs_alloc_free() so
the retrieved node gets freed.
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
2011-04-18 02:57:07 +08:00
|
|
|
|
HDsnprintf(temp_str, sizeof(temp_str), "Record #%u:", u);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDfprintf(stream, "%*s%-*s\n", indent + 3, "", MAX(0, fwidth - 3),
|
|
|
|
|
temp_str);
|
[svn-r17658] Description:
Rename 'H5B2_t' -> 'H5B2_hdr_t' and 'bt2' -> 'hdr' in preparation for
make v2 B-tree open/close routines library private (instead of static).
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 (smirom) 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, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.1 (amazon) in debug mode
Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-10-16 07:16:43 +08:00
|
|
|
|
HDassert(H5B2_LEAF_NREC(leaf, hdr, u));
|
2015-12-30 01:06:36 +08:00
|
|
|
|
(void)(type->debug)(stream, indent + 6, MAX (0, fwidth-6), H5B2_LEAF_NREC(leaf, hdr, u), hdr->cb_ctx);
|
2005-02-08 09:03:48 +08:00
|
|
|
|
} /* end for */
|
|
|
|
|
|
|
|
|
|
done:
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0)
|
2015-12-19 22:42:15 +08:00
|
|
|
|
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
|
2018-03-16 05:54:30 +08:00
|
|
|
|
if(leaf && H5AC_unprotect(f, H5AC_BT2_LEAF, addr, leaf, H5AC__NO_FLAGS_SET) < 0)
|
2005-02-08 09:03:48 +08:00
|
|
|
|
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree leaf node")
|
|
|
|
|
|
|
|
|
|
FUNC_LEAVE_NOAPI(ret_value)
|
2015-05-15 09:46:00 +08:00
|
|
|
|
} /* end H5B2__leaf_debug() */
|
2005-02-08 09:03:48 +08:00
|
|
|
|
|