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

Unified Diff: base/process_util_win.cc

Issue 10656052: Performance monitor stats gathering. (Closed) Base URL: http://git.chromium.org/chromium/src.git@cpm_main
Patch Set: Nits Created 8 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
Index: base/process_util_win.cc
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index 55d2959c10813a6297e5b9e73418eb85e6d42389..c0a1e37b229ef4ff2a25bd7c9074c42b5ec178b5 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -731,8 +731,10 @@ bool ProcessMetrics::GetMemoryBytes(size_t* private_bytes,
if (shared_bytes) {
WorkingSetKBytes ws_usage;
- if (!GetWorkingSetKBytes(&ws_usage))
+ if (!GetWorkingSetKBytes(&ws_usage)) {
+ LOG(ERROR) << "GetMemoryBytes return false";
Devlin 2012/07/24 15:30:48 Debug statements generally don't go in CL's.
mitchellwrosen 2012/07/27 19:24:51 I know. It was an accident =P
return false;
+ }
*shared_bytes = ws_usage.shared * 1024;
}
@@ -798,6 +800,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
realloc(buffer, buffer_size));
if (!new_buffer) {
free(buffer);
+ LOG(ERROR) << "GetWorkingSetKBytes returning false 1";
return false;
}
buffer = new_buffer;
@@ -808,6 +811,8 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
if (GetLastError() != ERROR_BAD_LENGTH) {
free(buffer);
+ LOG(ERROR) << "GetWorkingSetKBytes: GetLastError() == " << GetLastError();
+ LOG(ERROR) << "GetWorkingSetKBytes returning false 2";
return false;
}
@@ -819,6 +824,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
if (--retries == 0) {
free(buffer); // If we're looping, eventually fail.
+ LOG(ERROR) << "GetWorkingSetKBytes returning false 3";
return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698