darshan-posix-log-format.h 5.28 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
/*
 *  (C) 2009 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */

#ifndef __DARSHAN_POSIX_LOG_FORMAT_H
#define __DARSHAN_POSIX_LOG_FORMAT_H

#include "darshan-log-format.h"

Shane Snyder's avatar
Shane Snyder committed
11
12
/* TODO: X macro this stuff so counter indices and string names don't diverge */

13
/* integer statistics for POSIX file records */
14
15
enum darshan_posix_indices
{
16
17
18
19
20
21
    POSIX_OPENS,              /* count of posix opens */
    POSIX_READS,              /* count of posix reads */
    POSIX_WRITES,             /* count of posix writes */
    POSIX_SEEKS,              /* count of posix seeks */
    POSIX_STATS,              /* count of posix stat/lstat/fstats */
    POSIX_MMAPS,              /* count of posix mmaps */
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    POSIX_FOPENS,             /* count of posix fopens */
    POSIX_FREADS,             /* count of posix freads */
    POSIX_FWRITES,            /* count of posix fwrites */
    POSIX_FSEEKS,             /* count of posix fseeks */
    POSIX_FSYNCS,             /* count of posix fsyncs */
    POSIX_FDSYNCS,            /* count of posix fdatasyncs */
    POSIX_MODE,               /* mode of file */
    POSIX_BYTES_READ,         /* total bytes read */
    POSIX_BYTES_WRITTEN,      /* total bytes written */
    POSIX_MAX_BYTE_READ,      /* highest offset byte read */
    POSIX_MAX_BYTE_WRITTEN,   /* highest offset byte written */
    POSIX_CONSEC_READS,       /* count of consecutive reads */
    POSIX_CONSEC_WRITES,      /* count of consecutive writes */ 
    POSIX_SEQ_READS,          /* count of sequential reads */
    POSIX_SEQ_WRITES,         /* count of sequential writes */
    POSIX_RW_SWITCHES,        /* number of times switched between read and write */
38
39
40
41
    POSIX_MEM_NOT_ALIGNED,    /* count of accesses not mem aligned */
    POSIX_MEM_ALIGNMENT,      /* mem alignment in bytes */
    POSIX_FILE_NOT_ALIGNED,   /* count of accesses not file aligned */
    POSIX_FILE_ALIGNMENT,     /* file alignment in bytes */
42
43
    POSIX_MAX_READ_TIME_SIZE,
    POSIX_MAX_WRITE_TIME_SIZE,
44
    /* buckets */
45
46
47
48
49
50
51
52
53
54
    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,
55
    /* buckets */
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    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,
83
84
85
86
    POSIX_FASTEST_RANK,
    POSIX_FASTEST_RANK_BYTES,
    POSIX_SLOWEST_RANK,
    POSIX_SLOWEST_RANK_BYTES,
87

88
    POSIX_NUM_INDICES,
89
90
};

91
/* floating point statistics for POSIX file records */
92
enum darshan_posix_f_indices
93
{
94
95
96
97
98
99
100
101
102
103
104
    POSIX_F_OPEN_TIMESTAMP = 0,    /* timestamp of first open */
    POSIX_F_READ_START_TIMESTAMP,  /* timestamp of first read */
    POSIX_F_WRITE_START_TIMESTAMP, /* timestamp of first write */
    POSIX_F_READ_END_TIMESTAMP,    /* timestamp of last read */
    POSIX_F_WRITE_END_TIMESTAMP,   /* timestamp of last write */
    POSIX_F_CLOSE_TIMESTAMP,       /* timestamp of last close */
    POSIX_F_READ_TIME,             /* cumulative posix read time */
    POSIX_F_WRITE_TIME,            /* cumulative posix write time */
    POSIX_F_META_TIME,             /* cumulative posix meta time */
    POSIX_F_MAX_READ_TIME,
    POSIX_F_MAX_WRITE_TIME,
105
106
107
    /* Total I/O and meta time consumed by fastest and slowest ranks */ 
    POSIX_F_FASTEST_RANK_TIME,
    POSIX_F_SLOWEST_RANK_TIME,
108
109
110
111
112
113
    /* TODO we need to be able to run more reduction operations to get
     * time and byte variances for shared files. currently, darshan-core
     * just runs a single reduction, which is used to reduce all other
     * shared record fields. */
    //F_VARIANCE_RANK_TIME,
    //F_VARIANCE_RANK_BYTES,
114

115
    POSIX_F_NUM_INDICES,
116
117
};

118
119
120
121
122
123
124
125
/* file record structure for POSIX files. a record is created and stored for
 * every POSIX file opened by the original application. For the POSIX module,
 * the record includes:
 *      - a corresponding record identifier (created by hashing the file path)
 *      - the rank of the process which opened the file (-1 for shared files)
 *      - integer file I/O statistics (open, read/write counts, etc)
 *      - floating point I/O statistics (timestamps, cumulative timers, etc.)
 */
126
127
128
129
struct darshan_posix_file
{
    darshan_record_id f_id;
    int64_t rank;
130
131
    int64_t counters[POSIX_NUM_INDICES];
    double fcounters[POSIX_F_NUM_INDICES];
132
133
134
};

#endif /* __DARSHAN_POSIX_LOG_FORMAT_H */