Commit 13b92a1f authored by Shane Snyder's avatar Shane Snyder

adding posix common access/stride counters

parent b70229e4
......@@ -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,
......
......@@ -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
{
......
This diff is collapsed.
......@@ -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],
......
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