diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-20 18:51:24 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-20 18:51:24 (GMT) |
commit | e3537b7ee7ecbcc41f7c00f0e97453d106f870ff (patch) | |
tree | 25a279ad50a5529bbf345fc6d13f655daa91e3af | |
parent | 4e3398b9d74b44b432358642b6d1a9cb43e716b5 (diff) | |
download | hdf5-e3537b7ee7ecbcc41f7c00f0e97453d106f870ff.zip hdf5-e3537b7ee7ecbcc41f7c00f0e97453d106f870ff.tar.gz hdf5-e3537b7ee7ecbcc41f7c00f0e97453d106f870ff.tar.bz2 |
[svn-r19114] Description:
Rename H5AC_set() to H5AC_insert_entry()
Get rid of H5C_set_skip_flags() & related flags
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug, production & parallel
(too simple to require h5committest)
-rw-r--r-- | src/H5AC.c | 10 | ||||
-rw-r--r-- | src/H5ACprivate.h | 2 | ||||
-rw-r--r-- | src/H5B.c | 4 | ||||
-rw-r--r-- | src/H5B2hdr.c | 2 | ||||
-rw-r--r-- | src/H5B2int.c | 4 | ||||
-rw-r--r-- | src/H5C.c | 74 | ||||
-rw-r--r-- | src/H5Cpkg.h | 21 | ||||
-rw-r--r-- | src/H5Cprivate.h | 4 | ||||
-rw-r--r-- | src/H5EAdblkpage.c | 2 | ||||
-rw-r--r-- | src/H5EAdblock.c | 2 | ||||
-rw-r--r-- | src/H5EAhdr.c | 2 | ||||
-rw-r--r-- | src/H5EAiblock.c | 2 | ||||
-rw-r--r-- | src/H5EAsblock.c | 2 | ||||
-rw-r--r-- | src/H5FAdblkpage.c | 2 | ||||
-rw-r--r-- | src/H5FAdblock.c | 2 | ||||
-rw-r--r-- | src/H5FAhdr.c | 2 | ||||
-rw-r--r-- | src/H5FS.c | 8 | ||||
-rw-r--r-- | src/H5Fsuper.c | 2 | ||||
-rw-r--r-- | src/H5Gnode.c | 2 | ||||
-rw-r--r-- | src/H5HFdblock.c | 2 | ||||
-rw-r--r-- | src/H5HFhdr.c | 2 | ||||
-rw-r--r-- | src/H5HFiblock.c | 2 | ||||
-rw-r--r-- | src/H5HG.c | 2 | ||||
-rw-r--r-- | src/H5HL.c | 4 | ||||
-rw-r--r-- | src/H5O.c | 2 | ||||
-rw-r--r-- | src/H5Ochunk.c | 2 | ||||
-rw-r--r-- | src/H5Ocopy.c | 2 | ||||
-rwxr-xr-x | src/H5SM.c | 4 | ||||
-rw-r--r-- | test/cache_common.c | 2 | ||||
-rw-r--r-- | test/cache_tagging.c | 2 | ||||
-rw-r--r-- | test/earray.c | 8 | ||||
-rw-r--r-- | testpar/t_cache.c | 23 |
32 files changed, 56 insertions, 150 deletions
@@ -928,7 +928,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5AC_set + * Function: H5AC_insert_entry * * Purpose: Adds the specified thing to the cache. The thing need not * exist on disk yet, but it must have an address and disk @@ -943,7 +943,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, +H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags) { #if H5AC__TRACE_FILE_ENABLED @@ -953,7 +953,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, #endif /* H5AC__TRACE_FILE_ENABLED */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5AC_set, FAIL) + FUNC_ENTER_NOAPI(H5AC_insert_entry, FAIL) HDassert(f); HDassert(f->shared); @@ -982,7 +982,7 @@ H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, ( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) && ( trace_file_ptr != NULL ) ) { - sprintf(trace, "H5AC_set 0x%lx %d 0x%x", + sprintf(trace, "H5AC_insert_entry 0x%lx %d 0x%x", (unsigned long)addr, type->id, flags); @@ -1027,7 +1027,7 @@ done: #endif /* H5AC__TRACE_FILE_ENABLED */ FUNC_LEAVE_NOAPI(ret_value) -} /* H5AC_set() */ +} /* H5AC_insert_entry() */ /*------------------------------------------------------------------------- diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 7fa5cf4..79f355c 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -341,7 +341,7 @@ H5_DLL herr_t H5AC_init(void); H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr); H5_DLL herr_t H5AC_get_entry_status(const H5F_t *f, haddr_t addr, unsigned * status_ptr); -H5_DLL herr_t H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, +H5_DLL herr_t H5AC_insert_entry(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type, haddr_t addr, void *thing, unsigned int flags); H5_DLL herr_t H5AC_pin_protected_entry(void *thing); H5_DLL herr_t H5AC_create_flush_dependency(void *parent_thing, void *child_thing); @@ -245,7 +245,7 @@ H5B_create(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, void *udata, /* * Cache the new B-tree node. */ - if(H5AC_set(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_BT, *addr_p, bt, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree root node to cache") #ifdef H5B_DEBUG H5B_assert(f, dxpl_id, *addr_p, shared->type, udata); @@ -687,7 +687,7 @@ H5B_insert(H5F_t *f, hid_t dxpl_id, const H5B_class_t *type, haddr_t addr, HDmemcpy(H5B_NKEY(new_bt, shared, 2), rt_key, shared->type->sizeof_nkey); /* Insert the modified copy of the old root into the file again */ - if(H5AC_set(f, dxpl_id, H5AC_BT, addr, new_bt, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_BT, addr, new_bt, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to flush old B-tree root node") #ifdef H5B_DEBUG diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c index 94e2c54..e8d8b96 100644 --- a/src/H5B2hdr.c +++ b/src/H5B2hdr.c @@ -309,7 +309,7 @@ H5B2_hdr_create(H5F_t *f, hid_t dxpl_id, const H5B2_create_t *cparam, HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, HADDR_UNDEF, "file allocation failed for B-tree header") /* Cache the new B-tree node */ - if(H5AC_set(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_BT2_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, HADDR_UNDEF, "can't add B-tree header to cache") /* Set address of v2 B-tree header to return */ diff --git a/src/H5B2int.c b/src/H5B2int.c index db137f8..a0c5366 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -1771,7 +1771,7 @@ HDmemset(leaf->leaf_native, 0, hdr->cls->nrec_size * hdr->node_info[0].max_nrec) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree leaf node") /* Cache the new B-tree node */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_LEAF, node_ptr->addr, leaf, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree leaf to cache") done: @@ -1890,7 +1890,7 @@ HDmemset(internal->node_ptrs, 0, sizeof(H5B2_node_ptr_t) * (hdr->node_info[depth HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for B-tree internal node") /* Cache the new B-tree node */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_BT2_INT, node_ptr->addr, internal, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "can't add B-tree internal node to cache") done: @@ -150,8 +150,7 @@ static void * H5C_load_entry(H5F_t * f, hid_t dxpl_id, const H5C_class_t * type, haddr_t addr, - void * udata, - hbool_t skip_file_checks); + void * udata); static herr_t H5C_make_space_in_cache(H5F_t * f, hid_t primary_dxpl_id, @@ -1158,8 +1157,6 @@ H5C_create(size_t max_cache_size, H5C_stats__reset(cache_ptr); - cache_ptr->skip_file_checks = FALSE; - cache_ptr->skip_dxpl_id_checks = FALSE; cache_ptr->prefix[0] = '\0'; /* empty string */ /* Set return value */ @@ -1409,7 +1406,6 @@ H5C_dest(H5F_t * f, /* Sanity check */ HDassert(cache_ptr); HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(cache_ptr->skip_file_checks || f); /* Flush and invalidate all cache entries */ if(H5C_flush_invalidate_cache(f, primary_dxpl_id, secondary_dxpl_id, @@ -1595,7 +1591,6 @@ H5C_flush_cache(H5F_t *f, hid_t primary_dxpl_id, hid_t secondary_dxpl_id, unsign HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f); HDassert( cache_ptr->slist_ptr ); ignore_protected = ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 ); @@ -1977,7 +1972,6 @@ H5C_flush_to_min_clean(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); if ( cache_ptr->check_write_permitted != NULL ) { @@ -2547,7 +2541,6 @@ H5C_insert_entry(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( type ); HDassert( type->flush ); HDassert( type->size ); @@ -2870,7 +2863,6 @@ H5C_mark_entries_as_clean(H5F_t * f, cache_ptr = f->shared->cache; HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( ce_array_len > 0 ); HDassert( ce_array_ptr != NULL ); @@ -3635,7 +3627,6 @@ H5C_protect(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( type ); HDassert( type->flush ); HDassert( type->load ); @@ -3698,7 +3689,7 @@ H5C_protect(H5F_t * f, hit = FALSE; - thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata, cache_ptr->skip_file_checks); + thing = H5C_load_entry(f, primary_dxpl_id, type, addr, udata); if ( thing == NULL ) { @@ -4414,48 +4405,6 @@ H5C_set_prefix(H5C_t * cache_ptr, char * prefix) /*------------------------------------------------------------------------- - * Function: H5C_set_skip_flags - * - * Purpose: Set the values of the skip sanity check flags. - * - * This function and the skip sanity check flags were created - * for the convenience of the test bed. However it is - * possible that there may be other uses for the flags. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 6/11/04 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_set_skip_flags(H5C_t * cache_ptr, - hbool_t skip_file_checks, - hbool_t skip_dxpl_id_checks) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5C_set_skip_flags, FAIL) - - /* This would normally be an assert, but we need to use an HGOTO_ERROR - * call to shut up the compiler. - */ - if ( ( ! cache_ptr ) || ( cache_ptr->magic != H5C__H5C_T_MAGIC ) ) { - - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr") - } - - cache_ptr->skip_file_checks = skip_file_checks; - cache_ptr->skip_dxpl_id_checks = skip_dxpl_id_checks; - -done: - FUNC_LEAVE_NOAPI(ret_value) - -} /* H5C_set_skip_flags() */ - - -/*------------------------------------------------------------------------- * Function: H5C_set_trace_file_ptr * * Purpose: Set the trace_file_ptr field for the cache. @@ -5236,7 +5185,6 @@ H5C_unprotect(H5F_t * f, HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( type ); HDassert( type->clear ); HDassert( type->flush ); @@ -7421,7 +7369,6 @@ H5C_flush_invalidate_cache(H5F_t * f, HDassert( f ); HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( cache_ptr->slist_ptr ); /* Filter out the flags that are not relevant to the flush/invalidate. @@ -7972,7 +7919,6 @@ H5C_flush_single_entry(H5F_t * f, HDassert( f ); HDassert( cache_ptr ); HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->skip_file_checks || f ); HDassert( H5F_addr_defined(addr) ); HDassert( first_flush_ptr ); @@ -8042,14 +7988,8 @@ H5C_flush_single_entry(H5F_t * f, * Note that we only do these sanity checks when the clear_only flag * is not set, and the entry to be flushed is dirty. Don't bother * otherwise as no file I/O can result. - * - * There are also cases (testing for instance) where it is convenient - * to pass in dummy dxpl_ids. Since we don't use the dxpl_ids directly, - * this isn't a problem -- but we do have to turn off sanity checks - * involving them. We use cache_ptr->skip_dxpl_id_checks to do this. */ - if ( ( ! cache_ptr->skip_dxpl_id_checks ) && - ( ! clear_only ) && + if ( ( ! clear_only ) && ( entry_ptr->is_dirty ) && ( IS_H5FD_MPI(f) ) ) { @@ -8390,12 +8330,7 @@ H5C_load_entry(H5F_t * f, hid_t dxpl_id, const H5C_class_t * type, haddr_t addr, - void * udata, -#ifndef NDEBUG - hbool_t skip_file_checks) -#else /* NDEBUG */ - hbool_t UNUSED skip_file_checks) -#endif /* NDEBUG */ + void * udata) { void * thing = NULL; /* Pointer to thing loaded */ H5C_cache_entry_t * entry; /* Alias for thing loaded, as cache entry */ @@ -8407,7 +8342,6 @@ H5C_load_entry(H5F_t * f, HDassert(f); HDassert(f->shared); HDassert(f->shared->cache); - HDassert(skip_file_checks || f); HDassert(type); HDassert(type->load); HDassert(type->size); diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 71fb405..37068f1 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -832,25 +832,6 @@ * * Fields supporting testing: * - * For test purposes, it is useful to turn off some asserts and sanity - * checks. The following flags support this. - * - * skip_file_checks: Boolean flag used to skip sanity checks on file - * parameters passed to the cache. In the test bed, there - * is no reason to have a file open, as the cache proper - * just passes these parameters through without using them. - * - * When this flag is set, all sanity checks on the file - * parameters are skipped. The field defaults to FALSE. - * - * skip_dxpl_id_checks: Boolean flag used to skip sanity checks on the - * dxpl_id parameters passed to the cache. These are not - * used directly by the cache, so skipping the checks - * simplifies the test bed. - * - * When this flag is set, all sanity checks on the dxpl_id - * parameters are skipped. The field defaults to FALSE. - * * prefix Array of char used to prefix debugging output. The * field is intended to allow marking of output of with * the processes mpi rank. @@ -1014,8 +995,6 @@ struct H5C_t #endif /* H5C_COLLECT_CACHE_STATS */ - hbool_t skip_file_checks; - hbool_t skip_dxpl_id_checks; char prefix[H5C__PREFIX_LEN]; }; diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 7e14872..9f10409 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -1171,10 +1171,6 @@ H5_DLL herr_t H5C_set_evictions_enabled(H5C_t *cache_ptr, H5_DLL herr_t H5C_set_prefix(H5C_t * cache_ptr, char * prefix); -H5_DLL herr_t H5C_set_skip_flags(H5C_t * cache_ptr, - hbool_t skip_file_checks, - hbool_t skip_dxpl_id_checks); - H5_DLL herr_t H5C_set_trace_file_ptr(H5C_t * cache_ptr, FILE * trace_file_ptr); diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c index 1876262..eba7470 100644 --- a/src/H5EAdblkpage.c +++ b/src/H5EAdblkpage.c @@ -179,7 +179,7 @@ HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", FUNC, dblk_page->size); H5E_THROW(H5E_CANTSET, "can't set extensible array data block page elements to class's fill value") /* Cache the new extensible array data block page */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_EARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add extensible array data block page to cache") CATCH diff --git a/src/H5EAdblock.c b/src/H5EAdblock.c index 1378c6b..640f353 100644 --- a/src/H5EAdblock.c +++ b/src/H5EAdblock.c @@ -206,7 +206,7 @@ HDfprintf(stderr, "%s: dblock->block_off = %Hu\n", FUNC, dblock->block_off); H5E_THROW(H5E_CANTSET, "can't set extensible array data block elements to class's fill value") /* Cache the new extensible array data block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_EARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_EARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add extensible array data block to cache") /* Update extensible array data block statistics */ diff --git a/src/H5EAhdr.c b/src/H5EAhdr.c index 2f58320..08d2fb9 100644 --- a/src/H5EAhdr.c +++ b/src/H5EAhdr.c @@ -435,7 +435,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); H5E_THROW(H5E_CANTALLOC, "file allocation failed for extensible array header") /* Cache the new extensible array header */ - if(H5AC_set(f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_EARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add extensible array header to cache") /* Set address of array header to return */ diff --git a/src/H5EAiblock.c b/src/H5EAiblock.c index 2fde249..e18947a 100644 --- a/src/H5EAiblock.c +++ b/src/H5EAiblock.c @@ -231,7 +231,7 @@ HDfprintf(stderr, "%s: iblock->size = %Zu\n", FUNC, iblock->size); } /* end if */ /* Cache the new extensible array index block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, iblock_addr, iblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_EARRAY_IBLOCK, iblock_addr, iblock, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add extensible array index block to cache") /* Update extensible array index block statistics */ diff --git a/src/H5EAsblock.c b/src/H5EAsblock.c index 938cd03..ba1c40f 100644 --- a/src/H5EAsblock.c +++ b/src/H5EAsblock.c @@ -232,7 +232,7 @@ HDfprintf(stderr, "%s: sblock->block_off = %Hu\n", FUNC, sblock->block_off); H5V_array_fill(sblock->dblk_addrs, &tmp_addr, sizeof(haddr_t), sblock->ndblks); /* Cache the new extensible array super block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_EARRAY_SBLOCK, sblock_addr, sblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_EARRAY_SBLOCK, sblock_addr, sblock, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add extensible array super block to cache") /* Update extensible array super block statistics */ diff --git a/src/H5FAdblkpage.c b/src/H5FAdblkpage.c index 2df31f2..b5ef82c 100644 --- a/src/H5FAdblkpage.c +++ b/src/H5FAdblkpage.c @@ -177,7 +177,7 @@ HDfprintf(stderr, "%s: dblk_page->size = %Zu\n", FUNC, dblk_page->size); H5E_THROW(H5E_CANTSET, "can't set fixed array data block page elements to class's fill value") /* Cache the new fixed array data block page */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FARRAY_DBLK_PAGE, dblk_page->addr, dblk_page, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block page to cache") CATCH diff --git a/src/H5FAdblock.c b/src/H5FAdblock.c index fd1dd89..80e2159 100644 --- a/src/H5FAdblock.c +++ b/src/H5FAdblock.c @@ -225,7 +225,7 @@ HDfprintf(stderr, "%s: dblock->size = %Zu\n", FUNC, dblock->size); H5E_THROW(H5E_CANTSET, "can't set fixed array data block elements to class's fill value") /* Cache the new fixed array data block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FARRAY_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add fixed array data block to cache") /* Mark the header dirty (for updating statistics) */ diff --git a/src/H5FAhdr.c b/src/H5FAhdr.c index 5cfba0d..23a554a 100644 --- a/src/H5FAhdr.c +++ b/src/H5FAhdr.c @@ -222,7 +222,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC); H5E_THROW(H5E_CANTALLOC, "file allocation failed for Fixed Array header") /* Cache the new Fixed Array header */ - if(H5AC_set(f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FARRAY_HDR, hdr->addr, hdr, H5AC__NO_FLAGS_SET) < 0) H5E_THROW(H5E_CANTINSERT, "can't add fixed array header to cache") /* Set address of array header to return */ @@ -143,7 +143,7 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header") /* Cache the new free space header (pinned) */ - if(H5AC_set(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache") /* Return free space header address to caller, if desired */ @@ -401,7 +401,7 @@ HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC); HDassert(H5F_addr_defined(fspace->sect_addr)); /* Cache the free space section info */ - if(H5AC_set(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") } /* end if */ else { @@ -767,7 +767,7 @@ H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header") /* Cache the new free space header (pinned) */ - if(H5AC_set(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache") } /* end if */ @@ -814,7 +814,7 @@ H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id) HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty") /* Cache the free-space section info */ - if(H5AC_set(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache") fspace->sinfo = NULL; diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index fd8c692..f9b6b0c 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -487,7 +487,7 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to set EOA value for superblock") /* Insert superblock into cache, pinned */ - if(H5AC_set(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_SUPERBLOCK, (haddr_t)0, sblock, H5AC__PIN_ENTRY_FLAG) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "can't add superblock to cache") sblock_in_cache = TRUE; diff --git a/src/H5Gnode.c b/src/H5Gnode.c index ef38380..fb07c63 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -313,7 +313,7 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t UNUSED op, void *_lt_key, if(NULL == (sym->entry = H5FL_SEQ_CALLOC(H5G_entry_t, (size_t)(2 * H5F_SYM_LEAF_K(f))))) HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "memory allocation failed") - if(H5AC_set(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_SNODE, *addr_p, sym, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to cache symbol table leaf node") /* * The left and right symbols in an empty tree are both the diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index b2b3077..5cd035a 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -182,7 +182,7 @@ HDmemset(dblock->blk, 0, dblock->size); } /* end else */ /* Cache the new fractal heap direct block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_DBLOCK, dblock_addr, dblock, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap direct block to cache") /* Increase the allocated heap size */ diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c index 67bb7b0..e678d74 100644 --- a/src/H5HFhdr.c +++ b/src/H5HFhdr.c @@ -500,7 +500,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for fractal heap header") /* Cache the new fractal heap header */ - if(H5AC_set(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_FHEAP_HDR, hdr->heap_addr, hdr, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINSERT, HADDR_UNDEF, "can't add fractal heap header to cache") /* Set address of heap header to return */ diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index 7958075..6fbb0c2 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -1056,7 +1056,7 @@ H5HF_man_iblock_create(H5HF_hdr_t *hdr, hid_t dxpl_id, H5HF_indirect_t *par_iblo iblock->max_child = 0; /* Cache the new indirect block */ - if(H5AC_set(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(hdr->f, dxpl_id, H5AC_FHEAP_IBLOCK, *addr_p, iblock, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "can't add fractal heap indirect block to cache") done: @@ -227,7 +227,7 @@ HDmemset(heap->chunk, 0, size); } /* end else */ /* Add the heap to the cache */ - if(H5AC_set(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_GHEAP, addr, heap, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, HADDR_UNDEF, "unable to cache global heap collection") ret_value = addr; @@ -163,7 +163,7 @@ H5HL_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, haddr_t *addr_p/*out*/) HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "memory allocation failed") /* Add to cache */ - if(H5AC_set(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap prefix") /* Set address to return */ @@ -270,7 +270,7 @@ H5HL_dblk_realloc(H5F_t *f, hid_t dxpl_id, H5HL_t *heap, size_t new_heap_size) HGOTO_ERROR(H5E_HEAP, H5E_CANTRESIZE, FAIL, "unable to resize heap prefix in cache") /* Insert data block into cache (pinned) */ - if(H5AC_set(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_LHEAP_DBLK, new_addr, dblk, H5AC__PIN_ENTRY_FLAG) < 0) HGOTO_ERROR(H5E_HEAP, H5E_CANTINIT, FAIL, "unable to cache local heap data block") dblk = NULL; @@ -1235,7 +1235,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, hid_t ocpl_id, H5_BEGIN_TAG(dxpl_id, oh_addr, FAIL); /* Cache object header */ - if(H5AC_set(f, dxpl_id, H5AC_OHDR, oh_addr, oh, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR, oh_addr, oh, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") oh = NULL; diff --git a/src/H5Ochunk.c b/src/H5Ochunk.c index 79c4442..f867d04 100644 --- a/src/H5Ochunk.c +++ b/src/H5Ochunk.c @@ -118,7 +118,7 @@ H5O_chunk_add(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx) HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "can't increment reference count on object header") /* Insert the chunk proxy into the cache */ - if(H5AC_set(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_OHDR_CHK, oh->chunk[idx].addr, chk_proxy, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header chunk") chk_proxy = NULL; diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 94f7d9a..8e55503 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -731,7 +731,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, H5_BEGIN_TAG(dxpl_id, oloc_dst->addr, FAIL); /* Insert destination object header in cache */ - if(H5AC_set(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(oloc_dst->file, dxpl_id, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header") oh_dst = NULL; @@ -209,7 +209,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, FAIL, "file allocation failed for SOHM table") /* Cache the new table */ - if(H5AC_set(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, FAIL, "can't add SOHM table to cache") /* Record the address of the master table in the file */ @@ -655,7 +655,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id) HGOTO_ERROR(H5E_SOHM, H5E_NOSPACE, HADDR_UNDEF, "file allocation failed for SOHM list") /* Put the list into the cache */ - if(H5AC_set(f, dxpl_id, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0) + if(H5AC_insert_entry(f, dxpl_id, H5AC_SOHM_LIST, addr, list, H5AC__NO_FLAGS_SET) < 0) HGOTO_ERROR(H5E_SOHM, H5E_CANTINS, HADDR_UNDEF, "can't add SOHM list to cache") /* Set return value */ diff --git a/test/cache_common.c b/test/cache_common.c index 312de3d..e6dd020 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -2694,8 +2694,6 @@ setup_cache(size_t max_cache_size, H5C_stats__reset(cache_ptr); - H5C_set_skip_flags(cache_ptr, TRUE, TRUE); - ret_val = file_ptr; } diff --git a/test/cache_tagging.c b/test/cache_tagging.c index cc1b37c..9aef651 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -3836,7 +3836,7 @@ check_invalid_tag_application(void) /* Create dxpl */ if ( (dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR; - /* Call H5HL_create, an internal function that calls H5AC_set without setting up a tag */ + /* Call H5HL_create, an internal function that calls H5AC_insert_entry without setting up a tag */ /* Ensure this returns FAILURE, as a tag has not been set up. */ if ( H5HL_create(f, H5AC_ind_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR; diff --git a/test/earray.c b/test/earray.c index 3a29948..d3b51a4 100644 --- a/test/earray.c +++ b/test/earray.c @@ -1443,7 +1443,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED /* Insert test entry into cache */ base_addr = HADDR_MAX; - if(H5AC_set(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, base_entry, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, base_entry, H5AC__PIN_ENTRY_FLAG) < 0) TEST_ERROR /* Set the base entry as a flush dependency for the array */ @@ -1458,7 +1458,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED /* Insert test entry into cache */ addr1 = HADDR_MAX - 1; - if(H5AC_set(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, entry1, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, entry1, H5AC__PIN_ENTRY_FLAG) < 0) TEST_ERROR /* Set the test entry as a flush dependency for 0th index in the array */ @@ -1480,7 +1480,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED /* Insert test entry into cache */ addr2 = HADDR_MAX - 2; - if(H5AC_set(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, entry2, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, entry2, H5AC__PIN_ENTRY_FLAG) < 0) TEST_ERROR /* Set the test entry as a flush dependency for 1st index in the array */ @@ -1502,7 +1502,7 @@ test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED /* Insert test entry into cache */ addr3 = HADDR_MAX - 3; - if(H5AC_set(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, entry3, H5AC__PIN_ENTRY_FLAG) < 0) + if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, entry3, H5AC__PIN_ENTRY_FLAG) < 0) TEST_ERROR /* Set the test entry as a flush dependency for 10,000th index in the array */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 0579829..c30a837 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -2932,7 +2932,7 @@ insert_entry(H5C_t * cache_ptr, (entry_ptr->ver)++; entry_ptr->dirty = TRUE; - result = H5AC_set(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), + result = H5AC_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT, &(types[0]), entry_ptr->base_addr, (void *)(&(entry_ptr->header)), flags); if ( ( result < 0 ) || @@ -2942,7 +2942,7 @@ insert_entry(H5C_t * cache_ptr, nerrors++; if ( verbose ) { - HDfprintf(stdout, "%d:%s: Error in H5AC_set().\n", + HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, fcn_name); } } @@ -3944,7 +3944,6 @@ setup_cache_for_test(hid_t * fid_ptr, *fid_ptr = fid; *file_ptr_ptr = file_ptr; *cache_ptr_ptr = cache_ptr; - H5C_set_skip_flags(cache_ptr, TRUE, TRUE); H5C_stats__reset(cache_ptr); success = TRUE; } @@ -6785,7 +6784,7 @@ smoke_check_5(int metadata_write_strategy) * functions: * * - H5AC_flush() - * - H5AC_set() + * - H5AC_insert_entry() * - H5AC_mark_entry_dirty() * - H5AC_move_entry() * - H5AC_pin_protected_entry() @@ -6818,10 +6817,10 @@ trace_file_check(int metadata_write_strategy) { "### HDF5 metadata cache trace file version 1 ###\n", "H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0 0\n", - "H5AC_set 0x200 25 0x0 2 0\n", - "H5AC_set 0x202 25 0x0 2 0\n", - "H5AC_set 0x204 25 0x0 4 0\n", - "H5AC_set 0x208 25 0x0 6 0\n", + "H5AC_insert_entry 0x200 25 0x0 2 0\n", + "H5AC_insert_entry 0x202 25 0x0 2 0\n", + "H5AC_insert_entry 0x204 25 0x0 4 0\n", + "H5AC_insert_entry 0x208 25 0x0 6 0\n", "H5AC_protect 0x200 25 H5AC_WRITE 2 1\n", "H5AC_mark_entry_dirty 0x200 0\n", "H5AC_unprotect 0x200 25 0 0 0\n", @@ -6846,10 +6845,10 @@ trace_file_check(int metadata_write_strategy) { "### HDF5 metadata cache trace file version 1 ###\n", "H5AC_set_cache_auto_resize_config 1 0 1 0 \"t_cache_trace.txt\" 1 0 2097152 0.300000 33554432 1048576 50000 1 0.900000 2.000000 1 1.000000 0.250000 1 4194304 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 1 0\n", - "H5AC_set 0x200 25 0x0 2 0\n", - "H5AC_set 0x202 25 0x0 2 0\n", - "H5AC_set 0x204 25 0x0 4 0\n", - "H5AC_set 0x208 25 0x0 6 0\n", + "H5AC_insert_entry 0x200 25 0x0 2 0\n", + "H5AC_insert_entry 0x202 25 0x0 2 0\n", + "H5AC_insert_entry 0x204 25 0x0 4 0\n", + "H5AC_insert_entry 0x208 25 0x0 6 0\n", "H5AC_protect 0x200 25 H5AC_WRITE 2 1\n", "H5AC_mark_entry_dirty 0x200 0\n", "H5AC_unprotect 0x200 25 0 0 0\n", |