[Darshan-commits] [Git][darshan/darshan][mmap-dev] fix comment and shuffle some more code

Shane Snyder xgitlab at cels.anl.gov
Wed Jun 8 17:34:42 CDT 2016


Shane Snyder pushed to branch mmap-dev at darshan / darshan


Commits:
54baa7dd by Shane Snyder at 2016-06-08T17:34:05-05:00
fix comment and shuffle some more code

- - - - -


2 changed files:

- darshan-runtime/darshan.h
- darshan-runtime/lib/darshan-posix.c


Changes:

=====================================
darshan-runtime/darshan.h
=====================================
--- a/darshan-runtime/darshan.h
+++ b/darshan-runtime/darshan.h
@@ -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,


=====================================
darshan-runtime/lib/darshan-posix.c
=====================================
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -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,



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/54baa7ddf924fdcea333761b93b4b2fc10168702
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160608/be597f36/attachment-0001.html>


More information about the Darshan-commits mailing list