diff options
author | mtklein <mtklein@chromium.org> | 2014-08-19 15:55:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-19 15:55:55 -0700 |
commit | afb4379dbca4d4d3824ace183a7348d24bc1589f (patch) | |
tree | 8eb8aeb9bd612669796e5c51afc35cdb46308f36 /tools/ProcStats.cpp | |
parent | d2a3522503ca0c39829f1bb41f01201d1affdaf6 (diff) |
Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.
BUG=skia:
R=halcanary@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/483323002
Diffstat (limited to 'tools/ProcStats.cpp')
-rw-r--r-- | tools/ProcStats.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp index 94660394f8..eaa1379301 100644 --- a/tools/ProcStats.cpp +++ b/tools/ProcStats.cpp @@ -12,19 +12,19 @@ defined(SK_BUILD_FOR_ANDROID) #include <sys/resource.h> - int sk_tools::getMaxResidentSetSizeKB() { + int sk_tools::getMaxResidentSetSizeMB() { struct rusage ru; getrusage(RUSAGE_SELF, &ru); #if defined(SK_BUILD_FOR_MAC) - return static_cast<int>(ru.ru_maxrss / 1024); // Darwin reports bytes. + return static_cast<int>(ru.ru_maxrss / 1024 / 1024); // Darwin reports bytes. #else - return static_cast<int>(ru.ru_maxrss); // Linux reports kilobytes. + return static_cast<int>(ru.ru_maxrss / 1024); // Linux reports kilobytes. #endif } #else - int sk_tools::getMaxResidentSetSizeKB() { + int sk_tools::getMaxResidentSetSizeMB() { return -1; } |