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

#ifndef __DARSHAN_POSIX_LOG_FORMAT_H
#define __DARSHAN_POSIX_LOG_FORMAT_H

9
/* current POSIX log format version */
10
#define DARSHAN_POSIX_VER 4
11

12
#define POSIX_COUNTERS \
13
    /* count of posix opens (INCLUDING fileno and dup operations) */\
14
    X(POSIX_OPENS) \
15
16
17
18
    /* count of number of filenos */\
    X(POSIX_FILENOS) \
    /* count of number of dups */\
    X(POSIX_DUPS) \
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    /* count of posix reads */\
    X(POSIX_READS) \
    /* count of posix writes */\
    X(POSIX_WRITES) \
    /* count of posix seeks */\
    X(POSIX_SEEKS) \
    /* count of posix stat/lstat/fstats */\
    X(POSIX_STATS) \
    /* count of posix mmaps */\
    X(POSIX_MMAPS) \
    /* count of posix fsyncs */\
    X(POSIX_FSYNCS) \
    /* count of posix fdatasyncs */\
    X(POSIX_FDSYNCS) \
33
34
35
36
    /* count of renames (as source file) */\
    X(POSIX_RENAME_SOURCES) \
    /* count of renames (as target file) */\
    X(POSIX_RENAME_TARGETS) \
37
38
    /* Darshan record ID of first rename source */\
    X(POSIX_RENAMED_FROM) \
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    /* mode of file */\
    X(POSIX_MODE) \
    /* total bytes read */\
    X(POSIX_BYTES_READ) \
    /* total bytes written */\
    X(POSIX_BYTES_WRITTEN) \
    /* highest offset byte read */\
    X(POSIX_MAX_BYTE_READ) \
    /* highest offset byte written */\
    X(POSIX_MAX_BYTE_WRITTEN) \
    /* count of consecutive reads */\
    X(POSIX_CONSEC_READS) \
    /* count of consecutive writes */\
    X(POSIX_CONSEC_WRITES) \
    /* count of sequential reads */\
    X(POSIX_SEQ_READS) \
    /* count of sequential writes */\
    X(POSIX_SEQ_WRITES) \
    /* number of times switched between read and write */\
    X(POSIX_RW_SWITCHES) \
    /* count of accesses not mem aligned */\
    X(POSIX_MEM_NOT_ALIGNED) \
    /* mem alignment in bytes */\
    X(POSIX_MEM_ALIGNMENT) \
    /* count of accesses not file aligned */\
    X(POSIX_FILE_NOT_ALIGNED) \
    /* file alignment in bytes */\
    X(POSIX_FILE_ALIGNMENT) \
    X(POSIX_MAX_READ_TIME_SIZE) \
    X(POSIX_MAX_WRITE_TIME_SIZE) \
    /* buckets for POSIX read size ranges */\
    X(POSIX_SIZE_READ_0_100) \
    X(POSIX_SIZE_READ_100_1K) \
    X(POSIX_SIZE_READ_1K_10K) \
    X(POSIX_SIZE_READ_10K_100K) \
    X(POSIX_SIZE_READ_100K_1M) \
    X(POSIX_SIZE_READ_1M_4M) \
    X(POSIX_SIZE_READ_4M_10M) \
    X(POSIX_SIZE_READ_10M_100M) \
    X(POSIX_SIZE_READ_100M_1G) \
    X(POSIX_SIZE_READ_1G_PLUS) \
    /* buckets for POSIX write size ranges */\
    X(POSIX_SIZE_WRITE_0_100) \
    X(POSIX_SIZE_WRITE_100_1K) \
    X(POSIX_SIZE_WRITE_1K_10K) \
    X(POSIX_SIZE_WRITE_10K_100K) \
    X(POSIX_SIZE_WRITE_100K_1M) \
    X(POSIX_SIZE_WRITE_1M_4M) \
    X(POSIX_SIZE_WRITE_4M_10M) \
    X(POSIX_SIZE_WRITE_10M_100M) \
    X(POSIX_SIZE_WRITE_100M_1G) \
    X(POSIX_SIZE_WRITE_1G_PLUS) \
    /* the four most frequently appearing strides */\
    X(POSIX_STRIDE1_STRIDE) \
    X(POSIX_STRIDE2_STRIDE) \
    X(POSIX_STRIDE3_STRIDE) \
    X(POSIX_STRIDE4_STRIDE) \
    /* count of each of the most frequent strides */\
    X(POSIX_STRIDE1_COUNT) \
    X(POSIX_STRIDE2_COUNT) \
    X(POSIX_STRIDE3_COUNT) \
    X(POSIX_STRIDE4_COUNT) \
    /* the four most frequently appearing access sizes */\
    X(POSIX_ACCESS1_ACCESS) \
    X(POSIX_ACCESS2_ACCESS) \
    X(POSIX_ACCESS3_ACCESS) \
    X(POSIX_ACCESS4_ACCESS) \
    /* count of each of the most frequent access sizes */\
    X(POSIX_ACCESS1_COUNT) \
    X(POSIX_ACCESS2_COUNT) \
    X(POSIX_ACCESS3_COUNT) \
    X(POSIX_ACCESS4_COUNT) \
111
    /* rank and number of bytes moved for fastest/slowest ranks */\
112
113
114
115
116
117
118
119
120
    X(POSIX_FASTEST_RANK) \
    X(POSIX_FASTEST_RANK_BYTES) \
    X(POSIX_SLOWEST_RANK) \
    X(POSIX_SLOWEST_RANK_BYTES) \
    /* end of counters */\
    X(POSIX_NUM_INDICES)

#define POSIX_F_COUNTERS \
    /* timestamp of first open */\
121
    X(POSIX_F_OPEN_START_TIMESTAMP) \
122
123
124
125
    /* timestamp of first read */\
    X(POSIX_F_READ_START_TIMESTAMP) \
    /* timestamp of first write */\
    X(POSIX_F_WRITE_START_TIMESTAMP) \
126
127
128
129
    /* timestamp of first close */\
    X(POSIX_F_CLOSE_START_TIMESTAMP) \
    /* timestamp of last open */\
    X(POSIX_F_OPEN_END_TIMESTAMP) \
130
131
132
133
134
    /* timestamp of last read */\
    X(POSIX_F_READ_END_TIMESTAMP) \
    /* timestamp of last write */\
    X(POSIX_F_WRITE_END_TIMESTAMP) \
    /* timestamp of last close */\
135
    X(POSIX_F_CLOSE_END_TIMESTAMP) \
136
137
138
139
140
141
    /* cumulative posix read time */\
    X(POSIX_F_READ_TIME) \
    /* cumulative posix write time */\
    X(POSIX_F_WRITE_TIME) \
    /* cumulative posix meta time */\
    X(POSIX_F_META_TIME) \
142
    /* maximum posix read duration */\
143
    X(POSIX_F_MAX_READ_TIME) \
144
    /* maximum posix write duration */\
145
146
147
148
    X(POSIX_F_MAX_WRITE_TIME) \
    /* total i/o and meta time consumed for fastest/slowest ranks */\
    X(POSIX_F_FASTEST_RANK_TIME) \
    X(POSIX_F_SLOWEST_RANK_TIME) \
149
150
151
152
    /* variance of total i/o time and bytes moved across all ranks */\
    /* NOTE: for shared records only */\
    X(POSIX_F_VARIANCE_RANK_TIME) \
    X(POSIX_F_VARIANCE_RANK_BYTES) \
153
154
155
156
    /* end of counters */\
    X(POSIX_F_NUM_INDICES)

#define X(a) a,
157
/* integer statistics for POSIX file records */
158
159
enum darshan_posix_indices
{
160
    POSIX_COUNTERS
161
162
};

163
/* floating point statistics for POSIX file records */
164
enum darshan_posix_f_indices
165
{
166
    POSIX_F_COUNTERS
167
};
168
#undef X
169

170
171
172
/* 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:
173
 *      - a darshan_base_record structure, which contains the record id & rank
174
175
176
 *      - integer file I/O statistics (open, read/write counts, etc)
 *      - floating point I/O statistics (timestamps, cumulative timers, etc.)
 */
177
178
struct darshan_posix_file
{
179
    struct darshan_base_record base_rec;
180
181
    int64_t counters[POSIX_NUM_INDICES];
    double fcounters[POSIX_F_NUM_INDICES];
182
183
184
};

#endif /* __DARSHAN_POSIX_LOG_FORMAT_H */