summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 8503cb7..cfb8a17 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1824,6 +1824,40 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5AC_dump_cache
+ *
+ * Purpose: Dumps a summary of the contents of the metadata cache
+ * to stdout.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * Sunday, October 10, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5AC_dump_cache(const H5F_t *f)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5AC_dump_cache, FAIL)
+
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->cache);
+
+ if ( H5C_dump_cache(f->shared->cache, H5F_OPEN_NAME(f)) < 0 ) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5C_dump_cache() failed.")
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5AC_dump_cache() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5AC_get_cache_auto_resize_config
*
* Purpose: Wrapper function for H5C_get_cache_auto_resize_config().
@@ -2465,7 +2499,9 @@ H5AC_open_trace_file(H5AC_t * cache_ptr,
#else /* H5_HAVE_PARALLEL */
- sprintf(file_name, "%s", trace_file_name);
+ HDsnprintf(file_name,
+ (size_t)(H5AC__MAX_TRACE_FILE_NAME_LEN + H5C__PREFIX_LEN + 1),
+ "%s", trace_file_name);
#endif /* H5_HAVE_PARALLEL */