00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _H5ACprivate_H
00033 #define _H5ACprivate_H
00034
00035 #include "H5ACpublic.h"
00036
00037
00038 #include "H5private.h"
00039 #include "H5Fprivate.h"
00040 #include "H5Cprivate.h"
00041
00042 #ifdef H5_METADATA_TRACE_FILE
00043 #define H5AC__TRACE_FILE_ENABLED 1
00044 #else
00045 #define H5AC__TRACE_FILE_ENABLED 0
00046 #endif
00047
00048
00049 typedef enum {
00050 H5AC_BT_ID = 0,
00051 H5AC_SNODE_ID,
00052 H5AC_LHEAP_ID,
00053 H5AC_GHEAP_ID,
00054 H5AC_OHDR_ID,
00055 H5AC_BT2_HDR_ID,
00056 H5AC_BT2_INT_ID,
00057 H5AC_BT2_LEAF_ID,
00058 H5AC_FHEAP_HDR_ID,
00059 H5AC_FHEAP_DBLOCK_ID,
00060 H5AC_FHEAP_IBLOCK_ID,
00061 H5AC_FSPACE_HDR_ID,
00062 H5AC_FSPACE_SINFO_ID,
00063 H5AC_SOHM_TABLE_ID,
00064 H5AC_SOHM_LIST_ID,
00065 H5AC_TEST_ID,
00066 H5AC_NTYPES
00067 } H5AC_type_t;
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #if H5C_COLLECT_CACHE_STATS
00079
00080 #define H5AC_DUMP_STATS_ON_CLOSE 0
00081
00082 #else
00083
00084 #define H5AC_DUMP_STATS_ON_CLOSE 0
00085
00086 #endif
00087
00088
00089
00090
00091
00092 #define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
00093 #define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 #define H5AC_CALLBACK__NO_FLAGS_SET H5C_CALLBACK__NO_FLAGS_SET
00121 #define H5AC_CALLBACK__SIZE_CHANGED_FLAG H5C_CALLBACK__SIZE_CHANGED_FLAG
00122 #define H5AC_CALLBACK__RENAMED_FLAG H5C_CALLBACK__RENAMED_FLAG
00123
00124 typedef H5C_load_func_t H5AC_load_func_t;
00125 typedef H5C_flush_func_t H5AC_flush_func_t;
00126 typedef H5C_dest_func_t H5AC_dest_func_t;
00127 typedef H5C_clear_func_t H5AC_clear_func_t;
00128 typedef H5C_size_func_t H5AC_size_func_t;
00129
00130 typedef H5C_class_t H5AC_class_t;
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146 #define H5AC_NSLOTS 10330
00147
00148
00149 typedef H5C_cache_entry_t H5AC_info_t;
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 typedef enum H5AC_protect_t {
00162 H5AC_WRITE,
00163 H5AC_READ
00164 } H5AC_protect_t;
00165
00166
00167
00168 typedef H5C_t H5AC_t;
00169
00170
00171
00172 #ifdef H5_HAVE_PARALLEL
00173
00174 #define H5AC_BLOCK_BEFORE_META_WRITE_NAME "H5AC_block_before_meta_write"
00175 #define H5AC_BLOCK_BEFORE_META_WRITE_SIZE sizeof(unsigned)
00176 #define H5AC_BLOCK_BEFORE_META_WRITE_DEF 0
00177
00178
00179 #define H5AC_LIBRARY_INTERNAL_NAME "H5AC_library_internal"
00180 #define H5AC_LIBRARY_INTERNAL_SIZE sizeof(unsigned)
00181 #define H5AC_LIBRARY_INTERNAL_DEF 0
00182 #endif
00183
00184
00185
00186
00187 extern hid_t H5AC_dxpl_id;
00188
00189
00190
00191
00192 extern hid_t H5AC_ind_dxpl_id;
00193
00194
00195
00196
00197 #define H5AC__DEFAULT_CACHE_CONFIG \
00198 { \
00199 H5C__CURR_AUTO_SIZE_CTL_VER, \
00200 FALSE, \
00201 FALSE, \
00202 FALSE, \
00203 "", \
00204 TRUE, \
00205 TRUE, \
00206 ( 2 * 1024 * 1024), \
00207 0.3, \
00208 (16 * 1024 * 1024), \
00209 ( 1 * 1024 * 1024), \
00210 50000, \
00211 H5C_incr__threshold, \
00212 0.9, \
00213 2.0, \
00214 TRUE, \
00215 (4 * 1024 * 1024), \
00216 \
00217 H5C_flash_incr__add_space, \
00218 1.0, \
00219 0.25, \
00220 H5C_decr__age_out_with_threshold,\
00221 0.999, \
00222 0.9, \
00223 TRUE, \
00224 (1 * 1024 * 1024), \
00225 3, \
00226 TRUE, \
00227 0.1, \
00228 (256 * 1024) \
00229 }
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241 #define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
00242 #define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
00243 #define H5AC__DELETED_FLAG H5C__DELETED_FLAG
00244 #define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
00245 #define H5AC__SIZE_CHANGED_FLAG H5C__SIZE_CHANGED_FLAG
00246 #define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
00247 #define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
00248 #define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
00249 #define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
00250 #define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG
00251 #define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG
00252 #define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
00253 #define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG
00254
00255
00256
00257
00258
00259
00260 #define H5AC_ES__IN_CACHE 0x0001
00261 #define H5AC_ES__IS_DIRTY 0x0002
00262 #define H5AC_ES__IS_PROTECTED 0x0004
00263 #define H5AC_ES__IS_PINNED 0x0008
00264
00265
00266
00267
00268 H5_DLL herr_t H5AC_init(void);
00269 H5_DLL herr_t H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr);
00270 H5_DLL herr_t H5AC_get_entry_status(H5F_t * f, haddr_t addr,
00271 unsigned * status_ptr);
00272 H5_DLL herr_t H5AC_set(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
00273 haddr_t addr, void *thing, unsigned int flags);
00274 H5_DLL herr_t H5AC_pin_protected_entry(H5F_t * f, void * thing);
00275 H5_DLL void * H5AC_protect(H5F_t *f, hid_t dxpl_id, const H5AC_class_t *type,
00276 haddr_t addr, const void *udata1, void *udata2,
00277 H5AC_protect_t rw);
00278 H5_DLL herr_t H5AC_resize_pinned_entry(H5F_t * f,
00279 void * thing,
00280 size_t new_size);
00281 H5_DLL herr_t H5AC_unpin_entry(H5F_t * f,
00282 void * thing);
00283 H5_DLL herr_t H5AC_unprotect(H5F_t *f, hid_t dxpl_id,
00284 const H5AC_class_t *type, haddr_t addr,
00285 void *thing, unsigned flags);
00286 H5_DLL herr_t H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags);
00287 H5_DLL herr_t H5AC_mark_pinned_entry_dirty(H5F_t * f,
00288 void * thing,
00289 hbool_t size_changed,
00290 size_t new_size);
00291 H5_DLL herr_t H5AC_mark_pinned_or_protected_entry_dirty(H5F_t * f,
00292 void * thing);
00293 H5_DLL herr_t H5AC_rename(H5F_t *f, const H5AC_class_t *type,
00294 haddr_t old_addr, haddr_t new_addr);
00295
00296 H5_DLL herr_t H5AC_dest(H5F_t *f, hid_t dxpl_id);
00297
00298 H5_DLL herr_t H5AC_expunge_entry(H5F_t *f, hid_t dxpl_id,
00299 const H5AC_class_t *type, haddr_t addr,
00300 unsigned flags);
00301
00302 H5_DLL herr_t H5AC_set_write_done_callback(H5C_t * cache_ptr,
00303 void (* write_done)(void));
00304 H5_DLL herr_t H5AC_stats(const H5F_t *f);
00305
00306 H5_DLL herr_t H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr,
00307 H5AC_cache_config_t *config_ptr);
00308
00309 H5_DLL herr_t H5AC_get_cache_size(H5AC_t * cache_ptr,
00310 size_t * max_size_ptr,
00311 size_t * min_clean_size_ptr,
00312 size_t * cur_size_ptr,
00313 int32_t * cur_num_entries_ptr);
00314
00315 H5_DLL herr_t H5AC_get_cache_hit_rate(H5AC_t * cache_ptr,
00316 double * hit_rate_ptr);
00317
00318 H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t * cache_ptr);
00319
00320 H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr,
00321 H5AC_cache_config_t *config_ptr);
00322
00323 H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t * config_ptr);
00324
00325 H5_DLL herr_t H5AC_close_trace_file( H5AC_t * cache_ptr);
00326
00327 H5_DLL herr_t H5AC_open_trace_file(H5AC_t * cache_ptr,
00328 const char * trace_file_name);
00329
00330 #endif
00331