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

Side by Side Diff: tools/ProcStats.cpp

Issue 448243003: Revert of Process Statistics header, add max RSS to render_pdfs (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 unified diff | Download patch
« no previous file with comments | « tools/ProcStats.h ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "ProcStats.h"
9
10 #if defined(SK_BUILD_FOR_UNIX) || \
11 defined(SK_BUILD_FOR_MAC) || \
12 defined(SK_BUILD_FOR_ANDROID)
13
14 #include <sys/resource.h>
15 int sk_tools::getMaxResidentSetSizeKB() {
16 struct rusage ru;
17 getrusage(RUSAGE_SELF, &ru);
18 #if defined(SK_BUILD_FOR_MAC)
19 return static_cast<int>(ru.ru_maxrss / 1024); // Darwin reports bytes.
20 #else
21 return static_cast<int>(ru.ru_maxrss); // Linux reports kilobytes.
22 #endif
23 }
24
25 #else
26
27 int sk_tools::getMaxResidentSetSizeKB() {
28 return -1;
29 }
30
31 #endif
OLDNEW
« no previous file with comments | « tools/ProcStats.h ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698