summaryrefslogtreecommitdiffstats
path: root/src/H5Ctag.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2019-02-06 16:49:51 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-02-06 18:02:36 (GMT)
commit29fc6bcd77b0e975d807ecedf16b998493f88bb0 (patch)
tree252f04ce82bbac557bfe2d564917c05af7b3843d /src/H5Ctag.c
parent9063babaaa9b3c11a686ca9faefb70aa2091c21a (diff)
downloadhdf5-29fc6bcd77b0e975d807ecedf16b998493f88bb0.zip
hdf5-29fc6bcd77b0e975d807ecedf16b998493f88bb0.tar.gz
hdf5-29fc6bcd77b0e975d807ecedf16b998493f88bb0.tar.bz2
Merge pull request #1522 in HDFFV/hdf5 from ~VCHOI/my_hdf5_fork:develop to develop
* commit '7f5741825db0737db5ac46c43009681508a73002': Add release notes information. Modification based on feedback from pull request. Modification based on feedback from pull request. There is performance issue when closing an object. The slow down is due to the search of the "tag_list" to find out the "corked" status of an object. The fix: (1) Add a counter "num_objs_corked" in the cache structure to track the number of "corked" objects. (2) Skip the search of "tag_list" if the counter is zero i.e. no "corked" objects. Conflicts: release_docs/RELEASE.txt
Diffstat (limited to 'src/H5Ctag.c')
-rw-r--r--src/H5Ctag.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index 66aedd9..d1ede0f 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -175,6 +175,32 @@ H5C_get_ignore_tags(const H5C_t *cache_ptr)
/*-------------------------------------------------------------------------
*
+ * Function: H5C_get_num_objs_corked
+ *
+ * Purpose: Retrieve the 'num_objs_corked' field for the cache
+ *
+ * Return: 'num_objs_corked' value (can't fail)
+ *
+ * Programmer: Vailin Choi; Feb 2019
+ *
+ *-------------------------------------------------------------------------
+ */
+uint32_t
+H5C_get_num_objs_corked(const H5C_t *cache_ptr)
+{
+ FUNC_ENTER_NOAPI_NOERR
+
+ /* Sanity checks */
+ HDassert(cache_ptr);
+ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
+
+ /* Return value for num_objs_corked */
+ FUNC_LEAVE_NOAPI(cache_ptr->num_objs_corked)
+} /* H5C_get_num_objs_corked */
+
+
+/*-------------------------------------------------------------------------
+ *
* Function: H5C__tag_entry
*
* Purpose: Tags an entry with the provided tag (contained in the API context).