Commit 999ee9c8 authored by Shane Snyder's avatar Shane Snyder

darshan-util edits for var. length name records

parent d6dad7f3
......@@ -159,7 +159,7 @@ endif
clean::
rm -f *.o *.po *.a *.so darshan-analyzer darshan-convert darshan-parser darshan-merge jenkins-hash-gen
rm -f *.o *.po *.a *.so darshan-analyzer darshan-convert darshan-diff darshan-parser darshan-merge jenkins-hash-gen
distclean:: clean
rm -f darshan-runtime-config.h aclocal.m4 autom4te.cache/* config.status config.log Makefile util/bin/darshan-job-summary.pl
......
......@@ -52,10 +52,10 @@ int process_log(const char *fname, double *io_ratio, int *used_mpio, int *used_p
return -1;
}
ret = darshan_log_getjob(file, &job);
ret = darshan_log_get_job(file, &job);
if (ret < 0)
{
fprintf(stderr, "darshan_log_getjob() failed on file %s.\n", fname);
fprintf(stderr, "darshan_log_get_job() failed on file %s.\n", fname);
darshan_log_close(file);
return -1;
}
......
......@@ -55,7 +55,7 @@ static int darshan_log_get_bgq_rec(darshan_fd fd, void* bgq_buf)
int i;
int ret;
ret = darshan_log_getmod(fd, DARSHAN_BGQ_MOD, bgq_buf,
ret = darshan_log_get_mod(fd, DARSHAN_BGQ_MOD, bgq_buf,
sizeof(struct darshan_bgq_record));
if(ret < 0)
return(-1);
......@@ -84,7 +84,7 @@ static int darshan_log_put_bgq_rec(darshan_fd fd, void* bgq_buf, int ver)
struct darshan_bgq_record *rec = (struct darshan_bgq_record *)bgq_buf;
int ret;
ret = darshan_log_putmod(fd, DARSHAN_BGQ_MOD, rec,
ret = darshan_log_put_mod(fd, DARSHAN_BGQ_MOD, rec,
sizeof(struct darshan_bgq_record), ver);
if(ret < 0)
return(-1);
......
......@@ -140,21 +140,25 @@ void obfuscate_exe(int key, char *exe)
return;
}
void obfuscate_filenames(int key, struct darshan_record_ref *rec_hash)
void obfuscate_filenames(int key, struct darshan_name_record_ref *name_hash)
{
struct darshan_record_ref *ref, *tmp;
struct darshan_name_record_ref *ref, *tmp;
uint32_t hashed;
char tmp_string[128] = {0};
darshan_record_id tmp_id;
HASH_ITER(hlink, rec_hash, ref, tmp)
HASH_ITER(hlink, name_hash, ref, tmp)
{
hashed = darshan_hashlittle(ref->name, strlen(ref->name), key);
tmp_id = ref->name_record->id;
hashed = darshan_hashlittle(ref->name_record->name,
strlen(ref->name_record->name), key);
sprintf(tmp_string, "%u", hashed);
free(ref->name);
ref->name = malloc(strlen(tmp_string) + 1);
assert(ref->name);
memcpy(ref->name, tmp_string, strlen(tmp_string));
ref->name[strlen(tmp_string)] = '\0';
free(ref->name_record);
ref->name_record = malloc(sizeof(struct darshan_name_record) +
strlen(tmp_string));
assert(ref->name_record);
ref->name_record->id = tmp_id;
strcpy(ref->name_record->name, tmp_string);
}
return;
......@@ -202,16 +206,17 @@ void add_annotation (char *annotation,
return;
}
static void remove_hash_recs(struct darshan_record_ref **rec_hash, darshan_record_id hash)
static void remove_hash_recs(struct darshan_name_record_ref **name_hash,
darshan_record_id hash)
{
struct darshan_record_ref *ref, *tmp;
struct darshan_name_record_ref *ref, *tmp;
HASH_ITER(hlink, *rec_hash, ref, tmp)
HASH_ITER(hlink, *name_hash, ref, tmp)
{
if(ref->id != hash)
if(ref->name_record->id != hash)
{
HASH_DELETE(hlink, *rec_hash, ref);
free(ref->name);
HASH_DELETE(hlink, *name_hash, ref);
free(ref->name_record);
free(ref);
}
}
......@@ -232,8 +237,8 @@ int main(int argc, char **argv)
int mount_count;
char** mnt_pts;
char** fs_types;
struct darshan_record_ref *rec_hash = NULL;
struct darshan_record_ref *ref, *tmp;
struct darshan_name_record_ref *name_hash = NULL;
struct darshan_name_record_ref *ref, *tmp;
char mod_buf[DEF_MOD_BUF_SIZE];
enum darshan_comp_type comp_type;
int bzip2;
......@@ -259,7 +264,7 @@ int main(int argc, char **argv)
}
/* read job info */
ret = darshan_log_getjob(infile, &job);
ret = darshan_log_get_job(infile, &job);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -272,7 +277,7 @@ int main(int argc, char **argv)
if (obfuscate) obfuscate_job(key, &job);
if (annotation) add_annotation(annotation, &job);
ret = darshan_log_putjob(outfile, &job);
ret = darshan_log_put_job(outfile, &job);
if (ret < 0)
{
darshan_log_close(infile);
......@@ -280,7 +285,7 @@ int main(int argc, char **argv)
return(-1);
}
ret = darshan_log_getexe(infile, tmp_string);
ret = darshan_log_get_exe(infile, tmp_string);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -291,7 +296,7 @@ int main(int argc, char **argv)
if (obfuscate) obfuscate_exe(key, tmp_string);
ret = darshan_log_putexe(outfile, tmp_string);
ret = darshan_log_put_exe(outfile, tmp_string);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -299,7 +304,7 @@ int main(int argc, char **argv)
return(-1);
}
ret = darshan_log_getmounts(infile, &mnt_pts, &fs_types, &mount_count);
ret = darshan_log_get_mounts(infile, &mnt_pts, &fs_types, &mount_count);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -308,7 +313,7 @@ int main(int argc, char **argv)
return(-1);
}
ret = darshan_log_putmounts(outfile, mnt_pts, fs_types, mount_count);
ret = darshan_log_put_mounts(outfile, mnt_pts, fs_types, mount_count);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -316,7 +321,7 @@ int main(int argc, char **argv)
return(-1);
}
ret = darshan_log_gethash(infile, &rec_hash);
ret = darshan_log_get_namehash(infile, &name_hash);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -328,10 +333,10 @@ int main(int argc, char **argv)
/* NOTE: obfuscating filepaths breaks the ability to map files
* to the corresponding FS & mount info maintained by darshan
*/
if(obfuscate) obfuscate_filenames(key, rec_hash);
if(hash) remove_hash_recs(&rec_hash, hash);
if(obfuscate) obfuscate_filenames(key, name_hash);
if(hash) remove_hash_recs(&name_hash, hash);
ret = darshan_log_puthash(outfile, rec_hash);
ret = darshan_log_put_namehash(outfile, name_hash);
if(ret < 0)
{
darshan_log_close(infile);
......@@ -402,10 +407,10 @@ int main(int argc, char **argv)
free(fs_types);
}
HASH_ITER(hlink, rec_hash, ref, tmp)
HASH_ITER(hlink, name_hash, ref, tmp)
{
HASH_DELETE(hlink, rec_hash, ref);
free(ref->name);
HASH_DELETE(hlink, name_hash, ref);
free(ref->name_record);
free(ref);
}
......
......@@ -53,8 +53,8 @@ int main(int argc, char *argv[])
darshan_fd file1, file2;
struct darshan_job job1, job2;
char exe1[4096], exe2[4096];
struct darshan_record_ref *name_hash1 = NULL, *name_hash2 = NULL;
struct darshan_record_ref *name_ref1, *name_ref2;
struct darshan_name_record_ref *name_hash1 = NULL, *name_hash2 = NULL;
struct darshan_name_record_ref *name_ref1, *name_ref2;
struct darshan_file_record_ref *rec_hash1 = NULL, *rec_hash2 = NULL;
struct darshan_file_record_ref *rec_ref1, *rec_ref2, *rec_tmp;
struct darshan_mod_record_ref *mod_rec1, *mod_rec2;
......@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
}
/* get job data for each log file */
ret = darshan_log_getjob(file1, &job1);
ret = darshan_log_get_job(file1, &job1);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_getjob(file2, &job2);
ret = darshan_log_get_job(file2, &job2);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
}
/* get exe string for each log file */
ret = darshan_log_getexe(file1, exe1);
ret = darshan_log_get_exe(file1, exe1);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_getexe(file2, exe2);
ret = darshan_log_get_exe(file2, exe2);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
(int64_t)(job2.end_time - job2.start_time + 1));
/* get hash of record ids to file names for each log */
ret = darshan_log_gethash(file1, &name_hash1);
ret = darshan_log_get_namehash(file1, &name_hash1);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_gethash(file2, &name_hash2);
ret = darshan_log_get_namehash(file2, &name_hash2);
if(ret < 0)
{
darshan_log_close(file1);
......@@ -246,14 +246,14 @@ int main(int argc, char *argv[])
HASH_FIND(hlink, name_hash1, &(base_rec1->id),
sizeof(darshan_record_id), name_ref1);
assert(name_ref1);
file_name1 = name_ref1->name;
file_name1 = name_ref1->name_record->name;
}
if(mod_buf2)
{
HASH_FIND(hlink, name_hash2, &(base_rec2->id),
sizeof(darshan_record_id), name_ref2);
assert(name_ref2);
file_name2 = name_ref2->name;
file_name2 = name_ref2->name_record->name;
}
mod_logutils[i]->log_print_diff(mod_buf1, file_name1, mod_buf2, file_name2);
......@@ -314,7 +314,7 @@ int main(int argc, char *argv[])
HASH_FIND(hlink, name_hash2, &(base_rec2->id),
sizeof(darshan_record_id), name_ref2);
assert(name_ref2);
file_name2 = name_ref2->name;
file_name2 = name_ref2->name_record->name;
mod_logutils[i]->log_print_diff(NULL, NULL, mod_rec2->mod_dat, file_name2);
......@@ -340,13 +340,13 @@ int main(int argc, char *argv[])
HASH_ITER(hlink, name_hash1, name_ref1, name_ref2)
{
HASH_DELETE(hlink, name_hash1, name_ref1);
free(name_ref1->name);
free(name_ref1->name_record);
free(name_ref1);
}
HASH_ITER(hlink, name_hash2, name_ref2, name_ref1)
{
HASH_DELETE(hlink, name_hash2, name_ref2);
free(name_ref2->name);
free(name_ref2->name_record);
free(name_ref2);
}
......
......@@ -55,7 +55,7 @@ static int darshan_log_get_hdf5_file(darshan_fd fd, void* hdf5_buf)
int i;
int ret;
ret = darshan_log_getmod(fd, DARSHAN_HDF5_MOD, hdf5_buf,
ret = darshan_log_get_mod(fd, DARSHAN_HDF5_MOD, hdf5_buf,
sizeof(struct darshan_hdf5_file));
if(ret < 0)
return(-1);
......@@ -84,7 +84,7 @@ static int darshan_log_put_hdf5_file(darshan_fd fd, void* hdf5_buf, int ver)
struct darshan_hdf5_file *file = (struct darshan_hdf5_file *)hdf5_buf;
int ret;
ret = darshan_log_putmod(fd, DARSHAN_HDF5_MOD, file,
ret = darshan_log_put_mod(fd, DARSHAN_HDF5_MOD, file,
sizeof(struct darshan_hdf5_file), ver);
if(ret < 0)
return(-1);
......
This diff is collapsed.
......@@ -33,7 +33,7 @@ struct darshan_fd_s
enum darshan_comp_type comp_type;
/* log file offset/length maps for each log file region */
struct darshan_log_map job_map;
struct darshan_log_map rec_map;
struct darshan_log_map name_map;
struct darshan_log_map mod_map[DARSHAN_MAX_MODS];
/* module-specific log-format versions contained in log */
uint32_t mod_ver[DARSHAN_MAX_MODS];
......@@ -43,10 +43,9 @@ struct darshan_fd_s
};
typedef struct darshan_fd_s* darshan_fd;
struct darshan_record_ref
struct darshan_name_record_ref
{
char *name;
darshan_record_id id;
struct darshan_name_record *name_record;
UT_hash_handle hlink;
};
......@@ -119,19 +118,19 @@ extern struct darshan_mod_logutil_funcs *mod_logutils[];
darshan_fd darshan_log_open(const char *name);
darshan_fd darshan_log_create(const char *name, enum darshan_comp_type comp_type,
int partial_flag);
int darshan_log_getjob(darshan_fd fd, struct darshan_job *job);
int darshan_log_putjob(darshan_fd fd, struct darshan_job *job);
int darshan_log_getexe(darshan_fd fd, char *buf);
int darshan_log_putexe(darshan_fd fd, char *buf);
int darshan_log_getmounts(darshan_fd fd, char*** mnt_pts,
int darshan_log_get_job(darshan_fd fd, struct darshan_job *job);
int darshan_log_put_job(darshan_fd fd, struct darshan_job *job);
int darshan_log_get_exe(darshan_fd fd, char *buf);
int darshan_log_put_exe(darshan_fd fd, char *buf);
int darshan_log_get_mounts(darshan_fd fd, char*** mnt_pts,
char*** fs_types, int* count);
int darshan_log_putmounts(darshan_fd fd, char** mnt_pts,
int darshan_log_put_mounts(darshan_fd fd, char** mnt_pts,
char** fs_types, int count);
int darshan_log_gethash(darshan_fd fd, struct darshan_record_ref **hash);
int darshan_log_puthash(darshan_fd fd, struct darshan_record_ref *hash);
int darshan_log_getmod(darshan_fd fd, darshan_module_id mod_id,
int darshan_log_get_namehash(darshan_fd fd, struct darshan_name_record_ref **hash);
int darshan_log_put_namehash(darshan_fd fd, struct darshan_name_record_ref *hash);
int darshan_log_get_mod(darshan_fd fd, darshan_module_id mod_id,
void *mod_buf, int mod_buf_sz);
int darshan_log_putmod(darshan_fd fd, darshan_module_id mod_id,
int darshan_log_put_mod(darshan_fd fd, darshan_module_id mod_id,
void *mod_buf, int mod_buf_sz, int ver);
void darshan_log_close(darshan_fd file);
......
......@@ -192,9 +192,9 @@ int main(int argc, char *argv[])
char **merge_mnt_pts;
char **merge_fs_types;
int merge_mnt_count = 0;
struct darshan_record_ref *in_hash = NULL;
struct darshan_record_ref *merge_hash = NULL;
struct darshan_record_ref *ref, *tmp, *found;
struct darshan_name_record_ref *in_hash = NULL;
struct darshan_name_record_ref *merge_hash = NULL;
struct darshan_name_record_ref *ref, *tmp, *found;
struct darshan_shared_record_ref *shared_rec_hash = NULL;
struct darshan_shared_record_ref *sref, *stmp;
struct darshan_base_record *base_rec;
......@@ -225,7 +225,7 @@ int main(int argc, char *argv[])
}
/* read job-level metadata from the input file */
ret = darshan_log_getjob(in_fd, &in_job);
ret = darshan_log_get_job(in_fd, &in_job);
if(ret < 0)
{
fprintf(stderr,
......@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
/* get job data, exe, & mounts directly from the first input log */
memcpy(&merge_job, &in_job, sizeof(struct darshan_job));
ret = darshan_log_getexe(in_fd, merge_exe);
ret = darshan_log_get_exe(in_fd, merge_exe);
if(ret < 0)
{
fprintf(stderr,
......@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_getmounts(in_fd, &merge_mnt_pts,
ret = darshan_log_get_mounts(in_fd, &merge_mnt_pts,
&merge_fs_types, &merge_mnt_count);
if(ret < 0)
{
......@@ -285,7 +285,7 @@ int main(int argc, char *argv[])
}
/* read the hash of ids->names for the input log */
ret = darshan_log_gethash(in_fd, &in_hash);
ret = darshan_log_get_namehash(in_fd, &in_hash);
if(ret < 0)
{
fprintf(stderr,
......@@ -295,17 +295,19 @@ int main(int argc, char *argv[])
return(-1);
}
/* iterate the input hash, copying over record_id->file_name mappings
/* iterate the input hash, copying over record id->name mappings
* that have not already been copied to the output hash
*/
HASH_ITER(hlink, in_hash, ref, tmp)
{
HASH_FIND(hlink, merge_hash, &(ref->id), sizeof(darshan_record_id), found);
HASH_FIND(hlink, merge_hash, &(ref->name_record->id),
sizeof(darshan_record_id), found);
if(!found)
{
HASH_ADD(hlink, merge_hash, id, sizeof(darshan_record_id), ref);
HASH_ADD(hlink, merge_hash, name_record->id,
sizeof(darshan_record_id), ref);
}
else if(strcmp(ref->name, found->name))
else if(strcmp(ref->name_record->name, found->name_record->name))
{
fprintf(stderr,
"Error: invalid Darshan record table entry.\n");
......@@ -330,7 +332,7 @@ int main(int argc, char *argv[])
}
/* write the darshan job info, exe string, and mount data to output file */
ret = darshan_log_putjob(merge_fd, &merge_job);
ret = darshan_log_put_job(merge_fd, &merge_job);
if(ret < 0)
{
fprintf(stderr, "Error: unable to write job data to output darshan log.\n");
......@@ -339,7 +341,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_putexe(merge_fd, merge_exe);
ret = darshan_log_put_exe(merge_fd, merge_exe);
if(ret < 0)
{
fprintf(stderr, "Error: unable to write exe string to output darshan log.\n");
......@@ -348,7 +350,7 @@ int main(int argc, char *argv[])
return(-1);
}
ret = darshan_log_putmounts(merge_fd, merge_mnt_pts, merge_fs_types, merge_mnt_count);
ret = darshan_log_put_mounts(merge_fd, merge_mnt_pts, merge_fs_types, merge_mnt_count);
if(ret < 0)
{
fprintf(stderr, "Error: unable to write mount data to output darshan log.\n");
......@@ -358,7 +360,7 @@ int main(int argc, char *argv[])
}
/* write the merged table of records to output file */
ret = darshan_log_puthash(merge_fd, merge_hash);
ret = darshan_log_put_namehash(merge_fd, merge_hash);
if(ret < 0)
{
fprintf(stderr, "Error: unable to write record table to output darshan log.\n");
......
......@@ -55,7 +55,7 @@ static int darshan_log_get_mpiio_file(darshan_fd fd, void* mpiio_buf)
int i;
int ret;
ret = darshan_log_getmod(fd, DARSHAN_MPIIO_MOD, mpiio_buf,
ret = darshan_log_get_mod(fd, DARSHAN_MPIIO_MOD, mpiio_buf,
sizeof(struct darshan_mpiio_file));
if(ret < 0)
return(-1);
......@@ -84,7 +84,7 @@ static int darshan_log_put_mpiio_file(darshan_fd fd, void* mpiio_buf, int ver)
struct darshan_mpiio_file *file = (struct darshan_mpiio_file *)mpiio_buf;
int ret;
ret = darshan_log_putmod(fd, DARSHAN_MPIIO_MOD, file,
ret = darshan_log_put_mod(fd, DARSHAN_MPIIO_MOD, file,
sizeof(struct darshan_mpiio_file), ver);
if(ret < 0)
return(-1);
......
......@@ -67,7 +67,7 @@ static int darshan_log_get_null_record(darshan_fd fd, void* null_buf)
int ret;
/* read a NULL module record from the darshan log file */
ret = darshan_log_getmod(fd, DARSHAN_NULL_MOD, null_buf,
ret = darshan_log_get_mod(fd, DARSHAN_NULL_MOD, null_buf,
sizeof(struct darshan_null_record));
if(ret < 0)
return(-1);
......@@ -101,7 +101,7 @@ static int darshan_log_put_null_record(darshan_fd fd, void* null_buf, int ver)
int ret;
/* append NULL record to darshan log file */
ret = darshan_log_putmod(fd, DARSHAN_NULL_MOD, rec,
ret = darshan_log_put_mod(fd, DARSHAN_NULL_MOD, rec,
sizeof(struct darshan_null_record), ver);
if(ret < 0)
return(-1);
......
......@@ -107,13 +107,13 @@ void posix_accum_file(struct darshan_posix_file *pfile, hash_entry_t *hfile, int
void posix_accum_perf(struct darshan_posix_file *pfile, perf_data_t *pdata);
void posix_calc_file(hash_entry_t *file_hash, file_data_t *fdata);
void posix_print_total_file(struct darshan_posix_file *pfile);
void posix_file_list(hash_entry_t *file_hash, struct darshan_record_ref *rec_hash, int detail_flag);
void posix_file_list(hash_entry_t *file_hash, struct darshan_name_record_ref *name_hash, int detail_flag);
void mpiio_accum_file(struct darshan_mpiio_file *mfile, hash_entry_t *hfile, int64_t nprocs);
void mpiio_accum_perf(struct darshan_mpiio_file *mfile, perf_data_t *pdata);
void mpiio_calc_file(hash_entry_t *file_hash, file_data_t *fdata);
void mpiio_print_total_file(struct darshan_mpiio_file *mfile);
void mpiio_file_list(hash_entry_t *file_hash, struct darshan_record_ref *rec_hash, int detail_flag);
void mpiio_file_list(hash_entry_t *file_hash, struct darshan_name_record_ref *name_hash, int detail_flag);
void calc_perf(perf_data_t *pdata, int64_t nprocs);
......@@ -203,8 +203,8 @@ int main(int argc, char **argv)
char tmp_string[4096] = {0};
darshan_fd fd;
struct darshan_job job;
struct darshan_record_ref *rec_hash = NULL;
struct darshan_record_ref *ref, *tmp_ref;
struct darshan_name_record_ref *name_hash = NULL;
struct darshan_name_record_ref *ref, *tmp_ref;
int mount_count;
char** mnt_pts;
char** fs_types;
......@@ -234,7 +234,7 @@ int main(int argc, char **argv)
return(-1);
/* read darshan job info */
ret = darshan_log_getjob(fd, &job);
ret = darshan_log_get_job(fd, &job);
if(ret < 0)
{
darshan_log_close(fd);
......@@ -242,7 +242,7 @@ int main(int argc, char **argv)
}
/* get the original command line for this job */
ret = darshan_log_getexe(fd, tmp_string);
ret = darshan_log_get_exe(fd, tmp_string);
if(ret < 0)
{
darshan_log_close(fd);
......@@ -250,7 +250,7 @@ int main(int argc, char **argv)
}
/* get the mount information for this log */
ret = darshan_log_getmounts(fd, &mnt_pts, &fs_types, &mount_count);
ret = darshan_log_get_mounts(fd, &mnt_pts, &fs_types, &mount_count);
if(ret < 0)
{
darshan_log_close(fd);
......@@ -258,7 +258,7 @@ int main(int argc, char **argv)
}
/* read hash of darshan records */
ret = darshan_log_gethash(fd, &rec_hash);
ret = darshan_log_get_namehash(fd, &name_hash);
if(ret < 0)
{
darshan_log_close(fd);
......@@ -317,7 +317,7 @@ int main(int argc, char **argv)
printf("# -------------------------------------------------------\n");
printf("# header: %zu bytes (uncompressed)\n", sizeof(struct darshan_header));
printf("# job data: %zu bytes (compressed)\n", fd->job_map.len);
printf("# record table: %zu bytes (compressed)\n", fd->rec_map.len);
printf("# record table: %zu bytes (compressed)\n", fd->name_map.len);
for(i=0; i<DARSHAN_MAX_MODS; i++)
{
if(fd->mod_map[i].len)
......@@ -426,13 +426,13 @@ int main(int argc, char **argv)
base_rec = (struct darshan_base_record *)mod_buf;
/* get the pathname for this record */
HASH_FIND(hlink, rec_hash, &(base_rec->id), sizeof(darshan_record_id), ref);
HASH_FIND(hlink, name_hash, &(base_rec->id), sizeof(darshan_record_id), ref);
assert(ref);
/* get mount point and fs type associated with this record */
for(j=0; j<mount_count; j++)
{
if(strncmp(mnt_pts[j], ref->name, strlen(mnt_pts[j])) == 0)
if(strncmp(mnt_pts[j], ref->name_record->name, strlen(mnt_pts[j])) == 0)
{
mnt_pt = mnt_pts[j];
fs_type = fs_types[j];
......@@ -447,7 +447,7 @@ int main(int argc, char **argv)
if(mask & OPTION_BASE)
{
/* print the corresponding module data for this record */
mod_logutils[i]->log_print_record(mod_buf, ref->name,
mod_logutils[i]->log_print_record(mod_buf, ref->name_record->name,
mnt_pt, fs_type, fd->mod_ver[i]);
}
......@@ -598,16 +598,16 @@ int main(int argc, char **argv)
if(i == DARSHAN_POSIX_MOD)
{
if(mask & OPTION_FILE_LIST_DETAILED)
posix_file_list(file_hash, rec_hash, 1);
posix_file_list(file_hash, name_hash, 1);
else
posix_file_list(file_hash, rec_hash, 0);
posix_file_list(file_hash, name_hash, 0);
}
else if(i == DARSHAN_MPIIO_MOD)
{
if(mask & OPTION_FILE_LIST_DETAILED)
mpiio_file_list(file_hash, rec_hash, 1);
mpiio_file_list(file_hash, name_hash, 1);
else
mpiio_file_list(file_hash, rec_hash, 0);
mpiio_file_list(file_hash, name_hash, 0);
}
}
......@@ -640,10 +640,10 @@ cleanup:
free(pdata.rank_cumul_md_time);
/* free record hash data */
HASH_ITER(hlink, rec_hash, ref, tmp_ref)
HASH_ITER(hlink, name_hash, ref, tmp_ref)
{
HASH_DELETE(hlink, rec_hash, ref);
free(ref->name);
HASH_DELETE(hlink, name_hash, ref);
free(ref->name_record);
free(ref);
}
......@@ -1413,13 +1413,13 @@ void mpiio_print_total_file(struct darshan_mpiio_file *mfile)
}
void posix_file_list(hash_entry_t *file_hash,
struct darshan_record_ref *rec_hash,
struct darshan_name_record_ref *name_hash,
int detail_flag)
{
hash_entry_t *curr = NULL;
hash_entry_t *tmp = NULL;
struct darshan_posix_file *file_rec = NULL;
struct darshan_record_ref *ref = NULL;
struct darshan_name_record_ref *ref = NULL;
int i;
/* list of columns:
......@@ -1477,12 +1477,12 @@ void posix_file_list(hash_entry_t *file_hash,
file_rec = (struct darshan_posix_file*)curr->rec_dat;
assert(file_rec);
HASH_FIND(hlink, rec_hash, &(curr->rec_id), sizeof(darshan_record_id), ref);
HASH_FIND(hlink, name_hash, &(curr->rec_id), sizeof(darshan_record_id), ref);
assert(ref);
printf("%" PRIu64 "\t%s\t%" PRId64 "\t%f\t%f",
curr->rec_id,
ref->name,
ref->name_record->name,
curr->procs,
curr->slowest_time,
curr->cumul_time/(double)curr->procs);
......@@ -1504,13 +1504,13 @@ void posix_file_list(hash_entry_t *file_hash,
}
void mpiio_file_list(hash_entry_t *file_hash,
struct darshan_record_ref *rec_hash,
struct darshan_name_record_ref *name_hash,
int detail_flag)
{
hash_entry_t *curr = NULL;
hash_entry_t *tmp = NULL;
struct darshan_mpiio_file *file_rec = NULL;
struct darshan_record_ref *ref = NULL;
struct darshan_name_record_ref *ref = NULL;
int i;
/* list of columns:
......@@ -1571,12 +1571,12 @@ void mpiio_file_list(hash_entry_t *file_hash,
file_rec = (struct darshan_mpiio_file*)curr->rec_dat;
assert(file_rec);
HASH_FIND(hlink, rec_hash, &(curr->rec_id), sizeof(darshan_record_id), ref);
HASH_FIND(hlink, name_hash, &(curr->rec_id), sizeof(darshan_record_id), ref);
assert(ref);
printf("%" PRIu64 "\t%s\t%" PRId64 "\t%f\t%f",
curr->rec_id,
ref->name,
ref->name_record->name,
curr->procs,
curr->slowest_time,
curr->cumul_time/(double)curr->procs);
......
......@@ -55,7 +55,7 @@ static int darshan_log_get_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf)
int i;
int ret;
ret = darshan_log_getmod(fd, DARSHAN_PNETCDF_MOD, pnetcdf_buf,
ret = darshan_log_get_mod(fd, DARSHAN_PNETCDF_MOD, pnetcdf_buf,
sizeof(struct darshan_pnetcdf_file));
if(ret < 0)
return(-1);
......@@ -84,7 +84,7 @@ static int darshan_log_put_pnetcdf_file(darshan_fd fd, void* pnetcdf_buf, int ve
struct darshan_pnetcdf_file *file = (struct darshan_pnetcdf_file *)pnetcdf_buf;
int ret;
ret = darshan_log_putmod(fd, DARSHAN_PNETCDF_MOD, file,
ret = darshan_log_put_mod(fd, DARSHAN_PNETCDF_MOD, file,
sizeof(struct darshan_pnetcdf_file), ver);
if(ret < 0)
return(-1);
......
......@@ -55,7 +55,7 @@ static int darshan_log_get_posix_file(darshan_fd fd, void* posix_buf)
int i;
int ret;