| Index: base/process/process_metrics_linux.cc
|
| diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc
|
| index ba0dfa76b96f921e32df3ac97e1f54b44f25046f..3617710fa290fc0a5e4abe26e1a868957f15af6d 100644
|
| --- a/base/process/process_metrics_linux.cc
|
| +++ b/base/process/process_metrics_linux.cc
|
| @@ -294,6 +294,20 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
|
| }
|
|
|
| #if defined(OS_LINUX)
|
| +
|
| +uint64_t ProcessMetrics::GetVmSwapBytes() const {
|
| + return ReadProcStatusAndGetFieldAsSizeT(process_, "VmSwap") * 1024;
|
| +}
|
| +
|
| +uint64_t ProcessMetrics::GetRssAnonBytes() const {
|
| + size_t private_bytes;
|
| + size_t shared_bytes;
|
| + bool ret = GetMemoryBytes(&private_bytes, &shared_bytes);
|
| + if (!ret)
|
| + return 0;
|
| + return private_bytes;
|
| +}
|
| +
|
| int ProcessMetrics::GetOpenFdCount() const {
|
| // Use /proc/<pid>/fd to count the number of entries there.
|
| FilePath fd_path = internal::GetProcPidDir(process_).Append("fd");
|
|
|