[Darshan-commits] [Darshan] branch, dev-modular, updated. darshan-2.3.1-90-g13b92a1

Service Account git at mcs.anl.gov
Mon Apr 6 15:36:28 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  13b92a1f8d0fc3f3e603424e1686cbbfab1b2282 (commit)
      from  b70229e4c9d745170efca03084c3b3b244792eb5 (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 13b92a1f8d0fc3f3e603424e1686cbbfab1b2282
Author: Shane Snyder <ssnyder at mcs.anl.gov>
Date:   Mon Apr 6 15:36:11 2015 -0500

    adding posix common access/stride counters

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

Summary of changes:
 darshan-posix-log-format.h          |   76 ++++-----
 darshan-runtime/darshan.h           |   23 +++
 darshan-runtime/lib/darshan-posix.c |  321 +++++++++++++++++++++++++++++++----
 darshan-util/darshan-posix-parser.c |   72 ++++++++
 4 files changed, 420 insertions(+), 72 deletions(-)


Diff of changes:
diff --git a/darshan-posix-log-format.h b/darshan-posix-log-format.h
index 68f2ecf..23b5bf9 100644
--- a/darshan-posix-log-format.h
+++ b/darshan-posix-log-format.h
@@ -39,47 +39,45 @@ enum darshan_posix_indices
     POSIX_FILE_ALIGNMENT,     /* file alignment in bytes */
     POSIX_MAX_READ_TIME_SIZE,
     POSIX_MAX_WRITE_TIME_SIZE,
-#if 0
     /* buckets */
-    SIZE_READ_0_100,          /* count of posix read size ranges */
-    SIZE_READ_100_1K,
-    SIZE_READ_1K_10K,
-    SIZE_READ_10K_100K,
-    SIZE_READ_100K_1M,
-    SIZE_READ_1M_4M,
-    SIZE_READ_4M_10M,
-    SIZE_READ_10M_100M,
-    SIZE_READ_100M_1G,
-    SIZE_READ_1G_PLUS,
+    POSIX_SIZE_READ_0_100,    /* count of posix read size ranges */
+    POSIX_SIZE_READ_100_1K,
+    POSIX_SIZE_READ_1K_10K,
+    POSIX_SIZE_READ_10K_100K,
+    POSIX_SIZE_READ_100K_1M,
+    POSIX_SIZE_READ_1M_4M,
+    POSIX_SIZE_READ_4M_10M,
+    POSIX_SIZE_READ_10M_100M,
+    POSIX_SIZE_READ_100M_1G,
+    POSIX_SIZE_READ_1G_PLUS,
     /* buckets */
-    SIZE_WRITE_0_100,         /* count of posix write size ranges */
-    SIZE_WRITE_100_1K,
-    SIZE_WRITE_1K_10K,
-    SIZE_WRITE_10K_100K,
-    SIZE_WRITE_100K_1M,
-    SIZE_WRITE_1M_4M,
-    SIZE_WRITE_4M_10M,
-    SIZE_WRITE_10M_100M,
-    SIZE_WRITE_100M_1G,
-    SIZE_WRITE_1G_PLUS,
-    /* counters */
-    STRIDE1_STRIDE,           /* the four most frequently appearing strides */
-    STRIDE2_STRIDE,
-    STRIDE3_STRIDE,
-    STRIDE4_STRIDE,
-    STRIDE1_COUNT,            /* count of each of the most frequent strides */
-    STRIDE2_COUNT,
-    STRIDE3_COUNT,
-    STRIDE4_COUNT,
-    ACCESS1_ACCESS,           /* the four most frequently appearing access sizes */
-    ACCESS2_ACCESS,
-    ACCESS3_ACCESS,
-    ACCESS4_ACCESS,
-    ACCESS1_COUNT,            /* count of each of the most frequent access sizes */
-    ACCESS2_COUNT,
-    ACCESS3_COUNT,
-    ACCESS4_COUNT,
-#endif
+    POSIX_SIZE_WRITE_0_100,   /* count of posix write size ranges */
+    POSIX_SIZE_WRITE_100_1K,
+    POSIX_SIZE_WRITE_1K_10K,
+    POSIX_SIZE_WRITE_10K_100K,
+    POSIX_SIZE_WRITE_100K_1M,
+    POSIX_SIZE_WRITE_1M_4M,
+    POSIX_SIZE_WRITE_4M_10M,
+    POSIX_SIZE_WRITE_10M_100M,
+    POSIX_SIZE_WRITE_100M_1G,
+    POSIX_SIZE_WRITE_1G_PLUS,
+    /* stride/access counters */
+    POSIX_STRIDE1_STRIDE,     /* the four most frequently appearing strides */
+    POSIX_STRIDE2_STRIDE,
+    POSIX_STRIDE3_STRIDE,
+    POSIX_STRIDE4_STRIDE,
+    POSIX_STRIDE1_COUNT,      /* count of each of the most frequent strides */
+    POSIX_STRIDE2_COUNT,
+    POSIX_STRIDE3_COUNT,
+    POSIX_STRIDE4_COUNT,
+    POSIX_ACCESS1_ACCESS,     /* the four most frequently appearing access sizes */
+    POSIX_ACCESS2_ACCESS,
+    POSIX_ACCESS3_ACCESS,
+    POSIX_ACCESS4_ACCESS,
+    POSIX_ACCESS1_COUNT,      /* count of each of the most frequent access sizes */
+    POSIX_ACCESS2_COUNT,
+    POSIX_ACCESS3_COUNT,
+    POSIX_ACCESS4_COUNT,
     POSIX_FASTEST_RANK,
     POSIX_FASTEST_RANK_BYTES,
     POSIX_SLOWEST_RANK,
diff --git a/darshan-runtime/darshan.h b/darshan-runtime/darshan.h
index eff89b9..b9c7066 100644
--- a/darshan-runtime/darshan.h
+++ b/darshan-runtime/darshan.h
@@ -102,6 +102,29 @@
         (__rec_p)->counters[__counter] = __value; \
 } while(0)
 
+#define DARSHAN_BUCKET_INC(__rec_p, __counter_base, __value) do {\
+    if(__value < 101) \
+        (__rec_p)->counters[__counter_base] += 1; \
+    else if(__value < 1025) \
+        (__rec_p)->counters[__counter_base+1] += 1; \
+    else if(__value < 10241) \
+        (__rec_p)->counters[__counter_base+2] += 1; \
+    else if(__value < 102401) \
+        (__rec_p)->counters[__counter_base+3] += 1; \
+    else if(__value < 1048577) \
+        (__rec_p)->counters[__counter_base+4] += 1; \
+    else if(__value < 4194305) \
+        (__rec_p)->counters[__counter_base+5] += 1; \
+    else if(__value < 10485761) \
+        (__rec_p)->counters[__counter_base+6] += 1; \
+    else if(__value < 104857601) \
+        (__rec_p)->counters[__counter_base+7] += 1; \
+    else if(__value < 1073741825) \
+        (__rec_p)->counters[__counter_base+8] += 1; \
+    else \
+        (__rec_p)->counters[__counter_base+9] += 1; \
+} while(0)
+
 /* module developers provide the following functions to darshan-core */
 struct darshan_module_funcs
 {
diff --git a/darshan-runtime/lib/darshan-posix.c b/darshan-runtime/lib/darshan-posix.c
index 2a97aff..a647f0e 100644
--- a/darshan-runtime/lib/darshan-posix.c
+++ b/darshan-runtime/lib/darshan-posix.c
@@ -4,6 +4,9 @@
  *
  */
 
+#define _XOPEN_SOURCE 500
+#define _GNU_SOURCE
+
 #include "darshan-runtime-config.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -21,7 +24,6 @@
 #include <assert.h>
 #include <libgen.h>
 #include <aio.h>
-#define __USE_GNU
 #include <pthread.h>
 
 #include "uthash.h"
@@ -35,6 +37,7 @@ typedef int64_t off64_t;
 #define aiocb64 aiocb
 #endif
 
+/* TODO: this probably shouldn't be here long term -- MPI symbols mess up LD_PRELOAD */
 #ifdef DARSHAN_PRELOAD
 extern double (*__real_PMPI_Comm_rank)(MPI_Comm comm, int *rank);
 #endif
@@ -79,19 +82,11 @@ DARSHAN_FORWARD_DECL(fclose, int, (FILE *fp));
 /* TODO aio */
 /* TODO listio */
 
-static void posix_runtime_initialize(void);
-static struct posix_file_runtime* posix_file_by_name(const char *name);
-static struct posix_file_runtime* posix_file_by_name_setfd(const char* name, int fd);
-static struct posix_file_runtime* posix_file_by_fd(int fd);
-static void posix_file_close_fd(int fd);
-
-static void posix_disable_instrumentation(void);
-static void posix_prepare_for_reduction(darshan_record_id *shared_recs,
-    int *shared_rec_count, void **send_buf, void **recv_buf, int *rec_size);
-static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
-    int *len, MPI_Datatype *datatype);
-static void posix_get_output_data(void **buffer, int *size);
-static void posix_shutdown(void);
+/* maximum number of access sizes and stride sizes that darshan will track
+ * per file at runtime; at log time they will be reduced into the 4 most
+ * frequently occurring ones 
+ */
+#define POSIX_MAX_ACCESS_COUNT_RUNTIME 32
 
 enum posix_io_type
 {
@@ -99,6 +94,18 @@ enum posix_io_type
     POSIX_WRITE = 2,
 };
 
+enum posix_counter_type
+{
+    POSIX_COUNTER_ACCESS,
+    POSIX_COUNTER_STRIDE
+};
+
+struct posix_access_counter
+{
+    int64_t size;
+    int freq;
+};
+
 /* The posix_file_runtime structure maintains necessary runtime metadata
  * for the POSIX file record (darshan_posix_file structure, defined in
  * darshan-posix-log-format.h) pointed to by 'file_record'. This metadata
@@ -132,6 +139,10 @@ struct posix_file_runtime
     double last_meta_end;
     double last_read_end;
     double last_write_end;
+    void* access_root;
+    int access_count;
+    void* stride_root;
+    int stride_count;
     UT_hash_handle hlink;
 };
 
@@ -187,9 +198,59 @@ static int instrumentation_disabled = 0;
 static int my_rank = -1;
 static int darshan_mem_alignment = 1;
 
+/* global variables for determining 4 most common accesses/strides */
+static struct posix_file_runtime* walker_file = NULL;
+static int walker_validx;
+static int walker_cntidx;
+
+static void posix_runtime_initialize(void);
+static struct posix_file_runtime* posix_file_by_name(const char *name);
+static struct posix_file_runtime* posix_file_by_name_setfd(const char* name, int fd);
+static struct posix_file_runtime* posix_file_by_fd(int fd);
+static void posix_file_close_fd(int fd);
+static void posix_access_counter(struct posix_file_runtime* file, ssize_t size,
+    enum posix_counter_type type);
+static void posix_access_walker(const void* nodep, const VISIT which, const int depth);
+static void posix_walk_file_accesses(void);
+static int posix_access_compare(const void* a_p, const void* b_p);
+static int posix_file_compare(const void* a, const void* b);
+
+static void posix_disable_instrumentation(void);
+static void posix_prepare_for_reduction(darshan_record_id *shared_recs,
+    int *shared_rec_count, void **send_buf, void **recv_buf, int *rec_size);
+static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
+    int *len, MPI_Datatype *datatype);
+static void posix_get_output_data(void **buffer, int *size);
+static void posix_shutdown(void);
+
 #define POSIX_LOCK() pthread_mutex_lock(&posix_runtime_mutex)
 #define POSIX_UNLOCK() pthread_mutex_unlock(&posix_runtime_mutex)
 
+#define POSIX_COMMON_COUNTER_INC(__rec_p, __value, __count, __validx, __cntidx) do {\
+    int i; \
+    int set = 0; \
+    int64_t min = DARSHAN_COUNTER_VALUE(__rec_p, __cntidx); \
+    int min_index = 0; \
+    if(__value == 0) break; \
+    for(i=0; i<4; i++) { \
+        /* increment bucket if already exists */ \
+        if(DARSHAN_COUNTER_VALUE(__rec_p, __validx + i) == __value) { \
+            DARSHAN_COUNTER_INC(__rec_p, __cntidx + i, __count); \
+            set = 1; \
+            break; \
+        } \
+        /* otherwise find the least frequently used bucket */ \
+        else if(DARSHAN_COUNTER_VALUE(__rec_p, __cntidx + i) < min) { \
+            min = DARSHAN_COUNTER_VALUE(__rec_p, __cntidx + i); \
+            min_index = i; \
+        } \
+    } \
+    if(!set && (__count > min)) { \
+        DARSHAN_COUNTER_SET(__rec_p, __cntidx+min_index, __count); \
+        DARSHAN_COUNTER_SET(__rec_p, __validx+min_index, __value); \
+    } \
+} while(0)
+
 #define POSIX_RECORD_OPEN(__ret, __path, __mode, __stream_flag, __tm1, __tm2) do { \
     struct posix_file_runtime* file; \
     char* exclude; \
@@ -219,7 +280,7 @@ static int darshan_mem_alignment = 1;
 } while(0)
 
 #define POSIX_RECORD_READ(__ret, __fd, __pread_flag, __pread_offset, __aligned, __stream_flag, __tm1, __tm2) do{ \
-    /* size_t stride; */\
+    size_t stride; \
     int64_t this_offset; \
     struct posix_file_runtime* file; \
     int64_t file_alignment; \
@@ -235,11 +296,11 @@ static int darshan_mem_alignment = 1;
         DARSHAN_COUNTER_INC(file->file_record, POSIX_SEQ_READS, 1); \
     if(this_offset == (file->last_byte_read + 1)) \
         DARSHAN_COUNTER_INC(file->file_record, POSIX_CONSEC_READS, 1); \
-    /* if(this_offset > 0 && this_offset > file->last_byte_read \
+    if(this_offset > 0 && this_offset > file->last_byte_read \
         && file->last_byte_read != 0) \
         stride = this_offset - file->last_byte_read - 1; \
     else \
-        stride = 0; */\
+        stride = 0; \
     file->last_byte_read = this_offset + __ret - 1; \
     file->offset = this_offset + __ret; \
     DARSHAN_COUNTER_MAX(file->file_record, POSIX_MAX_BYTE_READ, (this_offset + __ret - 1)); \
@@ -248,9 +309,9 @@ static int darshan_mem_alignment = 1;
         DARSHAN_COUNTER_INC(file->file_record, POSIX_FREADS, 1); \
     else\
         DARSHAN_COUNTER_INC(file->file_record, POSIX_READS, 1); \
-    /* CP_BUCKET_INC(file, CP_SIZE_READ_0_100, __ret); \
-    cp_access_counter(file, __ret, CP_COUNTER_ACCESS); \
-    cp_access_counter(file, stride, CP_COUNTER_STRIDE); */\
+    DARSHAN_BUCKET_INC(file->file_record, POSIX_SIZE_READ_0_100, __ret); \
+    posix_access_counter(file, __ret, POSIX_COUNTER_ACCESS); \
+    posix_access_counter(file, stride, POSIX_COUNTER_STRIDE); \
     if(!__aligned) \
         DARSHAN_COUNTER_INC(file->file_record, POSIX_MEM_NOT_ALIGNED, 1); \
     file_alignment = DARSHAN_COUNTER_VALUE(file->file_record, POSIX_FILE_ALIGNMENT); \
@@ -269,7 +330,7 @@ static int darshan_mem_alignment = 1;
 } while(0)
 
 #define POSIX_RECORD_WRITE(__ret, __fd, __pwrite_flag, __pwrite_offset, __aligned, __stream_flag, __tm1, __tm2) do{ \
-    /* size_t stride; */\
+    size_t stride; \
     int64_t this_offset; \
     struct posix_file_runtime* file; \
     int64_t file_alignment; \
@@ -285,11 +346,11 @@ static int darshan_mem_alignment = 1;
         DARSHAN_COUNTER_INC(file->file_record, POSIX_SEQ_WRITES, 1); \
     if(this_offset == (file->last_byte_written + 1)) \
         DARSHAN_COUNTER_INC(file->file_record, POSIX_CONSEC_WRITES, 1); \
-    /* if(this_offset > 0 && this_offset > file->last_byte_written \
+    if(this_offset > 0 && this_offset > file->last_byte_written \
         && file->last_byte_written != 0) \
         stride = this_offset - file->last_byte_written - 1; \
     else \
-        stride = 0; */\
+        stride = 0; \
     file->last_byte_written = this_offset + __ret - 1; \
     file->offset = this_offset + __ret; \
     DARSHAN_COUNTER_MAX(file->file_record, POSIX_MAX_BYTE_WRITTEN, (this_offset + __ret - 1)); \
@@ -298,9 +359,9 @@ static int darshan_mem_alignment = 1;
         DARSHAN_COUNTER_INC(file->file_record, POSIX_FWRITES, 1); \
     else \
         DARSHAN_COUNTER_INC(file->file_record, POSIX_WRITES, 1); \
-    /* CP_BUCKET_INC(file, CP_SIZE_WRITE_0_100, __ret); \
-    cp_access_counter(file, __ret, CP_COUNTER_ACCESS); \
-    cp_access_counter(file, stride, CP_COUNTER_STRIDE); */ \
+    DARSHAN_BUCKET_INC(file->file_record, POSIX_SIZE_WRITE_0_100, __ret); \
+    posix_access_counter(file, __ret, POSIX_COUNTER_ACCESS); \
+    posix_access_counter(file, stride, POSIX_COUNTER_STRIDE);  \
     if(!__aligned) \
         DARSHAN_COUNTER_INC(file->file_record, POSIX_MEM_NOT_ALIGNED, 1); \
     file_alignment = DARSHAN_COUNTER_VALUE(file->file_record, POSIX_FILE_ALIGNMENT); \
@@ -1420,15 +1481,143 @@ static void posix_file_close_fd(int fd)
     return;
 }
 
+static void posix_access_counter(struct posix_file_runtime* file, ssize_t size,
+    enum posix_counter_type type)
+{
+    struct posix_access_counter* counter;
+    struct posix_access_counter* found;
+    void* tmp;
+    void** root;
+    int* count;
+    struct posix_access_counter tmp_counter;
+
+    /* don't count sizes or strides of 0 */
+    if(size == 0)
+        return;
+
+    switch(type)
+    {
+        case POSIX_COUNTER_ACCESS:
+            root = &file->access_root;
+            count = &file->access_count;
+            break;
+        case POSIX_COUNTER_STRIDE:
+            root = &file->stride_root;
+            count = &file->stride_count;
+            break;
+        default:
+            return;
+    }
+
+    /* check to see if this size is already recorded */
+    tmp_counter.size = size;
+    tmp_counter.freq = 1;
+    tmp = tfind(&tmp_counter, root, posix_access_compare);
+    if(tmp)
+    {
+        found = *(struct posix_access_counter**)tmp;
+        found->freq++;
+        return;
+    }
+
+    /* we can add a new one as long as we haven't hit the limit */
+    if(*count < POSIX_MAX_ACCESS_COUNT_RUNTIME)
+    {
+        counter = malloc(sizeof(*counter));
+        if(!counter)
+        {
+            return;
+        }
+
+        counter->size = size;
+        counter->freq = 1;
+
+        tmp = tsearch(counter, root, posix_access_compare);
+        found = *(struct posix_access_counter**)tmp;
+        /* if we get a new answer out here we are in trouble; this was
+         * already checked with the tfind()
+         */
+        assert(found == counter);
+
+        (*count)++;
+    }
+
+    return;
+}
+
+static void posix_access_walker(const void* nodep, const VISIT which, const int depth)
+{
+    struct posix_access_counter* counter;
+
+    switch (which)
+    {
+        case postorder:
+        case leaf:
+            counter = *(struct posix_access_counter**)nodep;
+            POSIX_COMMON_COUNTER_INC(walker_file->file_record, counter->size, counter->freq,
+                walker_validx, walker_cntidx);
+        default:
+            break;
+    }
+
+    return;
+};
+
+/* posix_walk_file_accesses()
+ *
+ * goes through runtime collections of accesses sizes and chooses the 4 most
+ * common for logging
+ */
+static void posix_walk_file_accesses()
+{
+    int i;
+
+    for(i=0; i<posix_runtime->file_array_ndx; i++)
+    {
+        /* walk trees for both access sizes and stride sizes to pick 4 most
+         * common of each
+         */
+
+        /* NOTE: setting global variables here for cp_access_walker() */
+        walker_file = &posix_runtime->file_runtime_array[i];
+        walker_validx = POSIX_ACCESS1_ACCESS;
+        walker_cntidx = POSIX_ACCESS1_COUNT;
+        twalk(walker_file->access_root,
+            posix_access_walker);
+        tdestroy(walker_file->access_root, free);
+
+        walker_validx = POSIX_STRIDE1_STRIDE;
+        walker_cntidx = POSIX_STRIDE1_COUNT;
+        twalk(walker_file->stride_root,
+            posix_access_walker);
+        tdestroy(walker_file->stride_root, free);
+    }
+
+    return;
+}
+
+static int posix_access_compare(const void* a_p, const void* b_p)
+{
+    const struct posix_access_counter* a = a_p;
+    const struct posix_access_counter* b = b_p;
+
+    if(a->size < b->size)
+        return(-1);
+    if(a->size > b->size)
+        return(1);
+    return(0);
+}
+
+
 /* compare function for sorting file records by descending rank */
-static int posix_file_compare(const void* a, const void* b)
+static int posix_file_compare(const void* a_p, const void* b_p)
 {
-    const struct darshan_posix_file* f_a = a;
-    const struct darshan_posix_file* f_b = b;
+    const struct darshan_posix_file* a = a_p;
+    const struct darshan_posix_file* b = b_p;
 
-    if(f_a->rank < f_b->rank)
+    if(a->rank < b->rank)
         return 1;
-    if(f_a->rank > f_b->rank)
+    if(a->rank > b->rank)
         return -1;
 
     return 0;
@@ -1443,6 +1632,9 @@ static void posix_disable_instrumentation()
     assert(posix_runtime);
 
     POSIX_LOCK();
+
+    posix_walk_file_accesses();
+
     instrumentation_disabled = 1;
     POSIX_UNLOCK();
 
@@ -1535,8 +1727,7 @@ static void posix_record_reduction_op(
     struct darshan_posix_file tmp_file;
     struct darshan_posix_file *infile = infile_v;
     struct darshan_posix_file *inoutfile = inoutfile_v;
-    int i;
-    int j;
+    int i, j, k;
 
     assert(posix_runtime);
 
@@ -1587,6 +1778,70 @@ static void posix_record_reduction_op(
                 inoutfile->counters[j];
         }
 
+        /* skip POSIX_MAX_*_TIME_SIZE; handled in floating point section */
+
+        for(j=POSIX_SIZE_READ_0_100; j<=POSIX_SIZE_WRITE_1G_PLUS; j++)
+        {
+            tmp_file.counters[j] = infile->counters[j] +
+                inoutfile->counters[j];
+        }
+
+        /* first collapse any duplicates */
+        for(j=POSIX_STRIDE1_STRIDE; j<=POSIX_STRIDE4_STRIDE; j++)
+        {
+            for(k=POSIX_STRIDE1_STRIDE; k<=POSIX_STRIDE4_STRIDE; k++)
+            {
+                if(infile->counters[j] == inoutfile->counters[k])
+                {
+                    infile->counters[j+4] += inoutfile->counters[k+4];
+                    inoutfile->counters[k] = 0;
+                    inoutfile->counters[k+4] = 0;
+                }
+            }
+        }
+
+        /* first set */
+        for(j=POSIX_STRIDE1_STRIDE; j<=POSIX_STRIDE4_STRIDE; j++)
+        {
+            POSIX_COMMON_COUNTER_INC(&tmp_file, infile->counters[j],
+                infile->counters[j+4], POSIX_STRIDE1_STRIDE, POSIX_STRIDE1_COUNT);
+        }
+        /* second set */
+        for(j=POSIX_STRIDE1_STRIDE; j<=POSIX_STRIDE4_STRIDE; j++)
+        {
+            POSIX_COMMON_COUNTER_INC(&tmp_file, inoutfile->counters[j],
+                inoutfile->counters[j+4], POSIX_STRIDE1_STRIDE, POSIX_STRIDE1_COUNT);
+        }
+
+        /* same for access counts */
+
+        /* first collapse any duplicates */
+        for(j=POSIX_ACCESS1_ACCESS; j<=POSIX_ACCESS4_ACCESS; j++)
+        {
+            for(k=POSIX_ACCESS1_ACCESS; k<=POSIX_ACCESS4_ACCESS; k++)
+            {
+                if(infile->counters[j] == inoutfile->counters[k])
+                {
+                    infile->counters[j+4] += inoutfile->counters[k+4];
+                    inoutfile->counters[k] = 0;
+                    inoutfile->counters[k+4] = 0;
+                }
+            }
+        }
+
+        /* first set */
+        for(j=POSIX_ACCESS1_ACCESS; j<=POSIX_ACCESS4_ACCESS; j++)
+        {
+            POSIX_COMMON_COUNTER_INC(&tmp_file, infile->counters[j],
+                infile->counters[j+4], POSIX_ACCESS1_ACCESS, POSIX_ACCESS1_COUNT);
+        }
+        /* second set */
+        for(j=POSIX_ACCESS1_ACCESS; j<=POSIX_ACCESS4_ACCESS; j++)
+        {
+            POSIX_COMMON_COUNTER_INC(&tmp_file, inoutfile->counters[j],
+                inoutfile->counters[j+4], POSIX_ACCESS1_ACCESS, POSIX_ACCESS1_COUNT);
+        }
+
         /* min non-zero (if available) value */
         for(j=POSIX_F_OPEN_TIMESTAMP; j<=POSIX_F_WRITE_START_TIMESTAMP; j++)
         {
diff --git a/darshan-util/darshan-posix-parser.c b/darshan-util/darshan-posix-parser.c
index 1a9638c..9c9dbd0 100644
--- a/darshan-util/darshan-posix-parser.c
+++ b/darshan-util/darshan-posix-parser.c
@@ -198,6 +198,42 @@ int main(int argc, char **argv)
             "\t\tPOSIX_FILE_ALIGNMENT:\t%"PRIu64"\n"
             "\t\tPOSIX_MAX_READ_TIME_SIZE:\t%"PRIu64"\n"
             "\t\tPOSIX_MAX_WRITE_TIME_SIZE:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_0_100:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_100_1K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_1K_10K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_10K_100K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_100K_1M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_1M_4M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_4M_10M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_10M_100M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_100M_1G:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_READ_1G_PLUS:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_0_100:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_100_1K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_1K_10K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_10K_100K:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_100K_1M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_1M_4M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_4M_10M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_10M_100M:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_100M_1G:\t%"PRIu64"\n"
+            "\t\tPOSIX_SIZE_WRITE_1G_PLUS:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE1_STRIDE:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE2_STRIDE:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE3_STRIDE:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE4_STRIDE:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE1_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE2_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE3_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_STRIDE4_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS1_ACCESS:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS2_ACCESS:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS3_ACCESS:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS4_ACCESS:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS1_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS2_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS3_COUNT:\t%"PRIu64"\n"
+            "\t\tPOSIX_ACCESS4_COUNT:\t%"PRIu64"\n"
             "\t\tPOSIX_FASTEST_RANK:\t%"PRIu64"\n"
             "\t\tPOSIX_FASTEST_RANK_BYTES:\t%"PRIu64"\n"
             "\t\tPOSIX_SLOWEST_RANK:\t%"PRIu64"\n"
@@ -243,6 +279,42 @@ int main(int argc, char **argv)
             next_file.counters[POSIX_FILE_ALIGNMENT],
             next_file.counters[POSIX_MAX_READ_TIME_SIZE],
             next_file.counters[POSIX_MAX_WRITE_TIME_SIZE],
+            next_file.counters[POSIX_SIZE_READ_0_100],
+            next_file.counters[POSIX_SIZE_READ_100_1K],
+            next_file.counters[POSIX_SIZE_READ_1K_10K],
+            next_file.counters[POSIX_SIZE_READ_10K_100K],
+            next_file.counters[POSIX_SIZE_READ_100K_1M],
+            next_file.counters[POSIX_SIZE_READ_1M_4M],
+            next_file.counters[POSIX_SIZE_READ_4M_10M],
+            next_file.counters[POSIX_SIZE_READ_10M_100M],
+            next_file.counters[POSIX_SIZE_READ_100M_1G],
+            next_file.counters[POSIX_SIZE_READ_1G_PLUS],
+            next_file.counters[POSIX_SIZE_WRITE_0_100],
+            next_file.counters[POSIX_SIZE_WRITE_100_1K],
+            next_file.counters[POSIX_SIZE_WRITE_1K_10K],
+            next_file.counters[POSIX_SIZE_WRITE_10K_100K],
+            next_file.counters[POSIX_SIZE_WRITE_100K_1M],
+            next_file.counters[POSIX_SIZE_WRITE_1M_4M],
+            next_file.counters[POSIX_SIZE_WRITE_4M_10M],
+            next_file.counters[POSIX_SIZE_WRITE_10M_100M],
+            next_file.counters[POSIX_SIZE_WRITE_100M_1G],
+            next_file.counters[POSIX_SIZE_WRITE_1G_PLUS],
+            next_file.counters[POSIX_STRIDE1_STRIDE],
+            next_file.counters[POSIX_STRIDE2_STRIDE],
+            next_file.counters[POSIX_STRIDE3_STRIDE],
+            next_file.counters[POSIX_STRIDE4_STRIDE],
+            next_file.counters[POSIX_STRIDE1_COUNT],
+            next_file.counters[POSIX_STRIDE2_COUNT],
+            next_file.counters[POSIX_STRIDE3_COUNT],
+            next_file.counters[POSIX_STRIDE4_COUNT],
+            next_file.counters[POSIX_ACCESS1_ACCESS],
+            next_file.counters[POSIX_ACCESS2_ACCESS],
+            next_file.counters[POSIX_ACCESS3_ACCESS],
+            next_file.counters[POSIX_ACCESS4_ACCESS],
+            next_file.counters[POSIX_ACCESS1_COUNT],
+            next_file.counters[POSIX_ACCESS2_COUNT],
+            next_file.counters[POSIX_ACCESS3_COUNT],
+            next_file.counters[POSIX_ACCESS4_COUNT],
             next_file.counters[POSIX_FASTEST_RANK],
             next_file.counters[POSIX_FASTEST_RANK_BYTES],
             next_file.counters[POSIX_SLOWEST_RANK],


hooks/post-receive
--



More information about the Darshan-commits mailing list