diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-03-23 13:48:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 13:48:05 (GMT) |
commit | fbb532cd633e216f47ce846493b38af02cfbb43a (patch) | |
tree | 1ef7bc9f25ec0832f8b25bb8ea4be34d53bd144d /src/H5Fpkg.h | |
parent | 78375882485a99a81caa933928ed08d7a38ef88b (diff) | |
download | hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.zip hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.gz hdf5-fbb532cd633e216f47ce846493b38af02cfbb43a.tar.bz2 |
VFD SWMR: Normalization with develop (#1506)
* Brought over plugin and test script changes
* Removes remaining register keywords (#1481)
* Fixed warnings in the aux process code
* Minor fixes from develop
* Minor changes from develop, fixed format warnings
* Formatted source
* Added HD prefix to timespec_get
* Cleanup in new files
* Removes the MANIFEST file and unused release files (#1497)
* Removes the MANIFEST file and unused release files
* Updated tar command
* checkposix corrections
* More checkposix fixes
* Ripped out unused instrumentation functionality
* Brought over cache tagging changes from develop
* Changes to tagged metadata expulsion iteration
* Fixed typo
* Brought over H5O__free() changes from develop
* Brings (unused) parallel page buffer test in line with develop
* Moved the functionality in supervise.subr to test_vfd_swmr.sh
* Tools VFD parameter updates
* Committing clang-format changes
* H5F VFD SWMR refactoring
* Committing clang-format changes
* Misc changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Fpkg.h')
-rw-r--r-- | src/H5Fpkg.h | 118 |
1 files changed, 61 insertions, 57 deletions
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 2edcc60..ca714c1 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -153,6 +153,62 @@ /* Size of file consistency flags (status_flags) in the superblock */ #define H5F_SUPER_STATUS_FLAGS_SIZE(v) (v >= 2 ? 1 : 4) +/* VFD SMWR LOG REPORTING MACROS */ + +/* H5F_POST_VFD_SWMR_LOG_ENTRY is the macro that can help the developers debug VFD SWMR features. + * It calls an internal reporting function H5F_post_vfd_swmr_log_entry() that receives + * a log entry_type_code, which generates a log tag, and the message log_info, which + * the developers want to save into a log file. + * + * The macro H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, number_entry_production, m) is + * called by H5F_POST_VFD_SWMR_LOG_ENTRY when the HDF5 library is built with the + * production mode. Number_entry_production will control the number of entry tags that + * applications can receive. Currently this number is set to 1 and is subject to change + * when more tags are useful to be present to applications. + * + * The first argument of the macro is the HDF5 file pointer(H5F_t *). + * Its value needs to be checked to avoid a failure caused by "Low-Level File I/O " + * in the testhdf5 program, which involves the test of a non-existing HDF5 file. + */ + +#define H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info) \ + do { \ + if (fp != NULL) { \ + if (fp->shared != NULL) { \ + if (fp->shared->vfd_swmr_log_on == TRUE) { \ + H5F__post_vfd_swmr_log_entry(fp, entry_type_code, log_info); \ + } \ + } \ + } \ + } while (0) + +#define H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(fp, entry_type_code, max_code, log_info) \ + do { \ + if (entry_type_code < max_code) { \ + H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info); \ + } \ + } while (0) + +/* Note: change H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) on the following lines to + * H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, your_number_entry_production, m) + * as necessary. + */ +#ifndef NDEBUG +#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(f, c, m) +#else +#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) +#endif + +/* Macros for VFD SWMR log entry code + * Note: this should be consistent with const char *H5Fvfd_swmr_log_tags[] declared at + * H5Fvfd_swmr.c . + */ +#define EOT_PROCESSING_TIME 0 +#define FILE_OPEN 1 +#define FILE_CLOSE 2 +#define EOT_TRIGGER_TIME 3 +#define EOT_META_FILE_INDEX 4 + /* Forward declaration external file cache struct used below (defined in * H5Fefc.c) */ typedef struct H5F_efc_t H5F_efc_t; @@ -564,6 +620,8 @@ H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t hi H5_DLL herr_t H5F__get_cont_info(const H5F_t *f, H5VL_file_cont_info_t *info); H5_DLL herr_t H5F__parse_file_lock_env_var(htri_t *use_locks); H5_DLL herr_t H5F__delete(const char *filename, hid_t fapl_id); + +/* VFD SWMR routines */ H5_DLL herr_t H5F__vfd_swmr_end_tick(H5F_t *f); H5_DLL herr_t H5F__vfd_swmr_disable_end_of_tick(H5F_t *f); H5_DLL herr_t H5F__vfd_swmr_enable_end_of_tick(H5F_t *f); @@ -626,6 +684,9 @@ H5_DLL herr_t H5F__get_max_eof_eoa(const H5F_t *f, haddr_t *max_eof_eoa); /* Functions that flush or evict */ H5_DLL herr_t H5F__evict_cache_entries(H5F_t *f); +/* VFD SWMR log functions */ +H5_DLL void H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info); + /* Testing functions */ #ifdef H5F_TESTING H5_DLL herr_t H5F__get_sohm_mesg_count_test(hid_t fid, unsigned type_id, size_t *mesg_count); @@ -641,61 +702,4 @@ H5_DLL htri_t H5F__same_file_test(hid_t file_id1, hid_t file_id2); H5_DLL herr_t H5F__reparse_file_lock_variable_test(void); #endif /* H5F_TESTING */ -/* VFD SMWR LOG REPORTING MACROS */ - -/* H5F_POST_VFD_SWMR_LOG_ENTRY is the macro that can help the developers debug VFD SWMR features. - * It calls an internal reporting function H5F_post_vfd_swmr_log_entry() that receives - * a log entry_type_code, which generates a log tag, and the message log_info, which - * the developers want to save into a log file. - * - * The macro H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, number_entry_production, m) is - * called by H5F_POST_VFD_SWMR_LOG_ENTRY when the HDF5 library is built with the - * production mode. Number_entry_production will control the number of entry tags that - * applications can receive. Currently this number is set to 1 and is subject to change - * when more tags are useful to be present to applications. - * - * The first argument of the macro is the HDF5 file pointer(H5F_t *). - * Its value needs to be checked to avoid a failure caused by "Low-Level File I/O " - * in the testhdf5 program, which involves the test of a non-existing HDF5 file. - */ - -H5_DLL void H5F__post_vfd_swmr_log_entry(H5F_t *f, int entry_type_code, const char *log_info); - -#define H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info) \ - do { \ - if (fp != NULL) { \ - if (fp->shared != NULL) { \ - if (fp->shared->vfd_swmr_log_on == TRUE) { \ - H5F__post_vfd_swmr_log_entry(fp, entry_type_code, log_info); \ - } \ - } \ - } \ - } while (0) - -#define H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(fp, entry_type_code, max_code, log_info) \ - do { \ - if (entry_type_code < max_code) { \ - H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(fp, entry_type_code, log_info); \ - } \ - } while (0) - -/* Note: change H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) on the following lines to - * H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, your_number_entry_production, m) - * as necessary. - */ -#ifndef NDEBUG -#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_INTERNAL(f, c, m) -#else -#define H5F_POST_VFD_SWMR_LOG_ENTRY(f, c, m) H5F_POST_VFD_SWMR_LOG_ENTRY_PRODUCTION(f, c, 1, m) -#endif - -/* Macros for VFD SWMR log entry code - * Note: this should be consistent with const char *H5Fvfd_swmr_log_tags[] declared at - * H5Fvfd_swmr.c . - */ -#define EOT_PROCESSING_TIME 0 -#define FILE_OPEN 1 -#define FILE_CLOSE 2 -#define EOT_TRIGGER_TIME 3 -#define EOT_META_FILE_INDEX 4 #endif /* H5Fpkg_H */ |