Commit 5db2a039 authored by Cong Xu's avatar Cong Xu
Browse files

Change DXLT name to Darshan eXtended Tracing (DXT)


Signed-off-by: Cong Xu's avatarCong Xu <cong.xu@intel.com>
parent 9f1491bd
......@@ -3,15 +3,15 @@
* See COPYRIGHT in top-level directory.
*/
#ifndef __DARSHAN_DXLT_LOG_FORMAT_H
#define __DARSHAN_DXLT_LOG_FORMAT_H
#ifndef __DARSHAN_DXT_LOG_FORMAT_H
#define __DARSHAN_DXT_LOG_FORMAT_H
/* current DXLT log format version */
#define DXLT_POSIX_VER 1
#define DXLT_MPIIO_VER 1
/* current DXT log format version */
#define DXT_POSIX_VER 1
#define DXT_MPIIO_VER 1
/*
* DXLT, the segment_info structure maintains detailed Segment IO tracing
* DXT, the segment_info structure maintains detailed Segment IO tracing
* information
*/
typedef struct segment_info {
......@@ -24,14 +24,14 @@ typedef struct segment_info {
#define X(a) a,
#undef X
/* file record structure for DXLT files. a record is created and stored for
* every DXLT file opened by the original application. For the DXLT module,
/* file record structure for DXT files. a record is created and stored for
* every DXT file opened by the original application. For the DXT module,
* the record includes:
* - a darshan_base_record structure, which contains the record id & rank
* - integer file I/O statistics (open, read/write counts, etc)
* - floating point I/O statistics (timestamps, cumulative timers, etc.)
*/
struct dxlt_file_record {
struct dxt_file_record {
struct darshan_base_record base_rec;
int64_t shared_record; /* -1 means it is a shared file record */
......@@ -42,4 +42,4 @@ struct dxlt_file_record {
segment_info *read_traces;
};
#endif /* __DARSHAN_DXLT_LOG_FORMAT_H */
#endif /* __DARSHAN_DXT_LOG_FORMAT_H */
......@@ -117,8 +117,8 @@ struct darshan_base_record
#include "darshan-bgq-log-format.h"
#include "darshan-lustre-log-format.h"
#include "darshan-stdio-log-format.h"
/* DXLT */
#include "darshan-dxlt-log-format.h"
/* DXT */
#include "darshan-dxt-log-format.h"
/* X-macro for keeping module ordering consistent */
/* NOTE: first val used to define module enum values,
......@@ -139,9 +139,9 @@ struct darshan_base_record
X(DARSHAN_BGQ_MOD, "BG/Q", DARSHAN_BGQ_VER, &bgq_logutils) \
X(DARSHAN_LUSTRE_MOD, "LUSTRE", DARSHAN_LUSTRE_VER, &lustre_logutils) \
X(DARSHAN_STDIO_MOD, "STDIO", DARSHAN_STDIO_VER, &stdio_logutils) \
/* DXLT */ \
X(DXLT_POSIX_MOD, "X_POSIX", DXLT_POSIX_VER, &dxlt_posix_logutils) \
X(DXLT_MPIIO_MOD, "X_MPIIO", DXLT_MPIIO_VER, &dxlt_mpiio_logutils)
/* DXT */ \
X(DXT_POSIX_MOD, "X_POSIX", DXT_POSIX_VER, &dxt_posix_logutils) \
X(DXT_MPIIO_MOD, "X_MPIIO", DXT_MPIIO_VER, &dxt_mpiio_logutils)
/* unique identifiers to distinguish between available darshan modules */
/* NOTES: - valid ids range from [0...DARSHAN_MAX_MODS-1]
......
......@@ -35,8 +35,8 @@ CFLAGS_SHARED = -DDARSHAN_CONFIG_H=\"darshan-runtime-config.h\" -I . -I$(srcdir)
LIBS = -lz @LIBBZ2@
DARSHAN_STATIC_MOD_OBJS = lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o lib/darshan-stdio.o lib/darshan-dxlt.o
DARSHAN_DYNAMIC_MOD_OBJS = lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po lib/darshan-stdio.po lib/darshan-dxlt.po
DARSHAN_STATIC_MOD_OBJS = lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o lib/darshan-stdio.o lib/darshan-dxt.o
DARSHAN_DYNAMIC_MOD_OBJS = lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po lib/darshan-stdio.po lib/darshan-dxt.po
ifdef DARSHAN_USE_BGQ
DARSHAN_STATIC_MOD_OBJS += lib/darshan-bgq.o
......@@ -127,10 +127,10 @@ lib/darshan-stdio.o: lib/darshan-stdio.c darshan.h darshan-common.h $(DARSHAN_LO
lib/darshan-stdio.po: lib/darshan-stdio.c darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-stdio-log-format.h | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/darshan-dxlt.o: lib/darshan-dxlt.c darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxlt-log-format.h | lib
lib/darshan-dxt.o: lib/darshan-dxt.c darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxt-log-format.h | lib
$(CC) $(CFLAGS) -c $< -o $@
lib/darshan-dxlt.po: lib/darshan-dxlt.c darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxlt-log-format.h | lib
lib/darshan-dxt.po: lib/darshan-dxt.c darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxt-log-format.h | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/lookup3.o: lib/lookup3.c
......
......@@ -38,7 +38,7 @@
#define DARSHAN_DEF_MMAP_LOG_PATH "/tmp"
#endif
/* DXLT */
/* DXT */
/* Maximum amount of memory per instrumentation module in MiB */
#ifdef __DARSHAN_MOD_MEM_MAX
#define DARSHAN_MOD_MEM_MAX (__DARSHAN_MOD_MEM_MAX * 1024 * 1024)
......
......@@ -1445,8 +1445,8 @@ static int darshan_log_open_all(char *logfile_name, MPI_File *log_fh)
hints = __DARSHAN_LOG_HINTS;
}
/* DXLT */
if(hints && strlen(hints) > 0 && !getenv("ENABLE_DXLT_IO_TRACE"))
/* DXT */
if(hints && strlen(hints) > 0 && !getenv("ENABLE_DXT_IO_TRACE"))
{
tok_str = strdup(hints);
if(tok_str)
......
......@@ -177,11 +177,11 @@ void darshan_instrument_lustre_file(const char* filepath, int fd)
return;
}
/* DXLT */
/* DXT */
#if 0
void dxlt_get_lustre_stripe_info(
void dxt_get_lustre_stripe_info(
darshan_record_id rec_id,
struct dxlt_file_record *file_rec)
struct dxt_file_record *file_rec)
{
struct lustre_record_ref *rec_ref;
int ost_ids_size = 0;
......
......@@ -87,15 +87,15 @@ static void mpiio_shutdown(
MPI_Comm mod_comm, darshan_record_id *shared_recs,
int shared_rec_count, void **mpiio_buf, int *mpiio_buf_sz);
/* DXLT */
extern void dxlt_mpiio_runtime_initialize();
extern void dxlt_mpiio_track_new_file_record(
/* DXT */
extern void dxt_mpiio_runtime_initialize();
extern void dxt_mpiio_track_new_file_record(
darshan_record_id rec_id, const char *path);
extern void dxlt_mpiio_add_record_ref(
extern void dxt_mpiio_add_record_ref(
darshan_record_id rec_id, MPI_File fh);
extern void dxlt_mpiio_write(MPI_File fh, int64_t length,
extern void dxt_mpiio_write(MPI_File fh, int64_t length,
double start_time, double end_time);
extern void dxlt_mpiio_read(MPI_File fh, int64_t length,
extern void dxt_mpiio_read(MPI_File fh, int64_t length,
double start_time, double end_time);
static struct mpiio_runtime *mpiio_runtime = NULL;
......@@ -111,9 +111,9 @@ static int my_rank = -1;
if(!instrumentation_disabled) { \
if(!mpiio_runtime) { \
mpiio_runtime_initialize(); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_mpiio_runtime_initialize(); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_mpiio_runtime_initialize(); \
} \
} \
if(mpiio_runtime) break; \
......@@ -142,9 +142,9 @@ static int my_rank = -1;
rec_ref = darshan_lookup_record_ref(mpiio_runtime->rec_id_hash, &rec_id, sizeof(darshan_record_id)); \
if(!rec_ref) { \
rec_ref = mpiio_track_new_file_record(rec_id, newpath); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_mpiio_track_new_file_record(rec_id, newpath); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_mpiio_track_new_file_record(rec_id, newpath); \
} \
} \
if(!rec_ref) { \
......@@ -166,9 +166,9 @@ static int my_rank = -1;
__tm1, __tm2, rec_ref->last_meta_end); \
darshan_add_record_ref(&(mpiio_runtime->fh_hash), &__fh, sizeof(MPI_File), rec_ref); \
if(newpath != __path) free(newpath); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_mpiio_add_record_ref(rec_id, __fh); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_mpiio_add_record_ref(rec_id, __fh); \
} \
} while(0)
......@@ -181,9 +181,9 @@ static int my_rank = -1;
if(!rec_ref) break; \
DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size); \
size = size * __count; \
/* DXLT to record detailed read tracing information */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_mpiio_read(__fh, size, __tm1, __tm2); \
/* DXT to record detailed read tracing information */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_mpiio_read(__fh, size, __tm1, __tm2); \
} \
DARSHAN_BUCKET_INC(&(rec_ref->file_rec->counters[MPIIO_SIZE_READ_AGG_0_100]), size); \
darshan_common_val_counter(&rec_ref->access_root, &rec_ref->access_count, size, \
......@@ -214,9 +214,9 @@ static int my_rank = -1;
if(!rec_ref) break; \
DARSHAN_MPI_CALL(PMPI_Type_size)(__datatype, &size); \
size = size * __count; \
/* DXLT to record detailed write tracing information */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_mpiio_write(__fh, size, __tm1, __tm2); \
/* DXT to record detailed write tracing information */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_mpiio_write(__fh, size, __tm1, __tm2); \
} \
DARSHAN_BUCKET_INC(&(rec_ref->file_rec->counters[MPIIO_SIZE_WRITE_AGG_0_100]), size); \
darshan_common_val_counter(&rec_ref->access_root, &rec_ref->access_count, size, \
......
......@@ -157,15 +157,15 @@ static void posix_shutdown(
MPI_Comm mod_comm, darshan_record_id *shared_recs,
int shared_rec_count, void **posix_buf, int *posix_buf_sz);
/* DXLT */
extern void dxlt_posix_runtime_initialize();
extern void dxlt_posix_track_new_file_record(
/* DXT */
extern void dxt_posix_runtime_initialize();
extern void dxt_posix_track_new_file_record(
darshan_record_id rec_id, const char *path);
extern void dxlt_posix_add_record_ref(
extern void dxt_posix_add_record_ref(
darshan_record_id rec_id, int fd);
extern void dxlt_posix_write(int fd, int64_t offset, int64_t length,
extern void dxt_posix_write(int fd, int64_t offset, int64_t length,
double start_time, double end_time);
extern void dxlt_posix_read(int fd, int64_t offset, int64_t length,
extern void dxt_posix_read(int fd, int64_t offset, int64_t length,
double start_time, double end_time);
static struct posix_runtime *posix_runtime = NULL;
......@@ -182,9 +182,9 @@ static int darshan_mem_alignment = 1;
if(!instrumentation_disabled) { \
if(!posix_runtime) { \
posix_runtime_initialize(); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_posix_runtime_initialize(); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_posix_runtime_initialize(); \
} \
} \
if(posix_runtime) break; \
......@@ -212,9 +212,9 @@ static int darshan_mem_alignment = 1;
rec_ref = darshan_lookup_record_ref(posix_runtime->rec_id_hash, &rec_id, sizeof(darshan_record_id)); \
if(!rec_ref) { \
rec_ref = posix_track_new_file_record(rec_id, newpath); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_posix_track_new_file_record(rec_id, newpath); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_posix_track_new_file_record(rec_id, newpath); \
} \
} \
if(!rec_ref) { \
......@@ -236,9 +236,9 @@ static int darshan_mem_alignment = 1;
darshan_add_record_ref(&(posix_runtime->fd_hash), &__ret, sizeof(int), rec_ref); \
darshan_instrument_fs_data(rec_ref->fs_type, newpath, __ret); \
if(newpath != __path) free(newpath); \
/* DXLT */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_posix_add_record_ref(rec_id, __ret); \
/* DXT */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_posix_add_record_ref(rec_id, __ret); \
} \
} while(0)
......@@ -255,9 +255,9 @@ static int darshan_mem_alignment = 1;
this_offset = __pread_offset; \
else \
this_offset = rec_ref->offset; \
/* DXLT to record detailed read tracing information */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_posix_read(__fd, this_offset, __ret, __tm1, __tm2); \
/* DXT to record detailed read tracing information */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_posix_read(__fd, this_offset, __ret, __tm1, __tm2); \
} \
if(this_offset > rec_ref->last_byte_read) \
rec_ref->file_rec->counters[POSIX_SEQ_READS] += 1; \
......@@ -313,9 +313,9 @@ static int darshan_mem_alignment = 1;
this_offset = __pwrite_offset; \
else \
this_offset = rec_ref->offset; \
/* DXLT to record detailed write tracing information */ \
if (getenv("ENABLE_DXLT_IO_TRACE")) { \
dxlt_posix_write(__fd, this_offset, __ret, __tm1, __tm2); \
/* DXT to record detailed write tracing information */ \
if (getenv("ENABLE_DXT_IO_TRACE")) { \
dxt_posix_write(__fd, this_offset, __ret, __tm1, __tm2); \
} \
if(this_offset > rec_ref->last_byte_written) \
rec_ref->file_rec->counters[POSIX_SEQ_WRITES] += 1; \
......
......@@ -13,10 +13,10 @@ libdir = $(DESTDIR)@libdir@
pkgconfigdir = $(DESTDIR)$(libdir)/pkgconfig
DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h $(srcdir)/../darshan-bgq-log-format.h $(srcdir)/../darshan-lustre-log-format.h $(srcdir)/../darshan-stdio-log-format.h $(srcdir)/../darshan-dxlt-log-format.h
DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h darshan-bgq-logutils.h darshan-lustre-logutils.h darshan-stdio-logutils.h darshan-dxlt-logutils.h
DARSHAN_STATIC_MOD_OBJS = darshan-posix-logutils.o darshan-mpiio-logutils.o darshan-hdf5-logutils.o darshan-pnetcdf-logutils.o darshan-bgq-logutils.o darshan-lustre-logutils.o darshan-stdio-logutils.o darshan-dxlt-logutils.o
DARSHAN_DYNAMIC_MOD_OBJS = darshan-posix-logutils.po darshan-mpiio-logutils.po darshan-hdf5-logutils.po darshan-pnetcdf-logutils.po darshan-bgq-logutils.po darshan-lustre-logutils.po darshan-stdio-logutils.po darshan-dxlt-logutils.po
DARSHAN_MOD_LOG_FORMATS = $(srcdir)/../darshan-posix-log-format.h $(srcdir)/../darshan-mpiio-log-format.h $(srcdir)/../darshan-hdf5-log-format.h $(srcdir)/../darshan-pnetcdf-log-format.h $(srcdir)/../darshan-bgq-log-format.h $(srcdir)/../darshan-lustre-log-format.h $(srcdir)/../darshan-stdio-log-format.h $(srcdir)/../darshan-dxt-log-format.h
DARSHAN_MOD_LOGUTIL_HEADERS = darshan-posix-logutils.h darshan-mpiio-logutils.h darshan-hdf5-logutils.h darshan-pnetcdf-logutils.h darshan-bgq-logutils.h darshan-lustre-logutils.h darshan-stdio-logutils.h darshan-dxt-logutils.h
DARSHAN_STATIC_MOD_OBJS = darshan-posix-logutils.o darshan-mpiio-logutils.o darshan-hdf5-logutils.o darshan-pnetcdf-logutils.o darshan-bgq-logutils.o darshan-lustre-logutils.o darshan-stdio-logutils.o darshan-dxt-logutils.o
DARSHAN_DYNAMIC_MOD_OBJS = darshan-posix-logutils.po darshan-mpiio-logutils.po darshan-hdf5-logutils.po darshan-pnetcdf-logutils.po darshan-bgq-logutils.po darshan-lustre-logutils.po darshan-stdio-logutils.po darshan-dxt-logutils.po
DARSHAN_ENABLE_SHARED=@DARSHAN_ENABLE_SHARED@
......@@ -91,9 +91,9 @@ darshan-stdio-logutils.o: darshan-stdio-logutils.c darshan-logutils.h darshan-st
darshan-stdio-logutils.po: darshan-stdio-logutils.c darshan-logutils.h darshan-stdio-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-stdio-log-format.h | uthash-1.9.2
$(CC) $(CFLAGS_SHARED) -c $< -o $@
darshan-dxlt-logutils.o: darshan-dxlt-logutils.c darshan-logutils.h darshan-dxlt-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxlt-log-format.h | uthash-1.9.2
darshan-dxt-logutils.o: darshan-dxt-logutils.c darshan-logutils.h darshan-dxt-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxt-log-format.h | uthash-1.9.2
$(CC) $(CFLAGS) -c $< -o $@
darshan-dxlt-logutils.po: darshan-dxlt-logutils.c darshan-logutils.h darshan-dxlt-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxlt-log-format.h | uthash-1.9.2
darshan-dxt-logutils.po: darshan-dxt-logutils.c darshan-logutils.h darshan-dxt-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-dxt-log-format.h | uthash-1.9.2
$(CC) $(CFLAGS_SHARED) -c $< -o $@
libdarshan-util.a: darshan-logutils.o $(DARSHAN_STATIC_MOD_OBJS)
......@@ -152,7 +152,7 @@ endif
install -m 644 $(srcdir)/darshan-bgq-logutils.h $(includedir)
install -m 644 $(srcdir)/darshan-null-logutils.h $(includedir)
install -m 644 $(srcdir)/darshan-stdio-logutils.h $(includedir)
install -m 644 $(srcdir)/darshan-dxlt-logutils.h $(includedir)
install -m 644 $(srcdir)/darshan-dxt-logutils.h $(includedir)
install -m 644 $(srcdir)/../darshan-null-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-posix-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-mpiio-log-format.h $(includedir)
......@@ -160,7 +160,7 @@ endif
install -m 644 $(srcdir)/../darshan-pnetcdf-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-bgq-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-stdio-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-dxlt-log-format.h $(includedir)
install -m 644 $(srcdir)/../darshan-dxt-log-format.h $(includedir)
install -d $(includedir)/uthash-1.9.2
install -d $(includedir)/uthash-1.9.2/src
install -m 644 uthash-1.9.2/src/uthash.h $(includedir)/uthash-1.9.2/src/
......
......@@ -19,48 +19,48 @@
#include "darshan-logutils.h"
static int dxlt_log_get_posix_file(darshan_fd fd, void** dxlt_posix_buf);
static int dxlt_log_put_posix_file(darshan_fd fd, void* dxlt_posix_buf);
static void dxlt_log_print_posix_file(void *file_rec, char *file_name,
static int dxt_log_get_posix_file(darshan_fd fd, void** dxt_posix_buf);
static int dxt_log_put_posix_file(darshan_fd fd, void* dxt_posix_buf);
static void dxt_log_print_posix_file(void *file_rec, char *file_name,
char *mnt_pt, char *fs_type, struct darshan_name_record_ref *ref);
static void dxlt_log_print_posix_description(int ver);
static void dxlt_log_print_posix_file_diff(void *file_rec1, char *file_name1,
static void dxt_log_print_posix_description(int ver);
static void dxt_log_print_posix_file_diff(void *file_rec1, char *file_name1,
void *file_rec2, char *file_name2);
static void dxlt_log_agg_posix_files(void *rec, void *agg_rec, int init_flag);
static void dxt_log_agg_posix_files(void *rec, void *agg_rec, int init_flag);
static int dxlt_log_get_mpiio_file(darshan_fd fd, void** dxlt_mpiio_buf);
static int dxlt_log_put_mpiio_file(darshan_fd fd, void* dxlt_mpiio_buf);
static void dxlt_log_print_mpiio_file(void *file_rec,
static int dxt_log_get_mpiio_file(darshan_fd fd, void** dxt_mpiio_buf);
static int dxt_log_put_mpiio_file(darshan_fd fd, void* dxt_mpiio_buf);
static void dxt_log_print_mpiio_file(void *file_rec,
char *file_name, char *mnt_pt, char *fs_type);
static void dxlt_log_print_mpiio_description(int ver);
static void dxlt_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
static void dxt_log_print_mpiio_description(int ver);
static void dxt_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
void *file_rec2, char *file_name2);
static void dxlt_log_agg_mpiio_files(void *rec, void *agg_rec, int init_flag);
static void dxt_log_agg_mpiio_files(void *rec, void *agg_rec, int init_flag);
static void *parser_buf = NULL;
static int64_t parser_buf_sz = 0;
struct darshan_mod_logutil_funcs dxlt_posix_logutils =
struct darshan_mod_logutil_funcs dxt_posix_logutils =
{
.log_get_record = &dxlt_log_get_posix_file,
.log_put_record = &dxlt_log_put_posix_file,
.log_print_record_dxlt = &dxlt_log_print_posix_file,
// .log_print_description = &dxlt_log_print_posix_description,
.log_print_diff = &dxlt_log_print_posix_file_diff,
.log_agg_records = &dxlt_log_agg_posix_files,
.log_get_record = &dxt_log_get_posix_file,
.log_put_record = &dxt_log_put_posix_file,
.log_print_record_dxt = &dxt_log_print_posix_file,
// .log_print_description = &dxt_log_print_posix_description,
.log_print_diff = &dxt_log_print_posix_file_diff,
.log_agg_records = &dxt_log_agg_posix_files,
};
struct darshan_mod_logutil_funcs dxlt_mpiio_logutils =
struct darshan_mod_logutil_funcs dxt_mpiio_logutils =
{
.log_get_record = &dxlt_log_get_mpiio_file,
.log_put_record = &dxlt_log_put_mpiio_file,
.log_print_record = &dxlt_log_print_mpiio_file,
// .log_print_description = &dxlt_log_print_mpiio_description,
.log_print_diff = &dxlt_log_print_mpiio_file_diff,
.log_agg_records = &dxlt_log_agg_mpiio_files,
.log_get_record = &dxt_log_get_mpiio_file,
.log_put_record = &dxt_log_put_mpiio_file,
.log_print_record = &dxt_log_print_mpiio_file,
// .log_print_description = &dxt_log_print_mpiio_description,
.log_print_diff = &dxt_log_print_mpiio_file_diff,
.log_agg_records = &dxt_log_agg_mpiio_files,
};
void dxlt_swap_file_record(struct dxlt_file_record *file_rec)
void dxt_swap_file_record(struct dxt_file_record *file_rec)
{
DARSHAN_BSWAP64(&file_rec->base_rec.id);
DARSHAN_BSWAP64(&file_rec->base_rec.rank);
......@@ -73,25 +73,25 @@ void dxlt_swap_file_record(struct dxlt_file_record *file_rec)
DARSHAN_BSWAP64(&file_rec->read_traces);
}
static int dxlt_log_get_posix_file(darshan_fd fd, void** dxlt_posix_buf)
static int dxt_log_get_posix_file(darshan_fd fd, void** dxt_posix_buf)
{
struct dxlt_file_record *file_rec;
struct dxt_file_record *file_rec;
int i, ret;
int64_t io_trace_size;
ret = darshan_log_get_mod(fd, DXLT_POSIX_MOD, *dxlt_posix_buf,
sizeof(struct dxlt_file_record));
ret = darshan_log_get_mod(fd, DXT_POSIX_MOD, *dxt_posix_buf,
sizeof(struct dxt_file_record));
if(ret < 0)
return (-1);
else if(ret < sizeof(struct dxlt_file_record))
else if(ret < sizeof(struct dxt_file_record))
return (0);
else
{
file_rec = (struct dxlt_file_record *)(*dxlt_posix_buf);
file_rec = (struct dxt_file_record *)(*dxt_posix_buf);
if (fd->swap_flag)
{
/* swap bytes if necessary */
dxlt_swap_file_record(file_rec);
dxt_swap_file_record(file_rec);
}
}
......@@ -108,7 +108,7 @@ static int dxlt_log_get_posix_file(darshan_fd fd, void** dxlt_posix_buf)
}
}
ret = darshan_log_get_mod(fd, DXLT_POSIX_MOD, parser_buf,
ret = darshan_log_get_mod(fd, DXT_POSIX_MOD, parser_buf,
io_trace_size);
if (ret < 0) {
......@@ -122,25 +122,25 @@ static int dxlt_log_get_posix_file(darshan_fd fd, void** dxlt_posix_buf)
}
}
static int dxlt_log_get_mpiio_file(darshan_fd fd, void** dxlt_mpiio_buf)
static int dxt_log_get_mpiio_file(darshan_fd fd, void** dxt_mpiio_buf)
{
struct dxlt_file_record *file_rec;
struct dxt_file_record *file_rec;
int i, ret;
int64_t io_trace_size;
ret = darshan_log_get_mod(fd, DXLT_MPIIO_MOD, *dxlt_mpiio_buf,
sizeof(struct dxlt_file_record));
ret = darshan_log_get_mod(fd, DXT_MPIIO_MOD, *dxt_mpiio_buf,
sizeof(struct dxt_file_record));
if(ret < 0)
return(-1);
else if(ret < sizeof(struct dxlt_file_record))
else if(ret < sizeof(struct dxt_file_record))
return(0);
else
{
file_rec = (struct dxlt_file_record *)(*dxlt_mpiio_buf);
file_rec = (struct dxt_file_record *)(*dxt_mpiio_buf);
if (fd->swap_flag)
{
/* swap bytes if necessary */
dxlt_swap_file_record(file_rec);
dxt_swap_file_record(file_rec);
}
}
......@@ -157,7 +157,7 @@ static int dxlt_log_get_mpiio_file(darshan_fd fd, void** dxlt_mpiio_buf)
}
}
ret = darshan_log_get_mod(fd, DXLT_MPIIO_MOD, parser_buf,
ret = darshan_log_get_mod(fd, DXT_MPIIO_MOD, parser_buf,
io_trace_size);
if (ret < 0) {
......@@ -171,39 +171,39 @@ static int dxlt_log_get_mpiio_file(darshan_fd fd, void** dxlt_mpiio_buf)
}
}
static int dxlt_log_put_posix_file(darshan_fd fd, void* dxlt_posix_buf)
static int dxt_log_put_posix_file(darshan_fd fd, void* dxt_posix_buf)
{
struct dxlt_file_record *file_rec =
(struct dxlt_file_record *)dxlt_posix_buf;
struct dxt_file_record *file_rec =
(struct dxt_file_record *)dxt_posix_buf;
int ret;
ret = darshan_log_put_mod(fd, DXLT_POSIX_MOD, file_rec,
sizeof(struct dxlt_file_record), DXLT_POSIX_VER);
ret = darshan_log_put_mod(fd, DXT_POSIX_MOD, file_rec,
sizeof(struct dxt_file_record), DXT_POSIX_VER);
if(ret < 0)
return(-1);
return(0);
}
static int dxlt_log_put_mpiio_file(darshan_fd fd, void* dxlt_mpiio_buf)
static int dxt_log_put_mpiio_file(darshan_fd fd, void* dxt_mpiio_buf)
{
struct dxlt_file_record *file_rec =
(struct dxlt_file_record *)dxlt_mpiio_buf;
struct dxt_file_record *file_rec =
(struct dxt_file_record *)dxt_mpiio_buf;
int ret;
ret = darshan_log_put_mod(fd, DXLT_MPIIO_MOD, file_rec,
sizeof(struct dxlt_file_record), DXLT_MPIIO_VER);
ret = darshan_log_put_mod(fd, DXT_MPIIO_MOD, file_rec,
sizeof(struct dxt_file_record), DXT_MPIIO_VER);
if(ret < 0)
return(-1);
return(0);
}
static void dxlt_log_print_posix_file(void *posix_file_rec, char *file_name,
static void dxt_log_print_posix_file(void *posix_file_rec, char *file_name,
char *mnt_pt, char *fs_type, struct darshan_name_record_ref *ref)
{
struct dxlt_file_record *file_rec =
(struct dxlt_file_record *)posix_file_rec;
struct dxt_file_record *file_rec =
(struct dxt_file_record *)posix_file_rec;
int64_t offset;
int64_t length;
double start_time;
......@@ -226,18 +226,18 @@ static void dxlt_log_print_posix_file(void *posix_file_rec, char *file_name,
int ost_idx;
printf("\n# DXLT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
printf("# DXLT, rank: %d, write_count: %d, read_count: %d\n",
printf("\n# DXT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
printf("# DXT, rank: %d, write_count: %d, read_count: %d\n",
rank, write_count, read_count);
if (lustreFS) {
stripe_size = ref->stripe_size;
stripe_count = ref->stripe_count;
printf("# DXLT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
printf("# DXLT, stripe_size: %d, stripe_count: %d\n", stripe_size, stripe_count);
printf("# DXT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
printf("# DXT, stripe_size: %d, stripe_count: %d\n", stripe_size, stripe_count);
for (i = 0; i < ref->stripe_count; i++) {
printf("# DXLT, OST: %d\n", (ref->ost_ids)[i]);
printf("# DXT, OST: %d\n", (ref->ost_ids)[i]);
}
}
......@@ -308,11 +308,11 @@ static void dxlt_log_print_posix_file(void *posix_file_rec, char *file_name,
return;
}
static void dxlt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
static void dxt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
char *mnt_pt, char *fs_type)
{
struct dxlt_file_record *file_rec =
(struct dxlt_file_record *)mpiio_file_rec;
struct dxt_file_record *file_rec =
(struct dxt_file_record *)mpiio_file_rec;
int64_t offset;
int64_t length;
......@@ -328,11 +328,11 @@ static void dxlt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
segment_info *io_trace = (segment_info *)parser_buf;
printf("\n# DXLT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
printf("# DXLT, rank: %d, write_count: %d, read_count: %d\n",
printf("\n# DXT, file_id: %" PRIu64 ", file_name: %s\n", f_id, file_name);
printf("# DXT, rank: %d, write_count: %d, read_count: %d\n",
rank, write_count, read_count);
printf("# DXLT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
printf("# DXT, mnt_pt: %s, fs_type: %s\n", mnt_pt, fs_type);
/* Print header */
printf("# Module Rank Wt/Rd Segment Length Start(s) End(s)\n");
......@@ -359,33 +359,33 @@ static void dxlt_log_print_mpiio_file(void *mpiio_file_rec, char *file_name,
return;
}