summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorMike McGreevy <mamcgree@hdfgroup.org>2010-06-15 20:00:22 (GMT)
committerMike McGreevy <mamcgree@hdfgroup.org>2010-06-15 20:00:22 (GMT)
commit60ecd356b2e24f125a5fd7abbdb57569af76f3ba (patch)
treed5f77e77b2f5d62529e98101ed7af65d0dcd3650 /src/H5O.c
parent84f6de6f28553171029bc61560eb869bc2207fa2 (diff)
downloadhdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.zip
hdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.tar.gz
hdf5-60ecd356b2e24f125a5fd7abbdb57569af76f3ba.tar.bz2
[svn-r19005] Purpose:
Commit metadata tagging framework. Description: This check-in contains a new framework whose goal is to apply a tag value to each new entry in the metadata cache as it is created. This tag value is such that it relates each piece of metadata to the HDF5 object that it belongs to (dataset, group, et cetera). This changeset includes the framework that applies the tags as well as a suite of tests to verify correct tag application, though does not yet make use of the tag values to flush/evict individual objects. Please refer to the "flush/evict individual objects" RFC for further discussion of these changes. Tested: jam, amani, linew (h5committest) liberty, abe, blue print
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/H5O.c b/src/H5O.c
index ae5c429..94b647b 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1231,11 +1231,17 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, hid_t ocpl_id,
oh->mesg[0].raw_size = size_hint - H5O_SIZEOF_MSGHDR_OH(oh);
oh->mesg[0].chunkno = 0;
+ /* Set metadata tag in dxpl_id */
+ H5_BEGIN_TAG(dxpl_id, oh_addr, FAIL);
+
/* Cache object header */
if(H5AC_set(f, dxpl_id, H5AC_OHDR, oh_addr, oh, H5AC__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINSERT, FAIL, "unable to cache object header")
oh = NULL;
+ /* Reset metadata tag in dxpl_id */
+ H5_END_TAG(FAIL);
+
/* Set up object location */
loc->file = f;
loc->addr = oh_addr;
@@ -1580,7 +1586,7 @@ H5O_link(const H5O_loc_t *loc, int adjust, hid_t dxpl_id)
hbool_t deleted = FALSE; /* Whether the object was deleted */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_link, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5O_link, dxpl_id, loc->addr, FAIL)
/* check args */
HDassert(loc);
@@ -1601,7 +1607,7 @@ done:
if(ret_value >= 0 && deleted && H5O_delete(loc->file, dxpl_id, loc->addr) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "can't delete object from file")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5O_link() */
@@ -1631,7 +1637,7 @@ H5O_protect(const H5O_loc_t *loc, hid_t dxpl_id, H5AC_protect_t prot)
unsigned file_intent; /* R/W intent on file */
H5O_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_protect, NULL)
+ FUNC_ENTER_NOAPI_TAG(H5O_protect, dxpl_id, loc->addr, NULL)
/* check args */
HDassert(loc);
@@ -1818,7 +1824,7 @@ done:
if(H5AC_unprotect(loc->file, dxpl_id, H5AC_OHDR, loc->addr, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, NULL)
} /* end H5O_protect() */
@@ -2168,7 +2174,7 @@ H5O_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr)
unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_delete, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5O_delete, dxpl_id, addr, FAIL)
/* Check args */
HDassert(f);
@@ -2194,7 +2200,7 @@ done:
if(oh && H5O_unprotect(&loc, dxpl_id, oh, oh_flags) < 0)
HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5O_delete() */
@@ -2261,7 +2267,7 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header for location */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_obj_type, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5O_obj_type, dxpl_id, loc->addr, FAIL)
/* Load the object header */
if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
@@ -2275,7 +2281,7 @@ done:
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5O_obj_type() */
@@ -2339,7 +2345,7 @@ H5O_obj_class(const H5O_loc_t *loc, hid_t dxpl_id)
H5O_t *oh = NULL; /* Object header for location */
const H5O_obj_class_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_obj_class)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5O_obj_class, dxpl_id, loc->addr, NULL)
/* Load the object header */
if(NULL == (oh = H5O_protect(loc, dxpl_id, H5AC_READ)))
@@ -2353,7 +2359,7 @@ done:
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, NULL, "unable to release object header")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, NULL)
} /* end H5O_obj_class() */
@@ -2745,7 +2751,7 @@ H5O_get_info(const H5O_loc_t *loc, hid_t dxpl_id, hbool_t want_ih_info,
H5O_t *oh = NULL; /* Object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_get_info, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5O_get_info, dxpl_id, loc->addr, FAIL)
/* Check args */
HDassert(loc);
@@ -2843,7 +2849,7 @@ done:
if(oh && H5O_unprotect(loc, dxpl_id, oh, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5O_get_info() */