summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt10
-rw-r--r--src/H5AC.c2
-rw-r--r--src/H5ACmpio.c14
-rw-r--r--src/H5ACpkg.h4
-rw-r--r--src/H5ACprivate.h2
-rw-r--r--src/H5C.c86
-rw-r--r--src/H5Cmpio.c48
-rw-r--r--src/H5Cpkg.h20
-rw-r--r--src/H5Cprivate.h36
-rw-r--r--src/H5Ctag.c4
-rw-r--r--src/H5EAprivate.h4
11 files changed, 114 insertions, 116 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a835ebd..9feda96 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1209,10 +1209,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
-#all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z"
-option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
-
#-----------------------------------------------------------------------------
# Add H5Tinit source to build - generated by H5detect/CMake at configure time
#-----------------------------------------------------------------------------
@@ -1235,7 +1231,8 @@ if (NOT ONLY_SHARED_LIBS)
${HDF_EXTRA_FLAGS}
PRIVATE
$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:${HDF5_DEBUG_APIS}>
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
)
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_LIB_TARGET}
@@ -1277,7 +1274,8 @@ if (BUILD_SHARED_LIBS)
PRIVATE
$<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:H5_HAVE_THREADSAFE>
$<$<BOOL:${HDF5_ENABLE_TRACE}>:H5_DEBUG_API> # Enable tracing of the API
- $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:H5Z_DEBUG;H5T_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG>
+ $<$<BOOL:${HDF5_ENABLE_DEBUG_APIS}>:${HDF5_DEBUG_APIS}>
+ $<$<CONFIG:Developer>:${HDF5_DEVELOPER_DEFS}>
)
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_LIBSH_TARGET}
diff --git a/src/H5AC.c b/src/H5AC.c
index 593193d..a51a49b 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -287,7 +287,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co
aux_ptr->dirty_bytes_threshold = H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD;
aux_ptr->dirty_bytes = 0;
aux_ptr->metadata_write_strategy = H5AC__DEFAULT_METADATA_WRITE_STRATEGY;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->dirty_bytes_propagations = 0;
aux_ptr->unprotect_dirty_bytes = 0;
aux_ptr->unprotect_dirty_bytes_updates = 0;
diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c
index a64c4a4..7c77a94 100644
--- a/src/H5ACmpio.c
+++ b/src/H5ACmpio.c
@@ -763,7 +763,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTINSERT, FAIL, "can't insert entry into dirty entry slist.")
aux_ptr->dirty_bytes += entry_ptr->size;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->unprotect_dirty_bytes += entry_ptr->size;
aux_ptr->unprotect_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
@@ -778,7 +778,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr)
} /* end if */
else {
aux_ptr->dirty_bytes += entry_ptr->size;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->unprotect_dirty_bytes += entry_ptr->size;
aux_ptr->unprotect_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
@@ -976,7 +976,7 @@ H5AC__log_inserted_entry(const H5AC_info_t *entry_ptr)
aux_ptr->dirty_bytes += entry_ptr->size;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->insert_dirty_bytes += entry_ptr->size;
aux_ptr->insert_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
@@ -1093,7 +1093,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
aux_ptr->dirty_bytes += entry_size;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->move_dirty_bytes += entry_size;
aux_ptr->move_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
@@ -1106,7 +1106,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr)
else if (!entry_dirty) {
aux_ptr->dirty_bytes += entry_size;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->move_dirty_bytes += entry_size;
aux_ptr->move_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
@@ -2117,7 +2117,7 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op)
HDassert((sync_point_op == H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN) ||
(sync_point_op == H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED));
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
HDfprintf(stdout, "%d:H5AC_propagate...:%u: (u/uu/i/iu/m/mu) = %zu/%u/%zu/%u/%zu/%u\n", aux_ptr->mpi_rank,
aux_ptr->dirty_bytes_propagations, aux_ptr->unprotect_dirty_bytes,
aux_ptr->unprotect_dirty_bytes_updates, aux_ptr->insert_dirty_bytes,
@@ -2180,7 +2180,7 @@ H5AC__run_sync_point(H5F_t *f, int sync_point_op)
/* reset the dirty bytes count */
aux_ptr->dirty_bytes = 0;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
aux_ptr->dirty_bytes_propagations += 1;
aux_ptr->unprotect_dirty_bytes = 0;
aux_ptr->unprotect_dirty_bytes_updates = 0;
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h
index 704788f..4de3d61 100644
--- a/src/H5ACpkg.h
+++ b/src/H5ACpkg.h
@@ -51,7 +51,7 @@ H5FL_EXTERN(H5AC_aux_t);
/* Package Private Macros */
/**************************/
-#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
+/* #define H5AC_DEBUG_DIRTY_BYTES_CREATION */
#ifdef H5_HAVE_PARALLEL
@@ -373,7 +373,7 @@ typedef struct H5AC_aux_t {
int32_t metadata_write_strategy;
-#if H5AC_DEBUG_DIRTY_BYTES_CREATION
+#ifdef H5AC_DEBUG_DIRTY_BYTES_CREATION
unsigned dirty_bytes_propagations;
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 67a310b..0e0c80c 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -125,7 +125,7 @@ typedef enum {
#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
/* Check if we are sanity checking tagging */
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
#define H5AC_DO_TAGGING_SANITY_CHECKS 1
#else
#define H5AC_DO_TAGGING_SANITY_CHECKS 0
diff --git a/src/H5C.c b/src/H5C.c
index 907b076..a62bdf8 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -361,7 +361,7 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
* slist_ptr initialized above.
*/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
cache_ptr->slist_len_increase = 0;
cache_ptr->slist_size_increase = 0;
#endif /* H5C_DO_SANITY_CHECKS */
@@ -843,7 +843,7 @@ H5C_dest(H5F_t *f)
H5MM_xfree(cache_ptr->log_info);
#ifndef NDEBUG
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->get_entry_ptr_from_addr_counter > 0) {
@@ -953,7 +953,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
HDassert(type);
HDassert(H5F_addr_defined(addr));
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -988,7 +988,7 @@ H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flag
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "can't flush entry")
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_lru_list(cache_ptr) < 0)
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "LRU extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -1046,7 +1046,7 @@ done:
herr_t
H5C_flush_cache(H5F_t *f, unsigned flags)
{
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
int i;
uint32_t index_len = 0;
size_t index_size = (size_t)0;
@@ -1069,7 +1069,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(cache_ptr->slist_ptr);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
@@ -1095,7 +1095,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
HDassert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -1269,7 +1269,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
HDassert(H5F_addr_defined(addr));
HDassert(thing);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
/* no need to verify that entry is not already in the index as */
/* we already make that check below. */
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
@@ -1461,7 +1461,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed just before done")
@@ -1500,7 +1500,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
#endif
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
@@ -1825,7 +1825,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
HDassert(H5F_addr_defined(new_addr));
HDassert(H5F_addr_ne(old_addr, new_addr));
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -1931,7 +1931,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr)
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
@@ -1978,7 +1978,7 @@ H5C_resize_entry(void *thing, size_t new_size)
if (!(entry_ptr->is_pinned || entry_ptr->is_protected))
HGOTO_ERROR(H5E_CACHE, H5E_BADTYPE, FAIL, "Entry isn't pinned or protected??")
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) || (H5C_validate_pinned_entry_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2074,7 +2074,7 @@ H5C_resize_entry(void *thing, size_t new_size)
} /* end if */
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) || (H5C_validate_pinned_entry_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
@@ -2114,7 +2114,7 @@ H5C_pin_protected_entry(void *thing)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -2129,7 +2129,7 @@ H5C_pin_protected_entry(void *thing)
HGOTO_ERROR(H5E_CACHE, H5E_CANTPIN, FAIL, "Can't pin entry by client")
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
@@ -2193,7 +2193,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
HDassert(type->mem_type == cache_ptr->class_table_ptr[type->id]->mem_type);
HDassert(H5F_addr_defined(addr));
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on entry")
@@ -2298,7 +2298,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
} /* end if */
#endif /* H5_HAVE_PARALLEL */
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
{
/* Verify tag value */
if (cache_ptr->ignore_tags != TRUE) {
@@ -2581,7 +2581,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
#endif /* H5_HAVE_PARALLEL */
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, NULL, "an extreme sanity check failed on exit")
@@ -3056,7 +3056,7 @@ H5C_unpin_entry(void *_entry_ptr)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -3067,7 +3067,7 @@ H5C_unpin_entry(void *_entry_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry from client")
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
@@ -3235,7 +3235,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
dirtied |= entry_ptr->dirtied;
was_clean = !(entry_ptr->is_dirty);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
@@ -3502,7 +3502,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
@@ -4143,7 +4143,7 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
{
herr_t ret_value = SUCCEED; /* Return value */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
FUNC_ENTER_PACKAGE
#else
FUNC_ENTER_PACKAGE_NOERR
@@ -4164,7 +4164,7 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, hbool_t up
/* Update the stats for an unpin operation */
H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
done:
#endif
FUNC_LEAVE_NOAPI(ret_value)
@@ -5326,7 +5326,7 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
HDassert(cache_ptr->slist_ptr);
HDassert(cache_ptr->slist_enabled);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
{
int32_t i;
uint32_t index_len = 0;
@@ -5503,7 +5503,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
H5SL_node_t *node_ptr = NULL;
H5C_cache_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *next_entry_ptr = NULL;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
uint32_t initial_slist_len = 0;
size_t initial_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
@@ -5585,7 +5585,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
* that the slist will not be empty after we finish the scan.
*/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* Depending on circumstances, H5C__flush_single_entry() will
* remove dirty entries from the slist as it flushes them.
* Thus for sanity checks we must make note of the initial
@@ -5761,7 +5761,7 @@ H5C__flush_invalidate_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
} /* end if */
} /* end while loop scanning skip list */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* It is possible that entries were added to the slist during
* the scan, either before or after scan pointer. The following
* asserts take this into account.
@@ -6024,7 +6024,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
H5SL_node_t *node_ptr = NULL;
H5C_cache_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *next_entry_ptr = NULL;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
uint32_t initial_slist_len = 0;
size_t initial_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
@@ -6041,7 +6041,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
HDassert(ring > H5C_RING_UNDEFINED);
HDassert(ring < H5C_RING_NTYPES);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
@@ -6082,7 +6082,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
flushed_entries_last_pass = FALSE;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* For sanity checking, try to verify that the skip list has
* the expected size and number of entries at the end of each
* internal while loop (see below).
@@ -6255,7 +6255,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
} /* end if */
} /* while ( ( restart_slist_scan ) || ( node_ptr != NULL ) ) */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the slist size and length are as expected. */
HDassert((uint32_t)((int32_t)initial_slist_len + cache_ptr->slist_len_increase) ==
cache_ptr->slist_len);
@@ -6271,7 +6271,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "cache has protected items")
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if (!flush_marked_entries) {
HDassert(cache_ptr->slist_ring_len[ring] == 0);
@@ -6468,7 +6468,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
} /* end if */
/* run initial sanity checks */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if (cache_ptr->slist_enabled) {
if (entry_ptr->in_slist) {
@@ -6569,7 +6569,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
HDassert(entry_ptr->is_dirty);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if ((cache_ptr->check_write_permitted) && (!(cache_ptr->write_permitted)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Write when writes are always forbidden!?!?!")
@@ -7733,7 +7733,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
herr_t
H5C_validate_lru_list(H5C_t *cache_ptr)
{
@@ -7807,7 +7807,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
herr_t
H5C_validate_pinned_entry_list(H5C_t *cache_ptr)
{
@@ -7884,7 +7884,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
herr_t
H5C_validate_protected_entry_list(H5C_t *cache_ptr)
{
@@ -7959,7 +7959,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-#if H5C_DO_SLIST_SANITY_CHECKS
+#ifdef H5C_DO_SLIST_SANITY_CHECKS
hbool_t
H5C_entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr)
{
@@ -8427,7 +8427,7 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t *entry, const H5C_cache_en
herr_t
H5C__serialize_cache(H5F_t *f)
{
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
int i;
uint32_t index_len = 0;
size_t index_size = (size_t)0;
@@ -8450,7 +8450,7 @@ H5C__serialize_cache(H5F_t *f)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(cache_ptr->slist_ptr);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
@@ -8476,7 +8476,7 @@ H5C__serialize_cache(H5F_t *f)
HDassert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index 8103989..2c4d3f8 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -169,7 +169,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
unsigned entries_to_clear[H5C_RING_NTYPES];
haddr_t addr;
H5C_cache_entry_t *entry_ptr = NULL;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
haddr_t last_addr;
#endif /* H5C_DO_SANITY_CHECKS */
#if H5C_APPLY_CANDIDATE_LIST__DEBUG
@@ -246,7 +246,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
} /* end else */
HDassert((candidate_assignment_table[mpi_size - 1] + n) == num_candidates);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* Verify that the candidate assignment table has the expected form */
for (u = 1; u < (unsigned)(mpi_size - 1); u++) {
unsigned a, b;
@@ -282,7 +282,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
addr = candidates_list_ptr[u];
HDassert(H5F_addr_defined(addr));
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if (u > 0) {
if (last_addr == addr)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "duplicate entry in cleaned list")
@@ -340,7 +340,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
} /* end if */
} /* end for */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
m = 0;
n = 0;
for (u = 0; u < H5C_RING_NTYPES; u++) {
@@ -681,7 +681,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
unsigned initial_list_len;
haddr_t addr;
unsigned pinned_entries_marked = 0;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
unsigned protected_entries_marked = 0;
unsigned other_entries_marked = 0;
haddr_t last_addr;
@@ -702,7 +702,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
HDassert(ce_array_len > 0);
HDassert(ce_array_ptr != NULL);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_protected_entry_list(cache_ptr) < 0 || H5C_validate_pinned_entry_list(cache_ptr) < 0 ||
H5C_validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -711,7 +711,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
for (u = 0; u < ce_array_len; u++) {
addr = ce_array_ptr[u];
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
if (u == 0)
last_addr = addr;
else {
@@ -721,7 +721,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "cleaned list not sorted")
} /* end else */
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_protected_entry_list(cache_ptr) < 0 ||
H5C_validate_pinned_entry_list(cache_ptr) < 0 || H5C_validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed in for loop")
@@ -733,14 +733,14 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
if (entry_ptr == NULL) {
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u,
addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?")
} /* end if */
else if (!entry_ptr->is_dirty) {
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr);
#endif /* H5C_DO_SANITY_CHECKS */
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?")
@@ -761,7 +761,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
entry_ptr->clear_on_unprotect = TRUE;
if (entry_ptr->is_pinned)
pinned_entries_marked++;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
else if (entry_ptr->is_protected)
protected_entries_marked++;
else
@@ -816,7 +816,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
entries_examined++;
} /* end while */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(entries_cleared == other_entries_marked);
#endif /* H5C_DO_SANITY_CHECKS */
@@ -847,14 +847,14 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
} /* end while */
} /* end while */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(entries_cleared == pinned_entries_marked + other_entries_marked);
HDassert(entries_cleared + protected_entries_marked == ce_array_len);
#endif /* H5C_DO_SANITY_CHECKS */
HDassert((entries_cleared == ce_array_len) || ((ce_array_len - entries_cleared) <= cache_ptr->pl_len));
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
u = 0;
entry_ptr = cache_ptr->pl_head_ptr;
while (entry_ptr != NULL) {
@@ -868,7 +868,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
#endif /* H5C_DO_SANITY_CHECKS */
done:
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_protected_entry_list(cache_ptr) < 0 || H5C_validate_pinned_entry_list(cache_ptr) < 0 ||
H5C_validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit")
@@ -898,7 +898,7 @@ H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
H5C_cache_entry_t *entry_ptr = NULL;
herr_t ret_value = SUCCEED;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
FUNC_ENTER_NOAPI_NOINIT
#else
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -923,7 +923,7 @@ H5C_clear_coll_entries(H5C_t *cache_ptr, hbool_t partial)
entry_ptr = prev_ptr;
} /* end while */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
done:
#endif /* H5C_DO_SANITY_CHECKS */
FUNC_LEAVE_NOAPI(ret_value)
@@ -1087,7 +1087,7 @@ static herr_t
H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES],
unsigned entries_to_clear[H5C_RING_NTYPES])
{
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
int i;
uint32_t index_len = 0;
size_t index_size = (size_t)0;
@@ -1114,7 +1114,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
HDassert(entries_to_flush[H5C_RING_UNDEFINED] == 0);
HDassert(entries_to_clear[H5C_RING_UNDEFINED] == 0);
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
HDassert(cache_ptr->clean_index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
@@ -1140,7 +1140,7 @@ H5C__flush_candidate_entries(H5F_t *f, unsigned entries_to_flush[H5C_RING_NTYPES
HDassert(cache_ptr->slist_size == slist_size);
#endif /* H5C_DO_SANITY_CHECKS */
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if (H5C_validate_protected_entry_list(cache_ptr) < 0 || H5C_validate_pinned_entry_list(cache_ptr) < 0 ||
H5C_validate_lru_list(cache_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
@@ -1209,7 +1209,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
hbool_t restart_scan = FALSE;
unsigned entries_flushed = 0;
unsigned entries_cleared = 0;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
unsigned init_index_len;
#endif /* H5C_DO_SANITY_CHECKS */
unsigned clear_flags =
@@ -1232,13 +1232,13 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
HDassert(ring > H5C_RING_UNDEFINED);
HDassert(ring < H5C_RING_NTYPES);
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
if ((H5C_validate_protected_entry_list(cache_ptr) < 0) ||
(H5C_validate_pinned_entry_list(cache_ptr) < 0) || (H5C_validate_lru_list(cache_ptr) < 0))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry")
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
/* index len should not change */
init_index_len = cache_ptr->index_len;
#endif /* H5C_DO_SANITY_CHECKS */
@@ -1521,7 +1521,7 @@ H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned entries_to_flu
* ( progress ) )
*/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
HDassert(init_index_len == cache_ptr->index_len);
#endif /* H5C_DO_SANITY_CHECKS */
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index cfa8a66..4ebce35 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -170,7 +170,7 @@
*
****************************************************************************/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__DLL_PRE_REMOVE_SC(entry_ptr, head_ptr, tail_ptr, len, Size, fv) \
if ( ( (head_ptr) == NULL ) || \
@@ -335,7 +335,7 @@ if ( ( (new_size) > (dll_size) ) || \
H5C__DLL_POST_SIZE_UPDATE_SC(dll_len, dll_size, old_size, new_size) \
} /* H5C__DLL_UPDATE_FOR_SIZE_CHANGE() */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__AUX_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
@@ -472,7 +472,7 @@ if ( ( (entry_ptr) == NULL ) || \
} \
} /* H5C__AUX_DLL_REMOVE() */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__IL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
@@ -997,7 +997,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3)
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
if ( ( (cache_ptr) == NULL ) || \
@@ -1601,7 +1601,7 @@ if ( ( (cache_ptr)->index_size != \
* two #defines are easy to confuse.
*/
-#if H5C_DO_SLIST_SANITY_CHECKS
+#ifdef H5C_DO_SLIST_SANITY_CHECKS
#define ENTRY_IN_SLIST(cache_ptr, entry_ptr) \
H5C_entry_in_skip_list((cache_ptr), (entry_ptr))
@@ -1613,7 +1613,7 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
{ \
@@ -1747,7 +1747,7 @@ if ( ( (cache_ptr)->index_size != \
*-------------------------------------------------------------------------
*/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush) \
{ \
HDassert( (cache_ptr) ); \
@@ -1884,7 +1884,7 @@ if ( ( (cache_ptr)->index_size != \
*-------------------------------------------------------------------------
*/
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
{ \
@@ -3308,7 +3308,7 @@ if ( ( (cache_ptr)->index_size != \
#ifdef H5_HAVE_PARALLEL
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
#define H5C__COLL_DLL_PRE_REMOVE_SC(entry_ptr, hd_ptr, tail_ptr, len, Size, fv) \
if ( ( (hd_ptr) == NULL ) || \
@@ -4862,7 +4862,7 @@ struct H5C_t {
size_t slist_ring_size[H5C_RING_NTYPES];
H5SL_t * slist_ptr;
uint32_t num_last_entries;
-#if H5C_DO_SANITY_CHECKS
+#ifdef H5C_DO_SANITY_CHECKS
int32_t slist_len_increase;
int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 66ffc62..fa0ad91 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -207,20 +207,24 @@
#define H5C__UPDATE_PAGE_BUFFER_FLAG 0x40000 /* Set during parallel I/O */
/* Debugging/sanity checking/statistics settings */
-#ifndef NDEBUG
-#define H5C_DO_SANITY_CHECKS 1
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 1
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
-#else /* NDEBUG */
-/* With rare exceptions, the following defines should be set
- * to 0 if NDEBUG is defined
+/* #define H5C_DO_SANITY_CHECKS */
+/* #define H5C_DO_SLIST_SANITY_CHECKS */
+/* #define H5C_DO_TAGGING_SANITY_CHECKS */
+/* #define H5C_DO_EXTREME_SANITY_CHECKS */
+
+/*
+ * If not already set externally (e.g., from the build
+ * system), set a few debugging options for debug builds.
*/
-#define H5C_DO_SANITY_CHECKS 0
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 0
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
-#endif /* NDEBUG */
+#ifndef NDEBUG
+#ifndef H5C_DO_SANITY_CHECKS
+#define H5C_DO_SANITY_CHECKS
+#endif
+
+#ifndef H5C_DO_TAGGING_SANITY_CHECKS
+#define H5C_DO_TAGGING_SANITY_CHECKS
+#endif
+#endif
/* Cork actions: cork/uncork/get cork status of an object */
#define H5C__SET_CORK 0x1
@@ -2236,7 +2240,7 @@ H5_DLL herr_t H5C_flush_tagged_entries(H5F_t *f, haddr_t tag);
H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global);
H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags);
H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag);
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
herr_t H5C_verify_tag(int id, haddr_t tag);
#endif
H5_DLL herr_t H5C_flush_to_min_clean(H5F_t *f);
@@ -2292,11 +2296,11 @@ H5_DLL herr_t H5C_cache_image_status(H5F_t *f, hbool_t *load_ci_ptr, hbool_t *
H5_DLL hbool_t H5C_cache_image_pending(const H5C_t *cache_ptr);
H5_DLL herr_t H5C_get_mdc_image_info(const H5C_t *cache_ptr, haddr_t *image_addr, hsize_t *image_len);
-#if H5C_DO_SLIST_SANITY_CHECKS
+#ifdef H5C_DO_SLIST_SANITY_CHECKS
H5_DLL hbool_t H5C_entry_in_skip_list(H5C_t *cache_ptr, H5C_cache_entry_t *target_ptr);
#endif
-#if H5C_DO_EXTREME_SANITY_CHECKS
+#ifdef H5C_DO_EXTREME_SANITY_CHECKS
H5_DLL herr_t H5C_validate_lru_list(H5C_t *cache_ptr);
H5_DLL herr_t H5C_validate_pinned_entry_list(H5C_t *cache_ptr);
H5_DLL herr_t H5C_validate_protected_entry_list(H5C_t *cache_ptr);
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 556d0e5..b252d38 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -231,7 +231,7 @@ H5C__tag_entry(H5C_t *cache, H5C_cache_entry_t *entry)
if (!H5F_addr_defined(tag))
tag = H5AC__IGNORE_TAG;
}
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
else {
/* Perform some sanity checks to ensure that a correct tag is being applied */
if (H5C_verify_tag(entry->type->id, tag) < 0)
@@ -630,7 +630,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_tagged_entries() */
-#if H5C_DO_TAGGING_SANITY_CHECKS
+#ifdef H5C_DO_TAGGING_SANITY_CHECKS
/*-------------------------------------------------------------------------
*
diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h
index c9c3f8b..060ea63 100644
--- a/src/H5EAprivate.h
+++ b/src/H5EAprivate.h
@@ -146,8 +146,4 @@ H5_DLL herr_t H5EA_patch_file(H5EA_t *fa, H5F_t *f);
/* Statistics routines */
H5_DLL herr_t H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats);
-/* Debugging routines */
-#ifdef H5EA_DEBUGGING
-#endif /* H5EA_DEBUGGING */
-
#endif /* H5EAprivate_H */