summaryrefslogtreecommitdiffstats
path: root/test/cache_common.h
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 /test/cache_common.h
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 'test/cache_common.h')
-rw-r--r--test/cache_common.h90
1 files changed, 43 insertions, 47 deletions
diff --git a/test/cache_common.h b/test/cache_common.h
index d150f2a..7f2af16 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -81,7 +81,11 @@
#define MAX_ENTRIES (10 * 1024)
-#define PICO_BASE_ADDR (haddr_t)0
+/* The choice of the BASE_ADDR below is arbitrary -- it just has to be
+ * larger than the superblock.
+ */
+#define BASE_ADDR (haddr_t)1024
+#define PICO_BASE_ADDR BASE_ADDR
#define NANO_BASE_ADDR (haddr_t)(PICO_BASE_ADDR + \
(PICO_ENTRY_SIZE * NUM_PICO_ENTRIES))
#define MICRO_BASE_ADDR (haddr_t)(NANO_BASE_ADDR + \
@@ -125,6 +129,9 @@
(MONSTER_ENTRY_SIZE * NUM_MONSTER_ENTRIES))
#define NOTIFY_ALT_BASE_ADDR (haddr_t)(VARIABLE_ALT_BASE_ADDR + \
(VARIABLE_ENTRY_SIZE * NUM_VARIABLE_ENTRIES))
+#define MAX_ADDR (haddr_t)(NOTIFY_ALT_BASE_ADDR + \
+ (NOTIFY_ENTRY_SIZE * NUM_NOTIFY_ENTRIES))
+#define ADDR_SPACE_SIZE (haddr_t)(MAX_ADDR - BASE_ADDR)
#define MAX_PINS 8 /* Maximum number of entries that can be
* directly pinned by a single entry.
@@ -474,15 +481,15 @@ struct expected_entry_status
int entry_type;
int entry_index;
size_t size;
- hbool_t in_cache;
- hbool_t at_main_addr;
- hbool_t is_dirty;
- hbool_t is_protected;
- hbool_t is_pinned;
- hbool_t loaded;
- hbool_t cleared;
- hbool_t flushed;
- hbool_t destroyed;
+ unsigned char in_cache;
+ unsigned char at_main_addr;
+ unsigned char is_dirty;
+ unsigned char is_protected;
+ unsigned char is_pinned;
+ unsigned char loaded;
+ unsigned char cleared;
+ unsigned char flushed;
+ unsigned char destroyed;
int flush_dep_par_type; /* Entry type of flush dependency parent */
int flush_dep_par_idx; /* Index of flush dependency parent */
uint64_t child_flush_dep_height_rc[H5C__NUM_FLUSH_DEP_HEIGHTS];
@@ -644,29 +651,27 @@ haddr_t type_and_index_to_addr(int32_t type,
int32_t idx);
#endif
-void dirty_entry(H5C_t * cache_ptr,
+void dirty_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty_pin);
-void expunge_entry(H5C_t * cache_ptr,
+void expunge_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void insert_entry(H5C_t * cache_ptr,
+void insert_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
hbool_t dirty,
unsigned int flags);
-void mark_pinned_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_entry_dirty(int32_t type,
int32_t idx,
hbool_t size_changed,
size_t new_size);
-void mark_pinned_or_protected_entry_dirty(H5C_t * cache_ptr,
- int32_t type,
+void mark_pinned_or_protected_entry_dirty(int32_t type,
int32_t idx);
void rename_entry(H5C_t * cache_ptr,
@@ -674,36 +679,30 @@ void rename_entry(H5C_t * cache_ptr,
int32_t idx,
hbool_t main_addr);
-void protect_entry(H5C_t * cache_ptr,
+void protect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void protect_entry_ro(H5C_t * cache_ptr,
+void protect_entry_ro(H5F_t * file_ptr,
int32_t type,
int32_t idx);
-void pin_entry(H5C_t * cache_ptr,
- int32_t type,
+void pin_entry(int32_t type,
int32_t idx);
hbool_t entry_in_cache(H5C_t * cache_ptr,
int32_t type,
int32_t idx);
-void create_pinned_entry_dependency(H5C_t * cache_ptr,
+void create_pinned_entry_dependency(H5F_t * file_ptr,
int pinning_type,
int pinning_idx,
int pinned_type,
int pinned_idx);
-void execute_flush_op(H5C_t * cache_ptr,
- struct test_entry_t * entry_ptr,
- struct flush_op * op_ptr,
- unsigned * flags_ptr);
-
void reset_entries(void);
-void resize_entry(H5C_t * cache_ptr,
+void resize_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
size_t new_size,
@@ -714,9 +713,9 @@ void resize_pinned_entry(H5C_t * cache_ptr,
int32_t idx,
size_t new_size);
-H5C_t * setup_cache(size_t max_cache_size, size_t min_clean_size);
+H5F_t *setup_cache(size_t max_cache_size, size_t min_clean_size);
-void row_major_scan_forward(H5C_t * cache_ptr,
+void row_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -731,7 +730,7 @@ void row_major_scan_forward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_forward(H5C_t * cache_ptr,
+void hl_row_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -740,7 +739,7 @@ void hl_row_major_scan_forward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void row_major_scan_backward(H5C_t * cache_ptr,
+void row_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -755,7 +754,7 @@ void row_major_scan_backward(H5C_t * cache_ptr,
int dirty_destroys,
int dirty_unprotects);
-void hl_row_major_scan_backward(H5C_t * cache_ptr,
+void hl_row_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -764,7 +763,7 @@ void hl_row_major_scan_backward(H5C_t * cache_ptr,
hbool_t do_inserts,
hbool_t dirty_inserts);
-void col_major_scan_forward(H5C_t * cache_ptr,
+void col_major_scan_forward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -774,7 +773,7 @@ void col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_forward(H5C_t * cache_ptr,
+void hl_col_major_scan_forward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -784,7 +783,7 @@ void hl_col_major_scan_forward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void col_major_scan_backward(H5C_t * cache_ptr,
+void col_major_scan_backward(H5F_t * file_ptr,
int32_t lag,
hbool_t verbose,
hbool_t reset_stats,
@@ -794,7 +793,7 @@ void col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void hl_col_major_scan_backward(H5C_t * cache_ptr,
+void hl_col_major_scan_backward(H5F_t * file_ptr,
int32_t max_index,
hbool_t verbose,
hbool_t reset_stats,
@@ -804,26 +803,25 @@ void hl_col_major_scan_backward(H5C_t * cache_ptr,
hbool_t dirty_inserts,
int dirty_unprotects);
-void takedown_cache(H5C_t * cache_ptr,
+void takedown_cache(H5F_t * file_ptr,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void flush_cache(H5C_t * cache_ptr,
+void flush_cache(H5F_t * file_ptr,
hbool_t destroy_entries,
hbool_t dump_stats,
hbool_t dump_detailed_stats);
-void unpin_entry(H5C_t * cache_ptr,
- int32_t type,
+void unpin_entry(int32_t type,
int32_t idx);
-void unprotect_entry(H5C_t * cache_ptr,
+void unprotect_entry(H5F_t * file_ptr,
int32_t type,
int32_t idx,
int dirty,
unsigned int flags);
-void unprotect_entry_with_size_change(H5C_t * cache_ptr,
+void unprotect_entry_with_size_change(H5F_t * file_ptr,
int32_t type,
int32_t idx,
unsigned int flags,
@@ -838,14 +836,12 @@ void verify_entry_status(H5C_t * cache_ptr,
void verify_unprotected(void);
-void create_flush_dependency(H5C_t * cache_ptr,
- int32_t parent_type,
+void create_flush_dependency(int32_t parent_type,
int32_t parent_idx,
int32_t child_type,
int32_t child_idx);
-void destroy_flush_dependency(H5C_t * cache_ptr,
- int32_t parent_type,
+void destroy_flush_dependency(int32_t parent_type,
int32_t parent_idx,
int32_t child_type,
int32_t child_idx);