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

Unified Diff: base/process_util_linux.cc

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_linux.cc ('k') | base/process_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_linux.cc
===================================================================
--- base/process_util_linux.cc (revision 106858)
+++ base/process_util_linux.cc (working copy)
@@ -84,7 +84,7 @@
DIR* dir = opendir(path.value().c_str());
if (!dir) {
- PLOG(ERROR) << "opendir(" << path.value() << ")";
+ DPLOG(ERROR) << "opendir(" << path.value() << ")";
return -1;
}
@@ -273,7 +273,7 @@
size_t ProcessMetrics::GetPagefileUsage() const {
std::vector<std::string> proc_stats;
if (!GetProcStats(process_, &proc_stats))
- LOG(WARNING) << "Failed to get process stats.";
+ DLOG(WARNING) << "Failed to get process stats.";
const size_t kVmSize = 22;
if (proc_stats.size() > kVmSize) {
int vm_size;
@@ -287,7 +287,7 @@
size_t ProcessMetrics::GetPeakPagefileUsage() const {
std::vector<std::string> proc_stats;
if (!GetProcStats(process_, &proc_stats))
- LOG(WARNING) << "Failed to get process stats.";
+ DLOG(WARNING) << "Failed to get process stats.";
const size_t kVmPeak = 21;
if (proc_stats.size() > kVmPeak) {
int vm_peak;
@@ -301,7 +301,7 @@
size_t ProcessMetrics::GetWorkingSetSize() const {
std::vector<std::string> proc_stats;
if (!GetProcStats(process_, &proc_stats))
- LOG(WARNING) << "Failed to get process stats.";
+ DLOG(WARNING) << "Failed to get process stats.";
const size_t kVmRss = 23;
if (proc_stats.size() > kVmRss) {
int num_pages;
@@ -315,7 +315,7 @@
size_t ProcessMetrics::GetPeakWorkingSetSize() const {
std::vector<std::string> proc_stats;
if (!GetProcStats(process_, &proc_stats))
- LOG(WARNING) << "Failed to get process stats.";
+ DLOG(WARNING) << "Failed to get process stats.";
const size_t kVmHwm = 23;
if (proc_stats.size() > kVmHwm) {
int num_pages;
@@ -576,14 +576,14 @@
FilePath meminfo_file("/proc/meminfo");
std::string meminfo_data;
if (!file_util::ReadFileToString(meminfo_file, &meminfo_data)) {
- LOG(WARNING) << "Failed to open /proc/meminfo.";
+ DLOG(WARNING) << "Failed to open /proc/meminfo.";
return false;
}
std::vector<std::string> meminfo_fields;
SplitStringAlongWhitespace(meminfo_data, &meminfo_fields);
if (meminfo_fields.size() < kMemCachedIndex) {
- LOG(WARNING) << "Failed to parse /proc/meminfo. Only found " <<
+ DLOG(WARNING) << "Failed to parse /proc/meminfo. Only found " <<
meminfo_fields.size() << " fields.";
return false;
}
@@ -752,7 +752,8 @@
FilePath oom_file = oom_path.AppendASCII("oom_score_adj");
if (file_util::PathExists(oom_file)) {
std::string score_str = base::IntToString(score);
- VLOG(1) << "Adjusting oom_score_adj of " << process << " to " << score_str;
+ DVLOG(1) << "Adjusting oom_score_adj of " << process << " to "
+ << score_str;
int score_len = static_cast<int>(score_str.length());
return (score_len == file_util::WriteFile(oom_file,
score_str.c_str(),
@@ -765,7 +766,7 @@
if (file_util::PathExists(oom_file)) {
std::string score_str = base::IntToString(
score * kMaxOldOomScore / kMaxOomScore);
- VLOG(1) << "Adjusting oom_adj of " << process << " to " << score_str;
+ DVLOG(1) << "Adjusting oom_adj of " << process << " to " << score_str;
int score_len = static_cast<int>(score_str.length());
return (score_len == file_util::WriteFile(oom_file,
score_str.c_str(),
« no previous file with comments | « base/process_linux.cc ('k') | base/process_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698