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

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

Issue 19064002: Split ProcessHandle and its related routines into base/process/process_handle.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 7 years, 5 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 | « base/process/process_handle_win.cc ('k') | base/process/process_metrics_ios.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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Gem data will be -1 if not supported. 230 // Gem data will be -1 if not supported.
231 int gem_objects; 231 int gem_objects;
232 long long gem_size; 232 long long gem_size;
233 }; 233 };
234 // Retrieves data from /proc/meminfo about system-wide memory consumption. 234 // Retrieves data from /proc/meminfo about system-wide memory consumption.
235 // Fills in the provided |meminfo| structure. Returns true on success. 235 // Fills in the provided |meminfo| structure. Returns true on success.
236 // Exposed for memory debugging widget. 236 // Exposed for memory debugging widget.
237 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo); 237 BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
238 #endif // defined(OS_LINUX) || defined(OS_ANDROID) 238 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
239 239
240 #if defined(OS_LINUX) || defined(OS_ANDROID)
241 // Get the number of threads of |process| as available in /proc/<pid>/stat.
242 // This should be used with care as no synchronization with running threads is
243 // done. This is mostly useful to guarantee being single-threaded.
244 // Returns 0 on failure.
245 BASE_EXPORT int GetNumberOfThreads(ProcessHandle process);
246
247 // /proc/self/exe refers to the current executable.
248 BASE_EXPORT extern const char kProcSelfExe[];
249 #endif // defined(OS_LINUX) || defined(OS_ANDROID)
250
251 #if defined(OS_POSIX)
252 // Returns the maximum number of file descriptors that can be open by a process
253 // at once. If the number is unavailable, a conservative best guess is returned.
254 size_t GetMaxFds();
255 #endif // defined(OS_POSIX)
256
240 } // namespace base 257 } // namespace base
241 258
242 #endif // BASE_PROCESS_PROCESS_METRICS_H_ 259 #endif // BASE_PROCESS_PROCESS_METRICS_H_
OLDNEW
« no previous file with comments | « base/process/process_handle_win.cc ('k') | base/process/process_metrics_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698