summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-11-04 05:53:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-11-04 05:53:55 (GMT)
commitaf057ac92bf35cdc6a8c39004d32f9294bc36a68 (patch)
tree7918fdffcf42222decbf3eed34d579c6cfa84144 /src
parent0263062a6f884734d06554be8a58186032a8281f (diff)
downloadhdf5-af057ac92bf35cdc6a8c39004d32f9294bc36a68.zip
hdf5-af057ac92bf35cdc6a8c39004d32f9294bc36a68.tar.gz
hdf5-af057ac92bf35cdc6a8c39004d32f9294bc36a68.tar.bz2
Add logging prototypes and cache struct fields.
Diffstat (limited to 'src')
-rw-r--r--src/H5Cpkg.h26
-rw-r--r--src/H5Cprivate.h7
2 files changed, 33 insertions, 0 deletions
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index cf2da3e..92f4cdd 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -3201,6 +3201,29 @@ if ( ( (entry_ptr) == NULL ) || \
* When we get to using H5C in other places, we may add
* code to write trace file data at the H5C level as well.
*
+ * logging_enabled: Boolean flag indicating whether cache logging
+ * which is used to record cache operations for use in
+ * debugging and performance analysis. When this flag is set
+ * to TRUE, it means that the log file is open and ready to
+ * receive log entries. It does NOT mean that cache operations
+ * are currently being recorded. That is controlled by the
+ * currently_logging flag (below).
+ *
+ * Since much of the code supporting the parallel metadata
+ * cache is in H5AC, we don't write the trace file from
+ * H5C. Instead, H5AC reads the trace_file_ptr as needed.
+ *
+ * When we get to using H5C in other places, we may add
+ * code to write trace file data at the H5C level as well.
+ *
+ * currently_logging: Boolean flag that indicates if cache operations are
+ * currently being logged. This flag is flipped by the
+ * H5Fstart/stop_mdc_logging functions.
+ *
+ * log_file_ptr: File pointer pointing to the log file. The I/O functions
+ * in stdio.h are used to write to the log file regardless of
+ * the VFD selected.
+ *
* aux_ptr: Pointer to void used to allow wrapper code to associate
* its data with an instance of H5C_t. The H5C cache code
* sets this field to NULL, and otherwise leaves it alone.
@@ -4059,6 +4082,9 @@ struct H5C_t {
uint32_t magic;
hbool_t flush_in_progress;
FILE * trace_file_ptr;
+ hbool_t logging_enabled;
+ hbool_t currently_logging;
+ FILE * log_file_ptr;
void * aux_ptr;
int32_t max_type_id;
const char * (* type_name_table_ptr);
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 4137edf..9b0dbd4 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -1961,6 +1961,13 @@ H5_DLL H5C_t *H5C_create(size_t max_cache_size, size_t min_clean_size,
int max_type_id, const char *(*type_name_table_ptr),
H5C_write_permitted_func_t check_write_permitted, hbool_t write_permitted,
H5C_log_flush_func_t log_flush, void *aux_ptr);
+H5_DLL herr_t H5C_set_up_logging(H5C_t *cache_ptr, const char log_location[], hbool_t start_immediately);
+H5_DLL herr_t H5C_tear_down_logging(H5C_t *cache_ptr);
+H5_DLL herr_t H5C_start_logging(H5C_t *cache_ptr);
+H5_DLL herr_t H5C_stop_logging(H5C_t *cache_ptr);
+H5_DLL herr_t H5C_get_logging_status(const H5C_t *cache_ptr, /*OUT*/ hbool_t *is_enabled,
+ /*OUT*/ hbool_t *is_currently_logging);
+H5_DLL herr_t H5C_write_log_message(const H5C_t *cache_ptr, const char message[]);
H5_DLL void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, int32_t version,
double hit_rate, enum H5C_resize_status status,
size_t old_max_cache_size, size_t new_max_cache_size,