darshan-null-log-format.h 1.64 KB
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * Copyright (C) 2015 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef __DARSHAN_NULL_LOG_FORMAT_H
#define __DARSHAN_NULL_LOG_FORMAT_H

10 11
/* current log format version, to support backwards compatibility */
#define DARSHAN_NULL_VER 1
12

13
#define NULL_COUNTERS \
14 15 16 17
    /* number of 'foo' function calls */\
    X(NULL_FOOS) \
    /* maximum data value set by calls to 'foo' */\
    X(NULL_FOO_MAX_DAT) \
18 19 20 21
    /* end of counters */\
    X(NULL_NUM_INDICES)

#define NULL_F_COUNTERS \
22 23 24 25
    /* timestamp of the first call to function 'foo' */\
    X(NULL_F_FOO_TIMESTAMP) \
    /* timer indicating duration of call to 'foo' with max NULL_FOO_MAX_DAT value */\
    X(NULL_F_FOO_MAX_DURATION) \
26 27 28 29
    /* end of counters */\
    X(NULL_F_NUM_INDICES)

#define X(a) a,
30 31 32
/* integer counters for the "NULL" example module */
enum darshan_null_indices
{
33
    NULL_COUNTERS
34 35 36 37 38
};

/* floating point counters for the "NULL" example module */
enum darshan_null_f_indices
{
39
    NULL_F_COUNTERS
40
};
41
#undef X
42 43 44 45 46

/* the darshan_null_record structure encompasses the high-level data/counters
 * which would actually be logged to file by Darshan for the "NULL" example
 * module. This example implementation logs the following data for each
 * record:
47
 *      - a darshan_base_record structure, which contains the record id & rank
48 49 50 51 52
 *      - integer I/O counters (operation counts, I/O sizes, etc.)
 *      - floating point I/O counters (timestamps, cumulative timers, etc.)
 */
struct darshan_null_record
{
53
    struct darshan_base_record base_rec;
54 55 56 57 58
    int64_t counters[NULL_NUM_INDICES];
    double fcounters[NULL_F_NUM_INDICES];
};

#endif /* __DARSHAN_NULL_LOG_FORMAT_H */