summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-06-06 03:42:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-06-06 03:42:19 (GMT)
commit20534386613804a7300ea7b8c421a52d0cfd4255 (patch)
tree168505ae5001fa06b3030d3566c805e02078e5bd /src
parent03dafc5ebe2f964c4b2bf4af323def564dbb76f6 (diff)
downloadhdf5-20534386613804a7300ea7b8c421a52d0cfd4255.zip
hdf5-20534386613804a7300ea7b8c421a52d0cfd4255.tar.gz
hdf5-20534386613804a7300ea7b8c421a52d0cfd4255.tar.bz2
[svn-r30023] Description:
Make the trace open/close routines static. Tested on: MacOSX/64 10.11.5 (amazon) w/serial, parallel & production (h5committest forthcoming)
Diffstat (limited to 'src')
-rw-r--r--src/H5AC.c34
-rw-r--r--src/H5ACprivate.h60
2 files changed, 47 insertions, 47 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 213e5d5..cb587df 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -70,6 +70,8 @@ static herr_t H5AC__ext_config_2_int_config(H5AC_cache_config_t *ext_conf_ptr,
#if H5AC_DO_TAGGING_SANITY_CHECKS
static herr_t H5AC__verify_tag(hid_t dxpl_id, const H5AC_class_t * type);
#endif /* H5AC_DO_TAGGING_SANITY_CHECKS */
+static herr_t H5AC__open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name);
+static herr_t H5AC__close_trace_file(H5AC_t *cache_ptr);
/*********************/
@@ -540,8 +542,8 @@ H5AC_dest(H5F_t *f, hid_t dxpl_id)
#endif /* H5AC_DUMP_STATS_ON_CLOSE */
#if H5AC__TRACE_FILE_ENABLED
- if(H5AC_close_trace_file(f->shared->cache) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_close_trace_file() failed.")
+ if(H5AC__close_trace_file(f->shared->cache) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__close_trace_file() failed.")
#endif /* H5AC__TRACE_FILE_ENABLED */
#ifdef H5_HAVE_PARALLEL
@@ -1803,11 +1805,11 @@ H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr, H5AC_cache_config_t *config
/* Close & reopen trace file, if requested */
if(config_ptr->close_trace_file)
- if(H5AC_close_trace_file(cache_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_close_trace_file() failed.")
+ if(H5AC__close_trace_file(cache_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC__close_trace_file() failed.")
if(config_ptr->open_trace_file)
- if(H5AC_open_trace_file(cache_ptr, config_ptr->trace_file_name) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "H5AC_open_trace_file() failed.")
+ if(H5AC__open_trace_file(cache_ptr, config_ptr->trace_file_name) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "H5AC__open_trace_file() failed.")
/* Convert external configuration to internal representation */
if(H5AC__ext_config_2_int_config(config_ptr, &internal_config) < 0)
@@ -1957,7 +1959,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_close_trace_file()
+ * Function: H5AC__close_trace_file()
*
* Purpose: If a trace file is open, stop logging calls to the cache,
* and close the file.
@@ -1972,13 +1974,13 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5AC_close_trace_file(H5AC_t *cache_ptr)
+static herr_t
+H5AC__close_trace_file(H5AC_t *cache_ptr)
{
FILE * trace_file_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
if(cache_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "NULL cache_ptr on entry.")
@@ -1996,11 +1998,11 @@ H5AC_close_trace_file(H5AC_t *cache_ptr)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_close_trace_file() */
+} /* H5AC__close_trace_file() */
/*-------------------------------------------------------------------------
- * Function: H5AC_open_trace_file()
+ * Function: H5AC__open_trace_file()
*
* Purpose: Open a trace file, and start logging calls to the cache.
*
@@ -2015,14 +2017,14 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
-H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name)
+static herr_t
+H5AC__open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name)
{
char file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 2];
FILE * file_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_STATIC
HDassert(cache_ptr);
@@ -2068,7 +2070,7 @@ H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_open_trace_file() */
+} /* H5AC__open_trace_file() */
/*************************************************************************/
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 23b909f..4b00b3c 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -53,35 +53,35 @@
/* Types of metadata objects cached */
typedef enum {
- H5AC_BT_ID = 0, /*B-tree nodes */
- H5AC_SNODE_ID, /*symbol table nodes */
- H5AC_LHEAP_PRFX_ID, /*local heap prefix */
- H5AC_LHEAP_DBLK_ID, /*local heap data block */
- H5AC_GHEAP_ID, /*global heap */
- H5AC_OHDR_ID, /*object header */
- H5AC_OHDR_CHK_ID, /*object header chunk */
- H5AC_BT2_HDR_ID, /*v2 B-tree header */
- H5AC_BT2_INT_ID, /*v2 B-tree internal node */
- H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */
- H5AC_FHEAP_HDR_ID, /*fractal heap header */
- H5AC_FHEAP_DBLOCK_ID, /*fractal heap direct block */
- H5AC_FHEAP_IBLOCK_ID, /*fractal heap indirect block */
- H5AC_FSPACE_HDR_ID, /*free space header */
- H5AC_FSPACE_SINFO_ID,/*free space sections */
- H5AC_SOHM_TABLE_ID, /*shared object header message master table */
- H5AC_SOHM_LIST_ID, /*shared message index stored as a list */
- H5AC_EARRAY_HDR_ID, /*extensible array header */
- H5AC_EARRAY_IBLOCK_ID, /*extensible array index block */
- H5AC_EARRAY_SBLOCK_ID, /*extensible array super block */
- H5AC_EARRAY_DBLOCK_ID, /*extensible array data block */
- H5AC_EARRAY_DBLK_PAGE_ID, /*extensible array data block page */
- H5AC_FARRAY_HDR_ID, /*fixed array header */
- H5AC_FARRAY_DBLOCK_ID, /*fixed array data block */
- H5AC_FARRAY_DBLK_PAGE_ID, /*fixed array data block page */
- H5AC_SUPERBLOCK_ID, /* file superblock */
- H5AC_DRVRINFO_ID, /* driver info block (supplements superblock)*/
- H5AC_TEST_ID, /*test entry -- not used for actual files */
- H5AC_NTYPES /* Number of types, must be last */
+ H5AC_BT_ID = 0, /* ( 0) B-tree nodes */
+ H5AC_SNODE_ID, /* ( 1) symbol table nodes */
+ H5AC_LHEAP_PRFX_ID, /* ( 2) local heap prefix */
+ H5AC_LHEAP_DBLK_ID, /* ( 3) local heap data block */
+ H5AC_GHEAP_ID, /* ( 4) global heap */
+ H5AC_OHDR_ID, /* ( 5) object header */
+ H5AC_OHDR_CHK_ID, /* ( 6) object header chunk */
+ H5AC_BT2_HDR_ID, /* ( 8) v2 B-tree header */
+ H5AC_BT2_INT_ID, /* ( 9) v2 B-tree internal node */
+ H5AC_BT2_LEAF_ID, /* (10) v2 B-tree leaf node */
+ H5AC_FHEAP_HDR_ID, /* (11) fractal heap header */
+ H5AC_FHEAP_DBLOCK_ID, /* (12) fractal heap direct block */
+ H5AC_FHEAP_IBLOCK_ID, /* (13) fractal heap indirect block */
+ H5AC_FSPACE_HDR_ID, /* (14) free space header */
+ H5AC_FSPACE_SINFO_ID, /* (15) free space sections */
+ H5AC_SOHM_TABLE_ID, /* (16) shared object header message master table */
+ H5AC_SOHM_LIST_ID, /* (17) shared message index stored as a list */
+ H5AC_EARRAY_HDR_ID, /* (18) extensible array header */
+ H5AC_EARRAY_IBLOCK_ID, /* (19) extensible array index block */
+ H5AC_EARRAY_SBLOCK_ID, /* (20) extensible array super block */
+ H5AC_EARRAY_DBLOCK_ID, /* (21) extensible array data block */
+ H5AC_EARRAY_DBLK_PAGE_ID, /* (22) extensible array data block page */
+ H5AC_FARRAY_HDR_ID, /* (23) fixed array header */
+ H5AC_FARRAY_DBLOCK_ID, /* (24) fixed array data block */
+ H5AC_FARRAY_DBLK_PAGE_ID, /* (25) fixed array data block page */
+ H5AC_SUPERBLOCK_ID, /* (26) file superblock */
+ H5AC_DRVRINFO_ID, /* (27) driver info block (supplements superblock)*/
+ H5AC_TEST_ID, /* (28) test entry -- not used for actual files */
+ H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
/* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when
@@ -353,8 +353,6 @@ H5_DLL herr_t H5AC_reset_cache_hit_rate_stats(H5AC_t *cache_ptr);
H5_DLL herr_t H5AC_set_cache_auto_resize_config(H5AC_t *cache_ptr,
H5AC_cache_config_t *config_ptr);
H5_DLL herr_t H5AC_validate_config(H5AC_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC_close_trace_file(H5AC_t *cache_ptr);
-H5_DLL herr_t H5AC_open_trace_file(H5AC_t *cache_ptr, const char *trace_file_name);
/* Tag & Ring routines */
H5_DLL herr_t H5AC_tag(hid_t dxpl_id, haddr_t metadata_tag, haddr_t *prev_tag);