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

Unified Diff: base/process/process_metrics.h

Issue 1384363002: [NOT TO COMMIT YET] Using proc/pid/status file contents to get process metrics in linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@smaps_fscan
Patch Set: Renames and fixes. Created 5 years, 2 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
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | base/process/process_metrics_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics.h
diff --git a/base/process/process_metrics.h b/base/process/process_metrics.h
index 54b10aaacfa2f5cfb0ab3ffc702fbc226435c325..f637a05f4f0fdf5ce58e8c189322d7cbba7093ce 100644
--- a/base/process/process_metrics.h
+++ b/base/process/process_metrics.h
@@ -144,6 +144,13 @@ class BASE_EXPORT ProcessMetrics {
// function is somewhat expensive on Windows (a few ms per process).
bool GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const;
+#if defined(OS_LINUX) || defined(OS_ANDROID)
+ // Returns the current and the peak resident set size on passing a file
+ // descriptor to "proc/<pid>/status" file:
+ size_t GetWorkingSetSize(int proc_status_fd) const;
+ size_t GetPeakWorkingSetSize(int proc_status_fd) const;
+#endif
+
#if defined(OS_MACOSX)
// Fills both CommitedKBytes and WorkingSetKBytes in a single operation. This
// is more efficient on Mac OS X, as the two can be retrieved with a single
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | base/process/process_metrics_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698