Commit 54baa7dd authored by Shane Snyder's avatar Shane Snyder

fix comment and shuffle some more code

parent d8f3575a
......@@ -134,7 +134,8 @@ darshan_record_id darshan_core_gen_record_id(
* is the size of the record being registered with Darshan. If given,
* 'file_alignment' is a pointer to an integer which on return will
* contain the corresponding file system alignment of the file system
* path 'name' resides on.
* path 'name' resides on. Returns a pointer to the address the record
* should be written to on success, NULL on failure.
*/
void *darshan_core_register_record(
darshan_record_id rec_id,
......
......@@ -1574,6 +1574,32 @@ static void posix_aio_tracker_add(int fd, void *aiocbp)
return;
}
static void posix_finalize_file_records(void *rec_ref_p)
{
struct posix_file_record_ref *rec_ref =
(struct posix_file_record_ref *)rec_ref_p;
#ifndef __DARSHAN_ENABLE_MMAP_LOGS
/* walk common counters to get 4 most common -- only if mmap
* feature is disabled (mmap updates counters on the go)
*/
/* common accesses */
darshan_walk_common_vals(rec_ref->access_root,
&(rec_ref->file_rec->counters[POSIX_ACCESS1_ACCESS]),
&(rec_ref->file_rec->counters[POSIX_ACCESS1_COUNT]));
/* common strides */
darshan_walk_common_vals(rec_ref->stride_root,
&(rec_ref->file_rec->counters[POSIX_STRIDE1_STRIDE]),
&(rec_ref->file_rec->counters[POSIX_STRIDE1_COUNT]));
#endif
tdestroy(rec_ref->access_root, free);
tdestroy(rec_ref->stride_root, free);
return;
}
static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
int *len, MPI_Datatype *datatype)
{
......@@ -1901,32 +1927,6 @@ static void posix_begin_shutdown()
return;
}
static void posix_finalize_file_records(void *rec_ref_p)
{
struct posix_file_record_ref *rec_ref =
(struct posix_file_record_ref *)rec_ref_p;
#ifndef __DARSHAN_ENABLE_MMAP_LOGS
/* walk common counters to get 4 most common -- only if mmap
* feature is disabled (mmap updates counters on the go)
*/
/* common accesses */
darshan_walk_common_vals(rec_ref->access_root,
&(rec_ref->file_rec->counters[POSIX_ACCESS1_ACCESS]),
&(rec_ref->file_rec->counters[POSIX_ACCESS1_COUNT]));
/* common strides */
darshan_walk_common_vals(rec_ref->stride_root,
&(rec_ref->file_rec->counters[POSIX_STRIDE1_STRIDE]),
&(rec_ref->file_rec->counters[POSIX_STRIDE1_COUNT]));
#endif
tdestroy(rec_ref->access_root, free);
tdestroy(rec_ref->stride_root, free);
return;
}
static void posix_get_output_data(
MPI_Comm mod_comm,
darshan_record_id *shared_recs,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment