aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-08-07 13:27:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-07 13:27:18 -0700
commit619e07656dc51bc252324dbf2579125c5b488b01 (patch)
tree9407b420da65d14d6bebed72d1258130bcd50eb7 /tools
parent6274baae7fe82ce6481da367687aa6168356e1e1 (diff)
Revert of Process Statistics header, add max RSS to render_pdfs (https://codereview.chromium.org/448993003/)
Reason for revert: Reverting due to breaking iOS bots. Original issue's description: > Process Statistics header, add max RSS to render_pdfs > > Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1 R=mtklein@google.com, halcanary@google.com TBR=halcanary@google.com, mtklein@google.com NOTREECHECKS=true NOTRY=true Author: bungeman@google.com Review URL: https://codereview.chromium.org/448243003
Diffstat (limited to 'tools')
-rw-r--r--tools/ProcStats.cpp31
-rw-r--r--tools/ProcStats.h25
-rw-r--r--tools/render_pdfs_main.cpp10
3 files changed, 1 insertions, 65 deletions
diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp
deleted file mode 100644
index 94660394f8..0000000000
--- a/tools/ProcStats.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "ProcStats.h"
-
-#if defined(SK_BUILD_FOR_UNIX) || \
- defined(SK_BUILD_FOR_MAC) || \
- defined(SK_BUILD_FOR_ANDROID)
-
- #include <sys/resource.h>
- int sk_tools::getMaxResidentSetSizeKB() {
- struct rusage ru;
- getrusage(RUSAGE_SELF, &ru);
- #if defined(SK_BUILD_FOR_MAC)
- return static_cast<int>(ru.ru_maxrss / 1024); // Darwin reports bytes.
- #else
- return static_cast<int>(ru.ru_maxrss); // Linux reports kilobytes.
- #endif
- }
-
-#else
-
- int sk_tools::getMaxResidentSetSizeKB() {
- return -1;
- }
-
-#endif
diff --git a/tools/ProcStats.h b/tools/ProcStats.h
deleted file mode 100644
index 42849f1401..0000000000
--- a/tools/ProcStats.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef ProcStats_DEFINED
-#define ProcStats_DEFINED
-
-/**
- * ProcStats - Process Statistics Functions
- */
-
-namespace sk_tools {
-
-/**
- * If not implemented for this OS, returns -1. Otherwise, return
- * the maximum resident set size, as reported by getrusage().
- */
-int getMaxResidentSetSizeKB();
-
-} // namespace sk_tools
-
-#endif // ProcStats_DEFINED
diff --git a/tools/render_pdfs_main.cpp b/tools/render_pdfs_main.cpp
index 34e5e58f53..be294399ec 100644
--- a/tools/render_pdfs_main.cpp
+++ b/tools/render_pdfs_main.cpp
@@ -18,7 +18,6 @@
#include "SkTArray.h"
#include "SkTSort.h"
#include "PdfRenderer.h"
-#include "ProcStats.h"
#include "picture_utils.h"
__SK_FORCE_IMAGE_DECODER_LINKING;
@@ -220,9 +219,7 @@ static int process_input(
}
}
}
- if (files.count() > 0) {
- SkTQSort<SkString>(files.begin(), files.end() - 1);
- }
+ SkTQSort<SkString>(files.begin(), files.end() - 1);
int failures = 0;
for (int i = 0; i < files.count(); i ++) {
if (!render_pdf(files[i], outputDir, renderer)) {
@@ -249,11 +246,6 @@ int tool_main_core(int argc, char** argv) {
int failures = process_input(FLAGS_inputPaths, outputDir, *renderer);
- int max_rss_kb = sk_tools::getMaxResidentSetSizeKB();
- if (max_rss_kb >= 0) {
- SkDebugf("%4dM peak ResidentSetSize\n", max_rss_kb / 1024);
- }
-
if (failures != 0) {
SkDebugf("Failed to render %i PDFs.\n", failures);
return 1;