summaryrefslogtreecommitdiffstats
path: root/courgette
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 12:11:11 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 12:11:11 +0000
commita77fa2dc9cb9a10a31688a1bb24a9101194d51af (patch)
tree9be37414818cd5be282ec26ee0d0f9b8c186ea29 /courgette
parent055d7f268366be957e83bff0dfb2a7f5fcf3f3a7 (diff)
downloadchromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.zip
chromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.tar.gz
chromium_src-a77fa2dc9cb9a10a31688a1bb24a9101194d51af.tar.bz2
base: Get rid of 'using' declaration of StringAppendF.
Update the callers to append base:: in the calls to StringAppendF. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4974001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rw-r--r--courgette/adjustment_method.cc6
-rw-r--r--courgette/adjustment_method_2.cc41
-rw-r--r--courgette/memory_monitor.cc10
3 files changed, 29 insertions, 28 deletions
diff --git a/courgette/adjustment_method.cc b/courgette/adjustment_method.cc
index 435e44a..eabb684 100644
--- a/courgette/adjustment_method.cc
+++ b/courgette/adjustment_method.cc
@@ -81,11 +81,11 @@ struct OrderLabelInfoByAddressAscending {
static std::string ToString(LabelInfo* info) {
std::string s;
- StringAppendF(&s, "%c%d", "pm"[info->is_model_], info->debug_index_);
+ base::StringAppendF(&s, "%c%d", "pm"[info->is_model_], info->debug_index_);
if (info->label_->index_ != Label::kNoIndex)
- StringAppendF(&s, " (%d)", info->label_->index_);
+ base::StringAppendF(&s, " (%d)", info->label_->index_);
- StringAppendF(&s, " #%u", info->refs_);
+ base::StringAppendF(&s, " #%u", info->refs_);
return s;
}
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index cdc5b97..b487320 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -202,11 +202,11 @@ typedef std::vector<LabelInfo*> Trace;
std::string ToString(const LabelInfo* info) {
std::string s;
- StringAppendF(&s, "%c%d", "pm"[info->is_model_], info->debug_index_);
+ base::StringAppendF(&s, "%c%d", "pm"[info->is_model_], info->debug_index_);
if (info->label_->index_ != Label::kNoIndex)
- StringAppendF(&s, " (%d)", info->label_->index_);
+ base::StringAppendF(&s, " (%d)", info->label_->index_);
- StringAppendF(&s, " #%u", info->refs_);
+ base::StringAppendF(&s, " #%u", info->refs_);
return s;
}
@@ -431,13 +431,14 @@ std::string ToString(const Shingle* instance) {
std::string s;
const char* sep = "<";
for (size_t i = 0; i < Shingle::kWidth; ++i) {
- // StringAppendF(&s, "%s%x ", sep, instance.at(i)->label_->rva_);
+ // base::StringAppendF(&s, "%s%x ", sep, instance.at(i)->label_->rva_);
s += sep;
s += ToString(instance->at(i));
sep = ", ";
}
- StringAppendF(&s, ">(%" PRIuS ")@{%" PRIuS "}", instance->exemplar_position_,
- instance->position_count());
+ base::StringAppendF(&s, ">(%" PRIuS ")@{%" PRIuS "}",
+ instance->exemplar_position_,
+ instance->position_count());
return s;
}
@@ -523,7 +524,7 @@ std::string ToString(const ShinglePattern::Index* index) {
if (index == NULL) {
s = "<null>";
} else {
- StringAppendF(&s, "<%d: ", index->variables_);
+ base::StringAppendF(&s, "<%d: ", index->variables_);
const char* sep = "";
for (size_t i = 0; i < Shingle::kWidth; ++i) {
s += sep;
@@ -531,11 +532,11 @@ std::string ToString(const ShinglePattern::Index* index) {
uint32 kind = index->kinds_[i];
int offset = kind & ShinglePattern::kOffsetMask;
if (kind & ShinglePattern::kVariable)
- StringAppendF(&s, "V%d", offset);
+ base::StringAppendF(&s, "V%d", offset);
else
- StringAppendF(&s, "%d", index->assigned_indexes_[offset]);
+ base::StringAppendF(&s, "%d", index->assigned_indexes_[offset]);
}
- StringAppendF(&s, " %x", index->hash_);
+ base::StringAppendF(&s, " %x", index->hash_);
s += ">";
}
return s;
@@ -553,7 +554,7 @@ std::string HistogramToString(const ShinglePattern::Histogram& histogram,
s += " ...";
break;
}
- StringAppendF(&s, " %" PRIuS, p->count());
+ base::StringAppendF(&s, " %" PRIuS, p->count());
}
return s;
}
@@ -573,7 +574,7 @@ std::string HistogramToStringFull(const ShinglePattern::Histogram& histogram,
s += "...\n";
break;
}
- StringAppendF(&s, "(%" PRIuS ") ", p->count());
+ base::StringAppendF(&s, "(%" PRIuS ") ", p->count());
s += ToString(&(*p->instance()));
s += "\n";
}
@@ -587,14 +588,14 @@ std::string ToString(const ShinglePattern* pattern, size_t snippet_max = 3) {
} else {
s = "{";
s += ToString(pattern->index_);
- StringAppendF(&s, "; %d(%d):",
- static_cast<int>(pattern->model_histogram_.size()),
- pattern->model_coverage_);
+ base::StringAppendF(&s, "; %d(%d):",
+ static_cast<int>(pattern->model_histogram_.size()),
+ pattern->model_coverage_);
s += HistogramToString(pattern->model_histogram_, snippet_max);
- StringAppendF(&s, "; %d(%d):",
- static_cast<int>(pattern->program_histogram_.size()),
- pattern->program_coverage_);
+ base::StringAppendF(&s, "; %d(%d):",
+ static_cast<int>(pattern->program_histogram_.size()),
+ pattern->program_coverage_);
s += HistogramToString(pattern->program_histogram_, snippet_max);
s += "}";
}
@@ -608,9 +609,9 @@ std::string ShinglePatternToStringFull(const ShinglePattern* pattern,
s += "\n";
size_t model_size = pattern->model_histogram_.size();
size_t program_size = pattern->program_histogram_.size();
- StringAppendF(&s, " model shingles %" PRIuS "\n", model_size);
+ base::StringAppendF(&s, " model shingles %" PRIuS "\n", model_size);
s += HistogramToStringFull(pattern->model_histogram_, " ", max);
- StringAppendF(&s, " program shingles %" PRIuS "\n", program_size);
+ base::StringAppendF(&s, " program shingles %" PRIuS "\n", program_size);
s += HistogramToStringFull(pattern->program_histogram_, " ", max);
return s;
}
diff --git a/courgette/memory_monitor.cc b/courgette/memory_monitor.cc
index 26ce81f..dba8a88 100644
--- a/courgette/memory_monitor.cc
+++ b/courgette/memory_monitor.cc
@@ -47,8 +47,8 @@ struct H {
}
if (!print) return;
std::string o;
- StringAppendF(&o, "%u:", tick_ + d_tick_);
- StringAppendF(&o, " (%c%s)", sign, fmt(w).c_str());
+ base::StringAppendF(&o, "%u:", tick_ + d_tick_);
+ base::StringAppendF(&o, " (%c%s)", sign, fmt(w).c_str());
size_t sum = 0;
for (M::iterator p = c_.begin(); p != c_.end(); ++p) {
size_t s = p->first;
@@ -56,13 +56,13 @@ struct H {
if (n) {
if (s*n >= 64*1024)
if (n == 1)
- StringAppendF(&o, " %s", fmt(s).c_str());
+ base::StringAppendF(&o, " %s", fmt(s).c_str());
else
- StringAppendF(&o, " %s*%u", fmt(s).c_str(), n);
+ base::StringAppendF(&o, " %s*%u", fmt(s).c_str(), n);
sum += s*n;
}
}
- StringAppendF(&o, " = %s", fmt(sum).c_str());
+ base::StringAppendF(&o, " = %s", fmt(sum).c_str());
LOG(INFO) << o;
//printf("%s\n", o.c_str());
if (sum > 200*1024*1024) {