[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-184-g67b02ca

Service Account git at mcs.anl.gov
Tue Sep 22 17:32:19 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".

The branch, dev-modular has been updated
       via  67b02ca5120f74d7a7134f2761bc4db0e6b2bead (commit)
      from  991aaa2fbf770a5e4c03848ce6a4e8aa7896f582 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 67b02ca5120f74d7a7134f2761bc4db0e6b2bead
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date:   Tue Sep 22 17:31:54 2015 -0500

    x-macro the logutil defs

-----------------------------------------------------------------------

Summary of changes:
 darshan-log-format.h            |   17 ++++++++---------
 darshan-util/darshan-logutils.c |   22 ++++------------------
 darshan-util/darshan-logutils.h |    2 +-
 3 files changed, 13 insertions(+), 28 deletions(-)


Diff of changes:
diff --git a/darshan-log-format.h b/darshan-log-format.h
index a7cc4e3..07fe9b5 100644
--- a/darshan-log-format.h
+++ b/darshan-log-format.h
@@ -33,23 +33,22 @@
 
 #define DARSHAN_MAX_MODS 16
 
-/* TODO: do we want the logutil defs here ? */
 /* X-macro for keeping module ordering consistent */
 /* NOTE: first val used to define module enum values, 
  * second val used to define module name strings, and
  * third val is used to provide the name of a 
  * corresponding logutils structure for parsing module
- * data out of the log file (only used in darshan-util,
- * just pass NULL (no quotes) if no log parsing
- * functions are required).
+ * data out of the log file (only used in darshan-util
+ * component -- NULL can be passed if there are no
+ * logutil definitions)
  */
 #define DARSHAN_MODULE_IDS \
     X(DARSHAN_NULL_MOD, "NULL", NULL) \
-    X(DARSHAN_POSIX_MOD, "POSIX", posix_logutils) \
-    X(DARSHAN_MPIIO_MOD, "MPI-IO", mpiio_logutils) \
-    X(DARSHAN_HDF5_MOD, "HDF5", hdf5_logutils) \
-    X(DARSHAN_PNETCDF_MOD, "PNETCDF", pnetcdf_logutils) \
-    X(DARSHAN_BGQ_MOD, "BG/Q", bgq_logutils)
+    X(DARSHAN_POSIX_MOD, "POSIX", &posix_logutils) \
+    X(DARSHAN_MPIIO_MOD, "MPI-IO", &mpiio_logutils) \
+    X(DARSHAN_HDF5_MOD, "HDF5", &hdf5_logutils) \
+    X(DARSHAN_PNETCDF_MOD, "PNETCDF", &pnetcdf_logutils) \
+    X(DARSHAN_BGQ_MOD, "BG/Q", &bgq_logutils)
 
 /* unique identifiers to distinguish between available darshan modules */
 /* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]
diff --git a/darshan-util/darshan-logutils.c b/darshan-util/darshan-logutils.c
index aa4afde..732fac7 100644
--- a/darshan-util/darshan-logutils.c
+++ b/darshan-util/darshan-logutils.c
@@ -88,27 +88,13 @@ static int darshan_log_dzunload(darshan_fd fd, struct darshan_log_map *map_p);
 
 /* TODO: check comments on functions to make sure they are right /cleanup */
 
-/* TODO: can we make this s.t. we don't care about ordering (i.e., X macro it ) */
-/* see gzip interface for ideas */
+/* each module's implementation of the darshan logutil functions */
+#define X(a, b, c) c,
 struct darshan_mod_logutil_funcs *mod_logutils[DARSHAN_MAX_MODS] =
 {
-    NULL,               /* NULL */
-    &posix_logutils,    /* POSIX */
-    &mpiio_logutils,    /* MPI-IO */
-    &hdf5_logutils,     /* HDF5 */
-    &pnetcdf_logutils,  /* PNETCDF */
-    &bgq_logutils,      /* BG/Q */
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL
+    DARSHAN_MODULE_IDS
 };
+#undef X
 
 /* darshan_log_open()
  *
diff --git a/darshan-util/darshan-logutils.h b/darshan-util/darshan-logutils.h
index 7274341..d6c120a 100644
--- a/darshan-util/darshan-logutils.h
+++ b/darshan-util/darshan-logutils.h
@@ -68,7 +68,7 @@ struct darshan_mod_logutil_funcs
     );
 };
 
-extern struct darshan_mod_logutil_funcs *mod_logutils[DARSHAN_MAX_MODS];
+extern struct darshan_mod_logutil_funcs *mod_logutils[];
 
 #include "darshan-posix-logutils.h"
 #include "darshan-mpiio-logutils.h"


hooks/post-receive
--



More information about the Darshan-commits mailing list