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

Unified Diff: base/process/process_metrics.h

Issue 2807463004: GN: aix port along with linux_s390x, linux_ppc64 and linux_ppc64le support. (Closed)
Patch Set: removed the changes from //base/BUILD.gn Created 3 years, 8 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 | « base/process/process_linux.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »
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 6e5e796a7c825be5d390d0b79fdd9ac373d45ae0..9f1858c2b3369322876958d4825c3794789ddc63 100644
--- a/base/process/process_metrics.h
+++ b/base/process/process_metrics.h
@@ -205,7 +205,7 @@ class BASE_EXPORT ProcessMetrics {
// otherwise.
bool GetIOCounters(IoCounters* io_counters) const;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_AIX)
// Returns the number of file descriptors currently open by the process, or
// -1 on error.
int GetOpenFdCount() const;
@@ -213,7 +213,7 @@ class BASE_EXPORT ProcessMetrics {
// Returns the soft limit of file descriptors that can be opened by the
// process, or -1 on error.
int GetOpenFdSoftLimit() const;
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_AIX)
private:
#if !defined(OS_MACOSX) || defined(OS_IOS)
@@ -222,7 +222,7 @@ class BASE_EXPORT ProcessMetrics {
ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
#endif // !defined(OS_MACOSX) || defined(OS_IOS)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) | defined(OS_AIX)
bool GetWorkingSetKBytesStatm(WorkingSetKBytes* ws_usage) const;
#endif
@@ -230,7 +230,7 @@ class BASE_EXPORT ProcessMetrics {
bool GetWorkingSetKBytesTotmaps(WorkingSetKBytes *ws_usage) const;
#endif
-#if defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
#endif
@@ -247,7 +247,7 @@ class BASE_EXPORT ProcessMetrics {
TimeTicks last_cpu_time_;
int64_t last_system_time_;
-#if defined(OS_MACOSX) || defined(OS_LINUX)
+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
// Same thing for idle wakeups.
TimeTicks last_idle_wakeups_time_;
uint64_t last_absolute_idle_wakeups_;
@@ -289,7 +289,7 @@ BASE_EXPORT void SetFdLimit(unsigned int max_descriptors);
#endif // defined(OS_POSIX)
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
- defined(OS_ANDROID)
+ defined(OS_ANDROID) || defined(OS_AIX)
// Data about system-wide memory consumption. Values are in KB. Available on
// Windows, Mac, Linux, Android and Chrome OS.
//
@@ -322,7 +322,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
int avail_phys = 0;
#endif
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
// This provides an estimate of available memory as described here:
// https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
// NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always
@@ -336,7 +336,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
int swap_free = 0;
#endif
-#if defined(OS_ANDROID) || defined(OS_LINUX)
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX)
int buffers = 0;
int cached = 0;
int active_anon = 0;
@@ -350,7 +350,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
unsigned long pswpin = 0;
unsigned long pswpout = 0;
unsigned long pgmajfault = 0;
-#endif // defined(OS_ANDROID) || defined(OS_LINUX)
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX)
#if defined(OS_CHROMEOS)
int shmem = 0;
@@ -378,7 +378,7 @@ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
// defined(OS_ANDROID)
-#if defined(OS_LINUX) || defined(OS_ANDROID)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
// Parse the data found in /proc/<pid>/stat and return the sum of the
// CPU-related ticks. Returns -1 on parse error.
// Exposed for testing.
« no previous file with comments | « base/process/process_linux.cc ('k') | base/process/process_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698