summaryrefslogtreecommitdiffstats
path: root/src/H5SM.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/H5SM.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/H5SM.c')
-rwxr-xr-xsrc/H5SM.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/H5SM.c b/src/H5SM.c
index 0525037..b26e1b1 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -131,7 +131,7 @@ H5SM_init(H5F_t *f, H5P_genplist_t * fc_plist, const H5O_loc_t *ext_loc, hid_t d
unsigned x; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_init, NULL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_init, dxpl_id, H5AC__SOHM_TAG, NULL)
HDassert(f);
/* File should not already have a SOHM table */
@@ -236,7 +236,7 @@ done:
table = H5FL_FREE(H5SM_master_table_t, table);
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_init() */
@@ -346,7 +346,7 @@ H5SM_type_shared(H5F_t *f, unsigned type_id, hid_t dxpl_id)
size_t u; /* Local index variable */
htri_t ret_value = FALSE; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_type_shared)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_type_shared, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Translate the H5O type_id into an H5SM type flag */
if(H5SM_type_to_flag(type_id, &type_flag) < 0)
@@ -378,7 +378,7 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_type_shared() */
@@ -403,7 +403,7 @@ H5SM_get_fheap_addr(H5F_t *f, hid_t dxpl_id, unsigned type_id, haddr_t *fheap_ad
ssize_t index_num; /* Which index */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_get_fheap_addr, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_get_fheap_addr, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity checks */
HDassert(f);
@@ -428,7 +428,7 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_get_fheap_addr() */
@@ -630,7 +630,7 @@ H5SM_create_list(H5F_t *f, H5SM_index_header_t *header, hid_t dxpl_id)
haddr_t addr = HADDR_UNDEF; /* Address of the list on disk */
haddr_t ret_value;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_create_list)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_create_list, dxpl_id, H5AC__SOHM_TAG, HADDR_UNDEF)
HDassert(f);
HDassert(header);
@@ -672,7 +672,7 @@ done:
H5MF_xfree(f, H5FD_MEM_SOHM_INDEX, dxpl_id, addr, (hsize_t)header->list_size);
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, HADDR_UNDEF)
} /* end H5SM_create_list */
@@ -813,7 +813,7 @@ H5SM_convert_btree_to_list(H5F_t * f, H5SM_index_header_t * header, hid_t dxpl_i
haddr_t btree_addr;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_convert_btree_to_list)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_convert_btree_to_list, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Remember the address of the old B-tree, but change the header over to be
* a list..
@@ -846,7 +846,7 @@ done:
if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, header->index_addr, list, H5AC__DIRTIED_FLAG) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to unprotect SOHM index")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_convert_btree_to_list() */
@@ -922,7 +922,7 @@ H5SM_can_share(H5F_t *f, hid_t dxpl_id, H5SM_master_table_t *table,
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI(H5SM_can_share, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_can_share, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
if((tri_ret = H5SM_can_share_common(f, type_id, mesg)) < 0)
@@ -967,7 +967,7 @@ done:
if(my_table && my_table != table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, my_table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_can_share() */
@@ -1036,7 +1036,7 @@ H5SM_try_share(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
htri_t tri_ret;
htri_t ret_value = TRUE;
- FUNC_ENTER_NOAPI(H5SM_try_share, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_try_share, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* "trivial" sharing checks */
if(mesg_flags && (*mesg_flags & H5O_MSG_FLAG_DONTSHARE))
@@ -1090,7 +1090,7 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, cache_flags) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_try_share() */
@@ -1195,7 +1195,7 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
size_t empty_pos = UFAIL; /* Empty entry in list */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_write_mesg)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_write_mesg, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(header);
@@ -1402,7 +1402,7 @@ done:
if(encoding_buf)
encoding_buf = H5MM_xfree(encoding_buf);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_write_mesg() */
@@ -1436,7 +1436,7 @@ H5SM_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_shared_t *sh_mesg)
unsigned type_id; /* Message type ID to operate on */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5SM_delete, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_delete, dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(f->shared->sohm_addr != HADDR_UNDEF);
@@ -1493,7 +1493,7 @@ done:
if(mesg_buf)
mesg_buf = H5MM_xfree(mesg_buf);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_delete() */
@@ -1665,7 +1665,7 @@ H5SM_delete_from_index(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
unsigned type_id; /* Message type to operate on */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_delete_from_index)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_delete_from_index, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
@@ -1826,7 +1826,7 @@ done:
if(encoding_buf && (NULL == *encoded_mesg || ret_value < 0))
encoding_buf = H5MM_xfree(encoding_buf);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_delete_from_index() */
@@ -1852,7 +1852,7 @@ H5SM_get_info(const H5O_loc_t *ext_loc, H5P_genplist_t *fc_plist, hid_t dxpl_id)
htri_t status; /* Status for message existing */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_get_info, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_get_info, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(ext_loc);
@@ -1941,7 +1941,7 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_get_info() */
@@ -2039,7 +2039,7 @@ H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id,
void * encoding_buf = NULL; /* Buffer for encoded message */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5SM_get_refcount)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_get_refcount, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
@@ -2133,7 +2133,7 @@ done:
if(encoding_buf)
encoding_buf = H5MM_xfree(encoding_buf);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_get_refcount() */
@@ -2257,7 +2257,7 @@ H5SM_read_mesg(H5F_t *f, const H5SM_sohm_t *mesg, H5HF_t *fheap,
H5O_t *oh = NULL; /* Object header for message in object header */
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT(H5SM_read_mesg)
+ FUNC_ENTER_NOAPI_NOINIT_TAG(H5SM_read_mesg, dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(mesg);
@@ -2331,7 +2331,7 @@ done:
if(ret_value < 0 && udata.encoding_buf)
udata.encoding_buf = H5MM_xfree(udata.encoding_buf);
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_read_mesg */
@@ -2417,7 +2417,7 @@ H5SM_table_debug(H5F_t *f, hid_t dxpl_id, haddr_t table_addr,
unsigned x; /* Counter variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_table_debug, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_table_debug, dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(table_addr != HADDR_UNDEF);
@@ -2478,7 +2478,7 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, table_addr, table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_table_debug() */
@@ -2508,7 +2508,7 @@ H5SM_list_debug(H5F_t *f, hid_t dxpl_id, haddr_t list_addr,
unsigned x; /* Counter variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_list_debug, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_list_debug, dxpl_id, H5AC__SOHM_TAG, FAIL)
HDassert(f);
HDassert(list_addr != HADDR_UNDEF);
@@ -2568,7 +2568,7 @@ done:
if(list && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_LIST, list_addr, list, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM index")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_list_debug() */
@@ -2595,10 +2595,10 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info)
H5SM_table_cache_ud_t cache_udata; /* User-data for callback */
H5HF_t *fheap = NULL; /* Fractal heap handle */
H5B2_t *bt2 = NULL; /* v2 B-tree handle for index */
- unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned u; /* Local index variable */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5SM_ih_size, FAIL)
+ FUNC_ENTER_NOAPI_TAG(H5SM_ih_size, dxpl_id, H5AC__SOHM_TAG, FAIL)
/* Sanity check */
HDassert(f);
@@ -2665,6 +2665,6 @@ done:
if(table && H5AC_unprotect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, table, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_SOHM, H5E_CANTUNPROTECT, FAIL, "unable to close SOHM master table")
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5SM_ih_size() */