diff options
Diffstat (limited to 'test/cache_common.h')
-rw-r--r-- | test/cache_common.h | 90 |
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); |