summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-01-27 15:07:42 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-01-27 15:07:42 (GMT)
commit032766b521a2b22d77059e89a1eb3a76a5d83875 (patch)
tree0681d291691b47f16bf2f0832c581158e5579bb0 /testpar
parent0b761d78c765c902b5ca13c9067878e5097f9afb (diff)
downloadhdf5-032766b521a2b22d77059e89a1eb3a76a5d83875.zip
hdf5-032766b521a2b22d77059e89a1eb3a76a5d83875.tar.gz
hdf5-032766b521a2b22d77059e89a1eb3a76a5d83875.tar.bz2
[svn-r18171] Description:
Bring r18169 from 'merge_metadata_journaling' branch back to trunk: Converge changes on metadata_journaling branch and trunk: - Remove H5F_t* parameter from H5HL_unprotect() - Remove H5F_t* parameter from H5HL_dirty() - Remove H5F_t* parameter from H5O_unprotect() - Bring changes to metadata caching routines back: - H5AC_pin_protected_entry() - H5AC_resize_pinned_entry() - H5AC_unpin_entry() - H5AC_mark_pinned_entry_dirty() - H5AC_mark_pinned_or_protected_entry_dirty() - Revise internal H5C routines to drop H5F_t* and/or H5C_t* as parameter where possible - Revise tests to follow internal routine changes Also, drop file/cache pointer parameter from create/destroy flush dependency internal cache calls. Also, other minor changes to speedup the 'cache' test. 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, 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,
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c83
1 files changed, 28 insertions, 55 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 7fb7100..5b0e187 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -360,19 +360,14 @@ void lock_and_unlock_random_entries(H5C_t * cache_ptr, H5F_t * file_ptr,
void lock_and_unlock_random_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int min_idx, int max_idx);
void lock_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t size_changed, size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx);
+void mark_pinned_entry_dirty(int32_t idx, hbool_t size_changed, size_t new_size);
+void mark_pinned_or_protected_entry_dirty(int32_t idx);
void pin_entry(H5C_t * cache_ptr, H5F_t * file_ptr, int32_t idx,
hbool_t global, hbool_t dirty);
-void pin_protected_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, hbool_t global);
+void pin_protected_entry(int32_t idx, hbool_t global);
void rename_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
int32_t old_idx, int32_t new_idx);
-void resize_entry(H5C_t * cache_ptr, H5F_t * file_ptr,
- int32_t idx, size_t new_size);
+void resize_entry(int32_t idx, size_t new_size);
hbool_t setup_cache_for_test(hid_t * fid_ptr, H5F_t ** file_ptr_ptr,
H5C_t ** cache_ptr_ptr);
void setup_rand(void);
@@ -2227,7 +2222,7 @@ expunge_entry(H5C_t * cache_ptr,
HDassert( ((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE );
HDassert( ! ((entry_ptr->header).is_dirty) );
- result = H5C_get_entry_status(cache_ptr, entry_ptr->base_addr,
+ result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr,
NULL, &in_cache, NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -2740,7 +2735,7 @@ lock_entry(H5C_t * cache_ptr,
HDassert( ! (entry_ptr->locked) );
- cache_entry_ptr = H5AC_protect(file_ptr, -1, &(types[0]),
+ cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, -1, &(types[0]),
entry_ptr->base_addr,
NULL, NULL, H5AC_WRITE);
@@ -2786,9 +2781,7 @@ lock_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+mark_pinned_entry_dirty(int32_t idx,
hbool_t size_changed,
size_t new_size)
{
@@ -2798,8 +2791,6 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2811,8 +2802,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_entry_dirty(file_ptr,
- (void *)entry_ptr,
+ result = H5AC_mark_pinned_entry_dirty((void *)entry_ptr,
size_changed,
new_size);
@@ -2854,9 +2844,7 @@ mark_pinned_entry_dirty(H5C_t * cache_ptr,
*****************************************************************************/
void
-mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx)
+mark_pinned_or_protected_entry_dirty(int32_t idx)
{
const char * fcn_name = "mark_pinned_or_protected_entry_dirty()";
herr_t result;
@@ -2864,8 +2852,6 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( file_ptr );
- HDassert( cache_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -2876,8 +2862,7 @@ mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
(entry_ptr->ver)++;
entry_ptr->dirty = TRUE;
- result = H5AC_mark_pinned_or_protected_entry_dirty(file_ptr,
- (void *)entry_ptr);
+ result = H5AC_mark_pinned_or_protected_entry_dirty((void *)entry_ptr);
if ( result < 0 ) {
@@ -2991,17 +2976,13 @@ pin_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-pin_protected_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+pin_protected_entry(int32_t idx,
hbool_t global)
{
const char * fcn_name = "pin_protected_entry()";
herr_t result;
struct datum * entry_ptr;
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3011,7 +2992,7 @@ pin_protected_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- result = H5AC_pin_protected_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_pin_protected_entry((void *)entry_ptr);
if ( ( result < 0 ) ||
( entry_ptr->header.type != &(types[0]) ) ||
@@ -3180,9 +3161,7 @@ rename_entry(H5C_t * cache_ptr,
*****************************************************************************/
void
-resize_entry(H5C_t * cache_ptr,
- H5F_t * file_ptr,
- int32_t idx,
+resize_entry(int32_t idx,
size_t new_size)
{
const char * fcn_name = "resize_entry()";
@@ -3191,8 +3170,6 @@ resize_entry(H5C_t * cache_ptr,
if ( nerrors == 0 ) {
- HDassert( cache_ptr );
- HDassert( file_ptr );
HDassert( ( 0 <= idx ) && ( idx < NUM_DATA_ENTRIES ) );
HDassert( idx < virt_num_data_entries );
@@ -3208,8 +3185,7 @@ resize_entry(H5C_t * cache_ptr,
HDassert( new_size > 0 );
HDassert( new_size <= entry_ptr->len );
- result = H5AC_resize_pinned_entry(file_ptr, (void *)entry_ptr,
- new_size);
+ result = H5AC_resize_pinned_entry((void *)entry_ptr, new_size);
if ( result < 0 ) {
@@ -3295,7 +3271,7 @@ setup_cache_for_test(hid_t * fid_ptr,
world_mpi_rank, fcn_name);
}
} else {
- file_ptr = H5I_object_verify(fid, H5I_FILE);
+ file_ptr = (H5F_t *)H5I_object_verify(fid, H5I_FILE);
}
if ( file_ptr == NULL ) {
@@ -3778,12 +3754,11 @@ unpin_entry(H5C_t * cache_ptr,
if ( dirty ) {
- mark_pinned_entry_dirty(cache_ptr, file_ptr, idx, FALSE,
- (size_t)0);
+ mark_pinned_entry_dirty(idx, FALSE, (size_t)0);
}
- result = H5AC_unpin_entry(file_ptr, (void *)entry_ptr);
+ result = H5AC_unpin_entry((void *)entry_ptr);
if ( result < 0 ) {
@@ -5227,7 +5202,7 @@ smoke_check_5(void)
if ( i % 2 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
unlock_entry(cache_ptr, file_ptr, i, H5AC__NO_FLAGS_SET);
@@ -5259,23 +5234,21 @@ smoke_check_5(void)
{
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len / 2);
+ resize_entry(i, data[i].len / 2);
}
if ( i % 4 == 0 )
{
- mark_pinned_or_protected_entry_dirty(cache_ptr,
- file_ptr, i);
+ mark_pinned_or_protected_entry_dirty(i);
}
else
{
- mark_pinned_entry_dirty(cache_ptr, file_ptr, i,
- FALSE, (size_t)0);
+ mark_pinned_entry_dirty(i, FALSE, (size_t)0);
}
if ( i % 8 <= 4 ) {
- resize_entry(cache_ptr, file_ptr, i, data[i].len);
+ resize_entry(i, data[i].len);
}
}
@@ -5541,22 +5514,22 @@ trace_file_check(void)
insert_entry(cache_ptr, file_ptr, 3, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 0);
- mark_pinned_or_protected_entry_dirty(cache_ptr, file_ptr, 0);
+ mark_pinned_or_protected_entry_dirty(0);
unlock_entry(cache_ptr, file_ptr, 0, H5AC__NO_FLAGS_SET);
lock_entry(cache_ptr, file_ptr, 1);
- pin_protected_entry(cache_ptr, file_ptr, 1, TRUE);
+ pin_protected_entry(1, TRUE);
unlock_entry(cache_ptr, file_ptr, 1, H5AC__NO_FLAGS_SET);
unpin_entry(cache_ptr, file_ptr, 1, TRUE, FALSE, FALSE);
expunge_entry(cache_ptr,file_ptr, 1);
lock_entry(cache_ptr, file_ptr, 2);
- pin_protected_entry(cache_ptr, file_ptr, 2, TRUE);
+ pin_protected_entry(2, TRUE);
unlock_entry(cache_ptr, file_ptr, 2, H5AC__NO_FLAGS_SET);
- mark_pinned_entry_dirty(cache_ptr, file_ptr, 2, FALSE, 0);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len / 2);
- resize_entry(cache_ptr, file_ptr, 2, data[2].len);
+ mark_pinned_entry_dirty(2, FALSE, 0);
+ resize_entry(2, data[2].len / 2);
+ resize_entry(2, data[2].len);
unpin_entry(cache_ptr, file_ptr, 2, TRUE, FALSE, FALSE);
rename_entry(cache_ptr, file_ptr, 0, 20);