darshan-stdio-log-format.h 3.16 KB
Newer Older
Philip Carns's avatar
Philip Carns committed
1
2
3
4
5
6
7
8
9
10
/*
 * Copyright (C) 2015 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef __DARSHAN_STDIO_LOG_FORMAT_H
#define __DARSHAN_STDIO_LOG_FORMAT_H

/* current log format version, to support backwards compatibility */
11
#define DARSHAN_STDIO_VER 2
Philip Carns's avatar
Philip Carns committed
12
13

#define STDIO_COUNTERS \
14
    /* count of fopens (INCLUDING fdopen operations)  */\
15
    X(STDIO_OPENS) \
16
17
    /* count of fdopens */\
    X(STDIO_FDOPENS) \
18
    /* number of reads */ \
19
    X(STDIO_READS) \
20
21
    /* number of writes */ \
    X(STDIO_WRITES) \
22
23
    /* count of seeks */\
    X(STDIO_SEEKS) \
Philip Carns's avatar
Philip Carns committed
24
25
    /* count of flushes */\
    X(STDIO_FLUSHES) \
26
27
28
29
30
31
32
33
    /* total bytes written */ \
    X(STDIO_BYTES_WRITTEN) \
    /* total bytes read */ \
    X(STDIO_BYTES_READ) \
    /* maximum byte (offset) read */\
    X(STDIO_MAX_BYTE_READ) \
    /* maximum byte (offset) written */\
    X(STDIO_MAX_BYTE_WRITTEN) \
34
35
36
37
38
    /* rank and number of bytes moved for fastest/slowest ranks */\
    X(STDIO_FASTEST_RANK) \
    X(STDIO_FASTEST_RANK_BYTES) \
    X(STDIO_SLOWEST_RANK) \
    X(STDIO_SLOWEST_RANK_BYTES) \
Philip Carns's avatar
Philip Carns committed
39
40
41
42
    /* end of counters */\
    X(STDIO_NUM_INDICES)

#define STDIO_F_COUNTERS \
43
44
45
46
47
48
    /* cumulative meta time */\
    X(STDIO_F_META_TIME) \
    /* cumulative write time */\
    X(STDIO_F_WRITE_TIME) \
    /* cumulative read time */\
    X(STDIO_F_READ_TIME) \
Philip Carns's avatar
Philip Carns committed
49
50
    /* timestamp of first open */\
    X(STDIO_F_OPEN_START_TIMESTAMP) \
51
52
    /* timestamp of first close */\
    X(STDIO_F_CLOSE_START_TIMESTAMP) \
53
54
    /* timestamp of first write */\
    X(STDIO_F_WRITE_START_TIMESTAMP) \
55
56
    /* timestamp of first read */\
    X(STDIO_F_READ_START_TIMESTAMP) \
57
58
59
60
61
62
    /* timestamp of last open completion */\
    X(STDIO_F_OPEN_END_TIMESTAMP) \
    /* timestamp of last close completion */\
    X(STDIO_F_CLOSE_END_TIMESTAMP) \
    /* timestamp of last write completion */\
    X(STDIO_F_WRITE_END_TIMESTAMP) \
63
64
    /* timestamp of last read completion */\
    X(STDIO_F_READ_END_TIMESTAMP) \
65
66
67
68
69
70
71
    /* total i/o and meta time consumed for fastest/slowest ranks */\
    X(STDIO_F_FASTEST_RANK_TIME) \
    X(STDIO_F_SLOWEST_RANK_TIME) \
    /* variance of total i/o time and bytes moved across all ranks */\
    /* NOTE: for shared records only */\
    X(STDIO_F_VARIANCE_RANK_TIME) \
    X(STDIO_F_VARIANCE_RANK_BYTES) \
Philip Carns's avatar
Philip Carns committed
72
73
74
75
    /* end of counters */\
    X(STDIO_F_NUM_INDICES)

#define X(a) a,
76
/* integer counters for the "STDIO" module */
Philip Carns's avatar
Philip Carns committed
77
78
79
80
81
enum darshan_stdio_indices
{
    STDIO_COUNTERS
};

82
/* floating point counters for the "STDIO" module */
Philip Carns's avatar
Philip Carns committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
enum darshan_stdio_f_indices
{
    STDIO_F_COUNTERS
};
#undef X

/* the darshan_stdio_record structure encompasses the high-level data/counters
 * which would actually be logged to file by Darshan for the "STDIO"
 * module. This logs the following data for each record:
 *      - a corresponding Darshan record identifier
 *      - the rank of the process responsible for the record
 *      - integer I/O counters (operation counts, I/O sizes, etc.)
 *      - floating point I/O counters (timestamps, cumulative timers, etc.)
 */
97
struct darshan_stdio_file
Philip Carns's avatar
Philip Carns committed
98
{
99
    struct darshan_base_record base_rec;
Philip Carns's avatar
Philip Carns committed
100
101
102
103
104
    int64_t counters[STDIO_NUM_INDICES];
    double fcounters[STDIO_F_NUM_INDICES];
};

#endif /* __DARSHAN_STDIO_LOG_FORMAT_H */