snapshot: debugging - show the snapshot regions that are added
authorBrian Norris <banorris@uci.edu>
Fri, 19 Apr 2013 22:20:18 +0000 (15:20 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 19 Apr 2013 22:20:18 +0000 (15:20 -0700)
snapshot.cc

index 56bdeb1..66faacd 100644 (file)
@@ -190,6 +190,9 @@ static void mprot_add_to_snapshot(void *addr, unsigned int numPages)
                exit(EXIT_FAILURE);
        }
 
+       DEBUG("snapshot region %p-%p (%u page%s)\n",
+                       addr, (char *)addr + numPages * PAGESIZE, numPages,
+                       numPages > 1 ? "s" : "");
        mprot_snap->regionsToSnapShot[memoryregion].basePtr = addr;
        mprot_snap->regionsToSnapShot[memoryregion].sizeInPages = numPages;
 }