| Index: base/process/process_metrics.h
|
| diff --git a/base/process/process_metrics.h b/base/process/process_metrics.h
|
| index 1562e7b156af082292b3c8a4753a4b26fb7ecfcd..687797eb9fb6c19e885ff49d414f48ec24ef1516 100644
|
| --- a/base/process/process_metrics.h
|
| +++ b/base/process/process_metrics.h
|
| @@ -195,7 +195,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;
|
| @@ -203,7 +203,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)
|
| @@ -212,7 +212,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
|
|
|
| @@ -220,7 +220,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
|
|
|
| @@ -237,7 +237,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_;
|
| @@ -279,7 +279,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.
|
| //
|
| @@ -312,7 +312,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
|
| @@ -326,7 +326,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;
|
| @@ -340,7 +340,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;
|
| @@ -368,7 +368,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.
|
|
|