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

Side by Side Diff: base/process/process_metrics.h

Issue 16116003: Revert 202639 "Use totmaps if available on chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Undo revert Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains routines for gathering resource statistics for processes 5 // This file contains routines for gathering resource statistics for processes
6 // running on the system. 6 // running on the system.
7 7
8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_ 8 #ifndef BASE_PROCESS_PROCESS_METRICS_H_
9 #define BASE_PROCESS_PROCESS_METRICS_H_ 9 #define BASE_PROCESS_PROCESS_METRICS_H_
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // otherwise. 163 // otherwise.
164 bool GetIOCounters(IoCounters* io_counters) const; 164 bool GetIOCounters(IoCounters* io_counters) const;
165 165
166 private: 166 private:
167 #if !defined(OS_MACOSX) || defined(OS_IOS) 167 #if !defined(OS_MACOSX) || defined(OS_IOS)
168 explicit ProcessMetrics(ProcessHandle process); 168 explicit ProcessMetrics(ProcessHandle process);
169 #else 169 #else
170 ProcessMetrics(ProcessHandle process, PortProvider* port_provider); 170 ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
171 #endif // !defined(OS_MACOSX) || defined(OS_IOS) 171 #endif // !defined(OS_MACOSX) || defined(OS_IOS)
172 172
173 #if defined(OS_LINUX)
174 bool GetWorkingSetKBytesStatm(WorkingSetKBytes* ws_usage) const;
175 #endif
176
177 #if defined(OS_CHROMEOS)
178 bool GetWorkingSetKBytesTotmaps(WorkingSetKBytes *ws_usage) const;
179 #endif
180
173 ProcessHandle process_; 181 ProcessHandle process_;
174 182
175 int processor_count_; 183 int processor_count_;
176 184
177 // Used to store the previous times and CPU usage counts so we can 185 // Used to store the previous times and CPU usage counts so we can
178 // compute the CPU usage between calls. 186 // compute the CPU usage between calls.
179 int64 last_time_; 187 int64 last_time_;
180 int64 last_system_time_; 188 int64 last_system_time_;
181 189
182 #if !defined(OS_IOS) 190 #if !defined(OS_IOS)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 }; 233 };
226 // Retrieves data from /proc/meminfo about system-wide memory consumption. 234 // Retrieves data from /proc/meminfo about system-wide memory consumption.
227 // Fills in the provided |meminfo| structure. Returns true on success. 235 // Fills in the provided |meminfo| structure. Returns true on success.
228 // Exposed for memory debugging widget. 236 // Exposed for memory debugging widget.
229 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); 237 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
230 #endif // defined(OS_LINUX) || defined(OS_ANDROID) 238 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
231 239
232 } // namespace base 240 } // namespace base
233 241
234 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 242 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698