summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-10-15 12:42:12 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-10-15 12:42:12 -0400
commit1bd9689a45f0743267cc274a358c3705233d5bf9 (patch)
tree0a816e41e2a8390787fc6fe0e55036879de6b493
parentfd8de1ddfa499485beb6265e0b7ceb25439f3a8e (diff)
downloadmongo-1bd9689a45f0743267cc274a358c3705233d5bf9.tar.gz
Add mapping pointers to the verbose output from the map/unmap system
calls so it's possible to associate them.
-rw-r--r--src/os_posix/os_map.c8
-rw-r--r--src/os_win/os_map.c11
2 files changed, 9 insertions, 10 deletions
diff --git a/src/os_posix/os_map.c b/src/os_posix/os_map.c
index 7db496b0905..d9b44d65fc7 100644
--- a/src/os_posix/os_map.c
+++ b/src/os_posix/os_map.c
@@ -19,9 +19,6 @@ __wt_mmap(WT_SESSION_IMPL *session,
WT_UNUSED(mappingcookie);
- WT_RET(__wt_verbose(session, WT_VERB_FILEOPS,
- "%s: map %" PRIuMAX " bytes", fh->name, (uintmax_t)fh->size));
-
if ((map = mmap(NULL, (size_t)fh->size,
PROT_READ,
#ifdef MAP_NOCORE
@@ -33,6 +30,9 @@ __wt_mmap(WT_SESSION_IMPL *session,
"%s map error: failed to map %" PRIuMAX " bytes",
fh->name, (uintmax_t)fh->size);
}
+ (void)__wt_verbose(session, WT_VERB_FILEOPS,
+ "%s: map %p: %" PRIuMAX " bytes",
+ fh->name, map, (uintmax_t)fh->size);
*(void **)mapp = map;
*lenp = (size_t)fh->size;
@@ -117,7 +117,7 @@ __wt_munmap(WT_SESSION_IMPL *session,
WT_UNUSED(mappingcookie);
WT_RET(__wt_verbose(session, WT_VERB_FILEOPS,
- "%s: unmap %" PRIuMAX " bytes", fh->name, (uintmax_t)len));
+ "%s: unmap %p: %" PRIuMAX " bytes", fh->name, map, (uintmax_t)len));
if (munmap(map, len) == 0)
return (0);
diff --git a/src/os_win/os_map.c b/src/os_win/os_map.c
index 5d229ce6639..78d278893f0 100644
--- a/src/os_win/os_map.c
+++ b/src/os_win/os_map.c
@@ -17,10 +17,6 @@ __wt_mmap(WT_SESSION_IMPL *session, WT_FH *fh, void *mapp, size_t *lenp,
{
void *map;
- WT_RET(__wt_verbose(session, WT_VERB_FILEOPS,
- "%s: MapViewOfFile %" PRIuMAX " bytes",
- fh->name, (uintmax_t)fh->size));
-
*mappingcookie =
CreateFileMapping(fh->filehandle, NULL, PAGE_READONLY, 0, 0, NULL);
if (*mappingcookie == NULL)
@@ -38,6 +34,9 @@ __wt_mmap(WT_SESSION_IMPL *session, WT_FH *fh, void *mapp, size_t *lenp,
"%s map error: failed to map %" PRIuMAX " bytes",
fh->name, (uintmax_t)fh->size);
}
+ (void)__wt_verbose(session, WT_VERB_FILEOPS,
+ "%s: MapViewOfFile %p: %" PRIuMAX " bytes",
+ fh->name, map, (uintmax_t)fh->size);
*(void **)mapp = map;
*lenp = (size_t)fh->size;
@@ -80,8 +79,8 @@ __wt_munmap(WT_SESSION_IMPL *session, WT_FH *fh, void *map, size_t len,
void** mappingcookie)
{
WT_RET(__wt_verbose(session, WT_VERB_FILEOPS,
- "%s: UnmapViewOfFile %" PRIuMAX " bytes",
- fh->name, (uintmax_t)len));
+ "%s: UnmapViewOfFile %p: %" PRIuMAX " bytes",
+ fh->name, map, (uintmax_t)len));
if (UnmapViewOfFile(map) == 0) {
WT_RET_MSG(session, __wt_errno(),