Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: tools/ProcStats.cpp

Issue 483323002: Print max RSS in GM and nanobench too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/ProcStats.cpp
diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp
index 94660394f8997143edb5e1daf74882291d6c013a..eaa1379301833cb28e218345e7d6d31c95863bb8 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;
}
« bench/nanobench.cpp ('K') | « tools/ProcStats.h ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698