summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2016-09-19 20:18:30 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2016-09-19 20:18:30 (GMT)
commit2646f917adb5b2e17404260e433dc3ed7c39a602 (patch)
tree81bdef26f7c5a696fcacd5d824ef8abf97d80d2e
parent29b169abb3ab8fcb0c1e75693def8829433dd6a0 (diff)
downloadhdf5-2646f917adb5b2e17404260e433dc3ed7c39a602.zip
hdf5-2646f917adb5b2e17404260e433dc3ed7c39a602.tar.gz
hdf5-2646f917adb5b2e17404260e433dc3ed7c39a602.tar.bz2
Cleaned up feature for dissemination to LLNL:
- Removed support for datatypes. - Commented out support for groups - General change clean-up - Added a list of improvements to BRANCH.txt
-rw-r--r--BRANCH.txt14
-rw-r--r--src/H5Ctag.c12
-rw-r--r--src/H5Gint.c18
-rw-r--r--src/H5O.c8
4 files changed, 33 insertions, 19 deletions
diff --git a/BRANCH.txt b/BRANCH.txt
index 9efaed8..6c4ee6c 100644
--- a/BRANCH.txt
+++ b/BRANCH.txt
@@ -6,3 +6,17 @@ on object close.
Dana Robinson is in charge of the branch, which follows the trunk.
It will be deleted when the feature is merged to the trunk.
+
+Key changes:
+
+* New H5Pset/get_evict_on_close() functions that enable and disable
+ the feature (default: disabled).
+
+* New property: H5F_ACS_EVICT_ON_CLOSE_FLAG
+
+* Added match_global flag to H5AC_evict_tagged_metadata() and
+ H5C_evict_tagged_entries() parameter lists.
+
+* H5D_close() updated to evict on close, when the property is set.
+
+* New evict_on_close test to exercise the function.
diff --git a/src/H5Ctag.c b/src/H5Ctag.c
index fc01ecb..e1b4df6 100644
--- a/src/H5Ctag.c
+++ b/src/H5Ctag.c
@@ -374,15 +374,15 @@ H5C_evict_tagged_entries(H5F_t * f, hid_t dxpl_id, haddr_t tag, hbool_t match_gl
/* Start evicting entries */
do {
- /* Reset pinned/evicted tracking flags */
- ctx.pinned_entries_need_evicted = FALSE;
- ctx.evicted_entries_last_pass = FALSE;
+ /* Reset pinned/evicted tracking flags */
+ ctx.pinned_entries_need_evicted = FALSE;
+ ctx.evicted_entries_last_pass = FALSE;
- /* Iterate through entries in the cache */
+ /* Iterate through entries in the cache */
if(H5C__iter_tagged_entries(cache, tag, match_global, H5C__evict_tagged_entries_cb, &ctx) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_BADITER, match_global, "Iteration of tagged entries failed")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "Iteration of tagged entries failed")
- /* Keep doing this until we have stopped evicted entries */
+ /* Keep doing this until we have stopped evicted entries */
} while(TRUE == ctx.evicted_entries_last_pass);
/* Fail if we have finished evicting entries and pinned entries still need evicted */
diff --git a/src/H5Gint.c b/src/H5Gint.c
index ff92ecc..4b34015 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -501,20 +501,24 @@ H5G_close(H5G_t *grp)
if(H5O_close(&(grp->oloc)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+#ifdef DER
+ /* XXX - NOT IMPLEMENTED */
/* Evict group metadata if evicting on close */
if(H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
-// printf("EVICTING GROUP (TAG: 0x%3llx)\n", grp->oloc.addr);
-// printf("DUMPING CACHE - BEFORE FLUSH\n");
-// H5AC_dump_cache(grp->oloc.file);
+ /* I've left in the cache dump code for now - DER */
+ printf("EVICTING GROUP (TAG: 0x%3llx)\n", grp->oloc.addr);
+ printf("DUMPING CACHE - BEFORE FLUSH\n");
+ H5AC_dump_cache(grp->oloc.file);
if(H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr, H5AC_ind_read_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata")
-// printf("DUMPING CACHE - BETWEEN FLUSH AND EVICT\n");
-// H5AC_dump_cache(grp->oloc.file);
+ printf("DUMPING CACHE - BETWEEN FLUSH AND EVICT\n");
+ H5AC_dump_cache(grp->oloc.file);
if(H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE, H5AC_ind_read_dxpl_id) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata")
-// printf("DUMPING CACHE - AFTER EVICT\n");
-// H5AC_dump_cache(grp->oloc.file);
+ printf("DUMPING CACHE - AFTER EVICT\n");
+ H5AC_dump_cache(grp->oloc.file);
} /* end if */
+#endif /* DER */
/* Free memory */
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
diff --git a/src/H5O.c b/src/H5O.c
index aa30e79..d1806a1 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1069,18 +1069,14 @@ H5Oclose(hid_t object_id)
/* Get the type of the object and close it in the correct way */
switch(H5I_get_type(object_id)) {
case H5I_GROUP:
+ case H5I_DATATYPE:
case H5I_DATASET:
if(H5I_object(object_id) == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
if(H5I_dec_app_ref(object_id) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
break;
- case H5I_DATATYPE:
- if(H5I_object(object_id) == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object")
- if(H5T_close_id(object_id) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close object")
- break;
+
case H5I_UNINIT:
case H5I_BADID:
case H5I_FILE: