Fix getMaxResidentSetSizeMB() on iOS.
authorMike Klein <mtklein@chromium.org>
Mon, 6 Feb 2017 15:41:11 +0000 (10:41 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Mon, 6 Feb 2017 17:06:11 +0000 (17:06 +0000)
It's reporting numbers rather too large to be plausible.

Change-Id: I09a32ebcf6d5c9cbab18d2099cfd394efe650b24
Reviewed-on: https://skia-review.googlesource.com/8055
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

tools/ProcStats.cpp

index 9c09b5e9b04c0a795f2888e4f65f1eeb1485ef99..51ddf55aa50af7339658f6a239f2e844186b0772 100644 (file)
@@ -13,7 +13,7 @@
     int sk_tools::getMaxResidentSetSizeMB() {
         struct rusage ru;
         getrusage(RUSAGE_SELF, &ru);
-    #if defined(SK_BUILD_FOR_MAC)
+    #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
         return static_cast<int>(ru.ru_maxrss / 1024 / 1024);  // Darwin reports bytes.
     #else
         return static_cast<int>(ru.ru_maxrss / 1024);  // Linux reports kilobytes.