Commit 202764eb authored by Shane Snyder's avatar Shane Snyder

Merge branch 'rename-wrapping'

parents 598a2e85 bcc58023
......@@ -30,6 +30,12 @@
X(POSIX_FSYNCS) \
/* count of posix fdatasyncs */\
X(POSIX_FDSYNCS) \
/* count of renames (as source file) */\
X(POSIX_RENAME_SOURCES) \
/* count of renames (as target file) */\
X(POSIX_RENAME_TARGETS) \
/* Darshan record ID of first rename source */\
X(POSIX_RENAMED_FROM) \
/* mode of file */\
X(POSIX_MODE) \
/* total bytes read */\
......
......@@ -82,6 +82,7 @@ DARSHAN_FORWARD_DECL(aio_return, ssize_t, (struct aiocb *aiocbp));
DARSHAN_FORWARD_DECL(aio_return64, ssize_t, (struct aiocb64 *aiocbp));
DARSHAN_FORWARD_DECL(lio_listio, int, (int mode, struct aiocb *const aiocb_list[], int nitems, struct sigevent *sevp));
DARSHAN_FORWARD_DECL(lio_listio64, int, (int mode, struct aiocb64 *const aiocb_list[], int nitems, struct sigevent *sevp));
DARSHAN_FORWARD_DECL(rename, int, (const char *oldpath, const char *newpath));
/* The posix_file_record_ref structure maintains necessary runtime metadata
* for the POSIX file record (darshan_posix_file structure, defined in
......@@ -1402,6 +1403,74 @@ int DARSHAN_DECL(lio_listio64)(int mode, struct aiocb64 *const aiocb_list[],
return(ret);
}
int DARSHAN_DECL(rename)(const char *oldpath, const char *newpath)
{
int ret;
double tm1, tm2;
char *oldpath_clean, *newpath_clean;
darshan_record_id old_rec_id, new_rec_id;
struct posix_file_record_ref *old_rec_ref, *new_rec_ref;
MAP_OR_FAIL(rename);
tm1 = darshan_core_wtime();
ret = __real_rename(oldpath, newpath);
tm2 = darshan_core_wtime();
if(ret == 0)
{
oldpath_clean = darshan_clean_file_path(oldpath);
if(!oldpath_clean) oldpath_clean = (char *)oldpath;
if(darshan_core_excluded_path(oldpath_clean))
{
if(oldpath_clean != oldpath) free(oldpath_clean);
return(ret);
}
old_rec_id = darshan_core_gen_record_id(oldpath_clean);
POSIX_PRE_RECORD();
old_rec_ref = darshan_lookup_record_ref(posix_runtime->rec_id_hash,
&old_rec_id, sizeof(darshan_record_id));
if(!old_rec_ref)
{
POSIX_POST_RECORD();
if(oldpath_clean != oldpath) free(oldpath_clean);
return(ret);
}
old_rec_ref->file_rec->counters[POSIX_RENAME_SOURCES] += 1;
DARSHAN_TIMER_INC_NO_OVERLAP(old_rec_ref->file_rec->fcounters[POSIX_F_META_TIME],
tm1, tm2, old_rec_ref->last_meta_end);
newpath_clean = darshan_clean_file_path(newpath);
if(!newpath_clean) newpath_clean = (char *)newpath;
if(darshan_core_excluded_path(newpath_clean))
{
POSIX_POST_RECORD();
if(oldpath_clean != oldpath) free(oldpath_clean);
if(newpath_clean != newpath) free(newpath_clean);
return(ret);
}
new_rec_id = darshan_core_gen_record_id(newpath_clean);
new_rec_ref = darshan_lookup_record_ref(posix_runtime->rec_id_hash,
&new_rec_id, sizeof(darshan_record_id));
if(!new_rec_ref)
new_rec_ref = posix_track_new_file_record(new_rec_id, newpath_clean);
if(new_rec_ref)
{
new_rec_ref->file_rec->counters[POSIX_RENAME_TARGETS] += 1;
if(new_rec_ref->file_rec->counters[POSIX_RENAMED_FROM] == 0)
new_rec_ref->file_rec->counters[POSIX_RENAMED_FROM] = old_rec_id;
}
POSIX_POST_RECORD();
if(oldpath_clean != oldpath) free(oldpath_clean);
if(newpath_clean != newpath) free(newpath_clean);
}
return(ret);
}
/**********************************************************
* Internal functions for manipulating POSIX module state *
**********************************************************/
......@@ -1574,13 +1643,14 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
tmp_file.base_rec.rank = -1;
/* sum */
for(j=POSIX_OPENS; j<=POSIX_FDSYNCS; j++)
for(j=POSIX_OPENS; j<=POSIX_RENAME_TARGETS; j++)
{
tmp_file.counters[j] = infile->counters[j] + inoutfile->counters[j];
if(tmp_file.counters[j] < 0) /* make sure invalid counters are -1 exactly */
tmp_file.counters[j] = -1;
}
tmp_file.counters[POSIX_RENAMED_FROM] = infile->counters[POSIX_RENAMED_FROM];
tmp_file.counters[POSIX_MODE] = infile->counters[POSIX_MODE];
/* sum */
......
......@@ -40,3 +40,4 @@
--wrap=lio_listio
--wrap=lio_listio64
--wrap=fileno
--wrap=rename
......@@ -158,7 +158,7 @@ static void darshan_log_print_bgq_rec(void *file_rec, char *file_name,
for(i=0; i<BGQ_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
bgq_file_rec->base_rec.rank, bgq_file_rec->base_rec.id,
bgq_counter_names[i], bgq_file_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -204,7 +204,7 @@ static void darshan_log_print_bgq_rec_diff(void *file_rec1, char *file_name1,
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
file1->base_rec.rank, file1->base_rec.id, bgq_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -212,18 +212,18 @@ static void darshan_log_print_bgq_rec_diff(void *file_rec1, char *file_name1,
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
file2->base_rec.rank, file2->base_rec.id, bgq_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
file1->base_rec.rank, file1->base_rec.id, bgq_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_BGQ_MOD],
file2->base_rec.rank, file2->base_rec.id, bgq_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
......@@ -161,7 +161,7 @@ static void darshan_log_print_hdf5_file(void *file_rec, char *file_name,
for(i=0; i<HDF5_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
hdf5_file_rec->base_rec.rank, hdf5_file_rec->base_rec.id,
hdf5_counter_names[i], hdf5_file_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -209,7 +209,7 @@ static void darshan_log_print_hdf5_file_diff(void *file_rec1, char *file_name1,
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
file1->base_rec.rank, file1->base_rec.id, hdf5_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -217,18 +217,18 @@ static void darshan_log_print_hdf5_file_diff(void *file_rec1, char *file_name1,
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
file2->base_rec.rank, file2->base_rec.id, hdf5_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
file1->base_rec.rank, file1->base_rec.id, hdf5_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_HDF5_MOD],
file2->base_rec.rank, file2->base_rec.id, hdf5_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
......@@ -164,7 +164,7 @@ void darshan_log_print_version_warnings(const char *version_string);
printf("\n#<module>\t<rank>\t<record id>\t<counter>\t<value>" \
"\t<file name>\t<mount pt>\t<fs type>\n")
#define DARSHAN_COUNTER_PRINT(__mod_name, __rank, __file_id, \
#define DARSHAN_D_COUNTER_PRINT(__mod_name, __rank, __file_id, \
__counter, __counter_val, __file_name, \
__mnt_pt, __fs_type) do { \
printf("%s\t%" PRId64 "\t%" PRIu64 "\t%s\t%" PRId64 "\t%s\t%s\t%s\n", \
......@@ -172,6 +172,14 @@ void darshan_log_print_version_warnings(const char *version_string);
__file_name, __mnt_pt, __fs_type); \
} while(0)
#define DARSHAN_U_COUNTER_PRINT(__mod_name, __rank, __file_id, \
__counter, __counter_val, __file_name, \
__mnt_pt, __fs_type) do { \
printf("%s\t%" PRId64 "\t%" PRIu64 "\t%s\t%" PRIu64 "\t%s\t%s\t%s\n", \
__mod_name, __rank, __file_id, __counter, __counter_val, \
__file_name, __mnt_pt, __fs_type); \
} while(0)
#define DARSHAN_F_COUNTER_PRINT(__mod_name, __rank, __file_id, \
__counter, __counter_val, __file_name, \
__mnt_pt, __fs_type) do { \
......
......@@ -136,7 +136,7 @@ static void darshan_log_print_lustre_record(void *rec, char *file_name,
for(i=0; i<LUSTRE_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec->base_rec.rank, lustre_rec->base_rec.id, lustre_counter_names[i],
lustre_rec->counters[i], file_name, mnt_pt, fs_type);
}
......@@ -145,7 +145,7 @@ static void darshan_log_print_lustre_record(void *rec, char *file_name,
{
char strbuf[25];
snprintf( strbuf, 25, "LUSTRE_OST_ID_%d", i );
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec->base_rec.rank,
lustre_rec->base_rec.id,
strbuf,
......@@ -185,7 +185,7 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
if(!lustre_rec2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank, lustre_rec1->base_rec.id,
lustre_counter_names[i], lustre_rec1->counters[i], file_name1, "", "");
......@@ -193,18 +193,18 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
else if(!lustre_rec1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank, lustre_rec2->base_rec.id,
lustre_counter_names[i], lustre_rec2->counters[i], file_name2, "", "");
}
else if(lustre_rec1->counters[i] != lustre_rec2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank, lustre_rec1->base_rec.id,
lustre_counter_names[i], lustre_rec1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank, lustre_rec2->base_rec.id,
lustre_counter_names[i], lustre_rec2->counters[i], file_name2, "", "");
}
......@@ -219,7 +219,7 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
if (!lustre_rec2 || (i >= lustre_rec2->counters[LUSTRE_STRIPE_WIDTH]))
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank,
lustre_rec1->base_rec.id,
strbuf,
......@@ -231,7 +231,7 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
else if (!lustre_rec1 || (i >= lustre_rec1->counters[LUSTRE_STRIPE_WIDTH]))
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank,
lustre_rec2->base_rec.id,
strbuf,
......@@ -243,7 +243,7 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
else if (lustre_rec1->ost_ids[i] != lustre_rec2->ost_ids[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec1->base_rec.rank,
lustre_rec1->base_rec.id,
strbuf,
......@@ -252,7 +252,7 @@ static void darshan_log_print_lustre_record_diff(void *rec1, char *file_name1,
"",
"");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_LUSTRE_MOD],
lustre_rec2->base_rec.rank,
lustre_rec2->base_rec.id,
strbuf,
......
......@@ -158,7 +158,7 @@ static void darshan_log_print_mdhim_record(void *file_rec, char *file_name,
for(i=0; i<MDHIM_NUM_INDICES; i++)
{
/* macro defined in darshan-logutils.h */
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
mdhim_rec->base_rec.rank, mdhim_rec->base_rec.id,
mdhim_counter_names[i], mdhim_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -176,7 +176,7 @@ static void darshan_log_print_mdhim_record(void *file_rec, char *file_name,
{
char strbuf[25];
snprintf(strbuf, 25, "MDHIM_SERVER_%d", i);
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
mdhim_rec->base_rec.rank,
mdhim_rec->base_rec.id,
strbuf,
......@@ -215,7 +215,7 @@ static void darshan_log_print_mdhim_record_diff(void *file_rec1, char *file_name
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file1->base_rec.rank, file1->base_rec.id, mdhim_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -223,18 +223,18 @@ static void darshan_log_print_mdhim_record_diff(void *file_rec1, char *file_name
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file2->base_rec.rank, file2->base_rec.id, mdhim_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file1->base_rec.rank, file1->base_rec.id, mdhim_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file2->base_rec.rank, file2->base_rec.id, mdhim_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......@@ -277,7 +277,7 @@ static void darshan_log_print_mdhim_record_diff(void *file_rec1, char *file_name
if (!file2 || (i >= file2->counters[MDHIM_SERVERS]))
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file1->base_rec.rank,
file1->base_rec.id,
strbuf,
......@@ -287,7 +287,7 @@ static void darshan_log_print_mdhim_record_diff(void *file_rec1, char *file_name
else if (!file1 || (i >= file1->counters[MDHIM_SERVERS]))
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file2->base_rec.rank,
file2->base_rec.id,
strbuf,
......@@ -297,14 +297,14 @@ static void darshan_log_print_mdhim_record_diff(void *file_rec1, char *file_name
else if (file1->server_histogram[i] != file2->server_histogram[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file1->base_rec.rank,
file1->base_rec.id,
strbuf,
(int64_t)file1->server_histogram[i],
file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MDHIM_MOD],
file2->base_rec.rank,
file2->base_rec.id,
strbuf,
......
......@@ -161,7 +161,7 @@ static void darshan_log_print_mpiio_file(void *file_rec, char *file_name,
for(i=0; i<MPIIO_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
mpiio_file_rec->base_rec.rank, mpiio_file_rec->base_rec.id,
mpiio_counter_names[i], mpiio_file_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -234,7 +234,7 @@ static void darshan_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
file1->base_rec.rank, file1->base_rec.id, mpiio_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -242,18 +242,18 @@ static void darshan_log_print_mpiio_file_diff(void *file_rec1, char *file_name1,
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
file2->base_rec.rank, file2->base_rec.id, mpiio_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
file1->base_rec.rank, file1->base_rec.id, mpiio_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_MPIIO_MOD],
file2->base_rec.rank, file2->base_rec.id, mpiio_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
......@@ -137,7 +137,7 @@ static void darshan_log_print_null_record(void *file_rec, char *file_name,
for(i=0; i<NULL_NUM_INDICES; i++)
{
/* macro defined in darshan-logutils.h */
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
null_rec->base_rec.rank, null_rec->base_rec.id,
null_counter_names[i], null_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -182,7 +182,7 @@ static void darshan_log_print_null_record_diff(void *file_rec1, char *file_name1
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
file1->base_rec.rank, file1->base_rec.id, null_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -190,18 +190,18 @@ static void darshan_log_print_null_record_diff(void *file_rec1, char *file_name1
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
file2->base_rec.rank, file2->base_rec.id, null_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
file1->base_rec.rank, file1->base_rec.id, null_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_NULL_MOD],
file2->base_rec.rank, file2->base_rec.id, null_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
......@@ -161,7 +161,7 @@ static void darshan_log_print_pnetcdf_file(void *file_rec, char *file_name,
for(i=0; i<PNETCDF_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
pnetcdf_file_rec->base_rec.rank, pnetcdf_file_rec->base_rec.id,
pnetcdf_counter_names[i], pnetcdf_file_rec->counters[i],
file_name, mnt_pt, fs_type);
......@@ -210,7 +210,7 @@ static void darshan_log_print_pnetcdf_file_diff(void *file_rec1, char *file_name
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
file1->base_rec.rank, file1->base_rec.id, pnetcdf_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -218,18 +218,18 @@ static void darshan_log_print_pnetcdf_file_diff(void *file_rec1, char *file_name
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
file2->base_rec.rank, file2->base_rec.id, pnetcdf_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
file1->base_rec.rank, file1->base_rec.id, pnetcdf_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_PNETCDF_MOD],
file2->base_rec.rank, file2->base_rec.id, pnetcdf_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
......@@ -196,10 +196,16 @@ static void darshan_log_print_posix_file(void *file_rec, char *file_name,
for(i=0; i<POSIX_NUM_INDICES; i++)
{
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
posix_file_rec->base_rec.rank, posix_file_rec->base_rec.id,
posix_counter_names[i], posix_file_rec->counters[i],
file_name, mnt_pt, fs_type);
if(i == POSIX_RENAMED_FROM)
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
posix_file_rec->base_rec.rank, posix_file_rec->base_rec.id,
posix_counter_names[i], posix_file_rec->counters[i],
file_name, mnt_pt, fs_type);
else
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
posix_file_rec->base_rec.rank, posix_file_rec->base_rec.id,
posix_counter_names[i], posix_file_rec->counters[i],
file_name, mnt_pt, fs_type);
}
for(i=0; i<POSIX_F_NUM_INDICES; i++)
......@@ -272,28 +278,48 @@ static void darshan_log_print_posix_file_diff(void *file_rec1, char *file_name1,
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
if(i == POSIX_RENAMED_FROM)
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
else
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
}
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
if(i == POSIX_RENAMED_FROM)
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
else
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
if(i == POSIX_RENAMED_FROM)
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
else
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file1->base_rec.rank, file1->base_rec.id, posix_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
if(i == POSIX_RENAMED_FROM)
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
else
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_POSIX_MOD],
file2->base_rec.rank, file2->base_rec.id, posix_counter_names[i],
file2->counters[i], file_name2, "", "");
}
}
......
......@@ -137,7 +137,7 @@ static void darshan_log_print_stdio_record(void *file_rec, char *file_name,
for(i=0; i<STDIO_NUM_INDICES; i++)
{
/* macro defined in darshan-logutils.h */
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
stdio_rec->base_rec.rank, stdio_rec->base_rec.id, stdio_counter_names[i],
stdio_rec->counters[i], file_name, mnt_pt, fs_type);
}
......@@ -185,7 +185,7 @@ static void darshan_log_print_stdio_record_diff(void *file_rec1, char *file_name
if(!file2)
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
file1->base_rec.rank, file1->base_rec.id, stdio_counter_names[i],
file1->counters[i], file_name1, "", "");
......@@ -193,18 +193,18 @@ static void darshan_log_print_stdio_record_diff(void *file_rec1, char *file_name
else if(!file1)
{
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
file2->base_rec.rank, file2->base_rec.id, stdio_counter_names[i],
file2->counters[i], file_name2, "", "");
}
else if(file1->counters[i] != file2->counters[i])
{
printf("- ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
file1->base_rec.rank, file1->base_rec.id, stdio_counter_names[i],
file1->counters[i], file_name1, "", "");
printf("+ ");
DARSHAN_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_STDIO_MOD],
file2->base_rec.rank, file2->base_rec.id, stdio_counter_names[i],
file2->counters[i], file_name2, "", "");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment