Index: base/process/process_metrics_linux.cc |
diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc |
index b14aa210bd57af5bd53c6581590fa221f355d9bb..1513f71f2536e073d02c4493e67d607f783b784c 100644 |
--- a/base/process/process_metrics_linux.cc |
+++ b/base/process/process_metrics_linux.cc |
@@ -535,9 +535,7 @@ const size_t kDiskWeightedIOTime = 13; |
SystemMemoryInfoKB::SystemMemoryInfoKB() { |
total = 0; |
free = 0; |
-#if defined(OS_LINUX) |
available = 0; |
-#endif |
buffers = 0; |
cached = 0; |
active_anon = 0; |
@@ -547,6 +545,7 @@ SystemMemoryInfoKB::SystemMemoryInfoKB() { |
swap_total = 0; |
swap_free = 0; |
dirty = 0; |
+ reclaimable = 0; |
pswpin = 0; |
pswpout = 0; |
@@ -568,9 +567,7 @@ std::unique_ptr<Value> SystemMemoryInfoKB::ToValue() const { |
res->SetInteger("total", total); |
res->SetInteger("free", free); |
-#if defined(OS_LINUX) |
res->SetInteger("available", available); |
-#endif |
res->SetInteger("buffers", buffers); |
res->SetInteger("cached", cached); |
res->SetInteger("active_anon", active_anon); |
@@ -581,6 +578,7 @@ std::unique_ptr<Value> SystemMemoryInfoKB::ToValue() const { |
res->SetInteger("swap_free", swap_free); |
res->SetInteger("swap_used", swap_total - swap_free); |
res->SetInteger("dirty", dirty); |
+ res->SetInteger("reclaimable", reclaimable); |
res->SetInteger("pswpin", pswpin); |
res->SetInteger("pswpout", pswpout); |
res->SetInteger("pgmajfault", pgmajfault); |
@@ -628,10 +626,8 @@ bool ParseProcMeminfo(const std::string& meminfo_data, |
target = &meminfo->total; |
else if (tokens[0] == "MemFree:") |
target = &meminfo->free; |
-#if defined(OS_LINUX) |
else if (tokens[0] == "MemAvailable:") |
target = &meminfo->available; |
-#endif |
else if (tokens[0] == "Buffers:") |
target = &meminfo->buffers; |
else if (tokens[0] == "Cached:") |
@@ -650,6 +646,8 @@ bool ParseProcMeminfo(const std::string& meminfo_data, |
target = &meminfo->swap_free; |
else if (tokens[0] == "Dirty:") |
target = &meminfo->dirty; |
+ else if (tokens[0] == "SReclaimable:") |
+ target = &meminfo->reclaimable; |
#if defined(OS_CHROMEOS) |
// Chrome OS has a tweaked kernel that allows us to query Shmem, which is |
// usually video memory otherwise invisible to the OS. |