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

Unified Diff: base/process/process_metrics_linux.cc

Issue 2188043003: Linux: Increase storage size of vmstat data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_metrics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_metrics_linux.cc
diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc
index 89a26090da720ba41c9b8b2ba2e393580fc0c620..f1bfff6ea93182adb558831a8273c256e9f254c0 100644
--- a/base/process/process_metrics_linux.cc
+++ b/base/process/process_metrics_linux.cc
@@ -676,12 +676,16 @@ bool ParseProcVmstat(const std::string& vmstat_data,
if (tokens.size() != 2)
continue;
+ uint64_t val;
+ if (!StringToUint64(tokens[1], &val))
+ continue;
+
if (tokens[0] == "pswpin") {
- StringToInt(tokens[1], &meminfo->pswpin);
+ meminfo->pswpin = val;
Lei Zhang 2016/07/28 18:38:05 Can we just make pswpin and friends uint64_t? Aren
} else if (tokens[0] == "pswpout") {
- StringToInt(tokens[1], &meminfo->pswpout);
+ meminfo->pswpout = val;
} else if (tokens[0] == "pgmajfault") {
- StringToInt(tokens[1], &meminfo->pgmajfault);
+ meminfo->pgmajfault = val;
}
}
« no previous file with comments | « base/process/process_metrics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698