<rdar://problem/13415471>

Don't get dirty page size if we are not going to send it back

llvm-svn: 176992
diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
index c0ce9c6..fbcda3f 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
@@ -413,12 +413,12 @@
     
         rsize = ti.resident_size;
         vsize = ti.virtual_size;
-    }
-    
-    if (scanType & eProfileMemoryDirtyPage)
-    {
-        // This uses vmmap strategy. We don't use the returned rsize for now. We prefer to match top's version since that's what we do for the rest of the metrics.
-        GetRegionSizes(task, rsize, dirty_size);
+        
+        if (scanType & eProfileMemoryDirtyPage)
+        {
+            // This uses vmmap strategy. We don't use the returned rsize for now. We prefer to match top's version since that's what we do for the rest of the metrics.
+            GetRegionSizes(task, rsize, dirty_size);
+        }
     }
     
     return true;