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

Unified Diff: base/process/process_metrics_linux.cc

Issue 129353002: Parse /proc/<pid>/stats fields as int64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 046181fb Initial. Created 6 years, 11 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_iterator_linux.cc ('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 afa88486a0ba96c9fd613c7abe40e3f021d69fa1..647499099dc939789470dbd8a36beb0f46dce0f8 100644
--- a/base/process/process_metrics_linux.cc
+++ b/base/process/process_metrics_linux.cc
@@ -391,16 +391,16 @@ int ParseProcStatCPU(const std::string& input) {
if (proc_stats.size() <= internal::VM_STIME)
return -1;
- int utime = GetProcStatsFieldAsInt(proc_stats, internal::VM_UTIME);
- int stime = GetProcStatsFieldAsInt(proc_stats, internal::VM_STIME);
+ int utime = GetProcStatsFieldAsInt64(proc_stats, internal::VM_UTIME);
+ int stime = GetProcStatsFieldAsInt64(proc_stats, internal::VM_STIME);
return utime + stime;
}
const char kProcSelfExe[] = "/proc/self/exe";
int GetNumberOfThreads(ProcessHandle process) {
- return internal::ReadProcStatsAndGetFieldAsInt(process,
- internal::VM_NUMTHREADS);
+ return internal::ReadProcStatsAndGetFieldAsInt64(process,
+ internal::VM_NUMTHREADS);
}
namespace {
« no previous file with comments | « base/process/process_iterator_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698