From f1408a7d802f97170d0019d58d185c23bc086bc1 Mon Sep 17 00:00:00 2001 From: Phil Carns Date: Fri, 3 Feb 2017 22:01:22 +0000 Subject: [PATCH] set mmap counter to -1 if disabled --- darshan-runtime/lib/darshan-posix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/darshan-runtime/lib/darshan-posix.c b/darshan-runtime/lib/darshan-posix.c index 0f47bd8..3356970 100644 --- a/darshan-runtime/lib/darshan-posix.c +++ b/darshan-runtime/lib/darshan-posix.c @@ -1349,6 +1349,10 @@ static struct posix_file_record_ref *posix_track_new_file_record( file_rec->base_rec.rank = my_rank; file_rec->counters[POSIX_MEM_ALIGNMENT] = darshan_mem_alignment; file_rec->counters[POSIX_FILE_ALIGNMENT] = fs_info.block_size; +#ifndef DARSHAN_WRAP_MMAP + /* set invalid value here if MMAP instrumentation is disabled */ + file_rec->counters[POSIX_MMAPS] = -1; +#endif /* undefined DARSHAN_WRAP_MMAP */ rec_ref->fs_type = fs_info.fs_type; rec_ref->file_rec = file_rec; posix_runtime->file_rec_count++; -- 2.26.2