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

Unified Diff: base/process_util_mac.mm

Issue 8368009: Replace most LOG statements with DLOG statements in base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_util_linux.cc ('k') | base/process_util_openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_mac.mm
===================================================================
--- base/process_util_mac.mm (revision 106858)
+++ base/process_util_mac.mm (working copy)
@@ -75,7 +75,7 @@
// Get the size of the buffer
size_t len = 0;
if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) < 0) {
- LOG(ERROR) << "failed to get the size needed for the process list";
+ DLOG(ERROR) << "failed to get the size needed for the process list";
kinfo_procs_.resize(0);
done = true;
} else {
@@ -90,7 +90,7 @@
// If we get a mem error, it just means we need a bigger buffer, so
// loop around again. Anything else is a real error and give up.
if (errno != ENOMEM) {
- LOG(ERROR) << "failed to get the process list";
+ DLOG(ERROR) << "failed to get the process list";
kinfo_procs_.resize(0);
done = true;
}
@@ -104,7 +104,7 @@
} while (!done && (try_num++ < max_tries));
if (!done) {
- LOG(ERROR) << "failed to collect the process list in a few tries";
+ DLOG(ERROR) << "failed to collect the process list in a few tries";
kinfo_procs_.resize(0);
}
}
@@ -149,7 +149,7 @@
// to populate |entry_.exe_file_|.
size_t exec_name_end = data.find('\0');
if (exec_name_end == std::string::npos) {
- LOG(ERROR) << "command line data didn't match expected format";
+ DLOG(ERROR) << "command line data didn't match expected format";
continue;
}
@@ -248,7 +248,7 @@
NULL,
0);
if (result != 0) {
- PLOG(ERROR) << "sysctlbyname(""sysctl.proc_cputype"")";
+ DPLOG(ERROR) << "sysctlbyname(""sysctl.proc_cputype"")";
return false;
}
@@ -280,7 +280,7 @@
mach_port_t task = TaskForPid(process_);
if (task == MACH_PORT_NULL) {
- LOG(ERROR) << "Invalid process";
+ DLOG(ERROR) << "Invalid process";
return false;
}
@@ -319,7 +319,7 @@
// We're at the end of the address space.
break;
} else if (kr != KERN_SUCCESS) {
- LOG(ERROR) << "Calling mach_vm_region failed with error: "
+ DLOG(ERROR) << "Calling mach_vm_region failed with error: "
<< mach_error_string(kr);
return false;
}
@@ -354,7 +354,7 @@
vm_size_t page_size;
kr = host_page_size(task, &page_size);
if (kr != KERN_SUCCESS) {
- LOG(ERROR) << "Failed to fetch host page size, error: "
+ DLOG(ERROR) << "Failed to fetch host page size, error: "
<< mach_error_string(kr);
return false;
}
@@ -472,14 +472,14 @@
reinterpret_cast<host_info_t>(&data),
&count);
if (kr) {
- LOG(WARNING) << "Failed to fetch host statistics.";
+ DLOG(WARNING) << "Failed to fetch host statistics.";
return 0;
}
vm_size_t page_size;
kr = host_page_size(host, &page_size);
if (kr) {
- LOG(ERROR) << "Failed to fetch host page size.";
+ DLOG(ERROR) << "Failed to fetch host page size.";
return 0;
}
@@ -497,7 +497,7 @@
if (dladdr(addr, &info))
return info.dli_fname;
- LOG(WARNING) << "Could not find image path for malloc()";
+ DLOG(WARNING) << "Could not find image path for malloc()";
return NULL;
}
@@ -545,7 +545,7 @@
void CrMallocErrorBreak() {
g_original_malloc_error_break();
- LOG(ERROR) <<
+ DLOG(ERROR) <<
"Terminating process due to a potential for future heap corruption";
int* death_ptr = NULL;
*death_ptr = 0xf00bad;
@@ -556,7 +556,7 @@
void EnableTerminationOnHeapCorruption() {
malloc_error_break_t malloc_error_break = LookUpMallocErrorBreak();
if (!malloc_error_break) {
- LOG(WARNING) << "Could not find malloc_error_break";
+ DLOG(WARNING) << "Could not find malloc_error_break";
return;
}
@@ -566,7 +566,7 @@
(void**)&g_original_malloc_error_break);
if (err != err_none)
- LOG(WARNING) << "Could not override malloc_error_break; error = " << err;
+ DLOG(WARNING) << "Could not override malloc_error_break; error = " << err;
}
// ------------------------------------------------------------------------
@@ -976,7 +976,7 @@
size_t length = sizeof(struct kinfo_proc);
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
if (sysctl(mib, 4, &info, &length, NULL, 0) < 0) {
- PLOG(ERROR) << "sysctl";
+ DPLOG(ERROR) << "sysctl";
return -1;
}
if (length == 0)
« no previous file with comments | « base/process_util_linux.cc ('k') | base/process_util_openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698