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

Unified Diff: src/IceTimerTree.cpp

Issue 686913005: Turn off dump/emit routines when building minimal subzero. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 6 years, 1 month 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: src/IceTimerTree.cpp
diff --git a/src/IceTimerTree.cpp b/src/IceTimerTree.cpp
index 1fb098d69537be48709c252da0d3f97956cea3d4..cc25baf86a62cc8508f18ce8e6636167cbb504d7 100644
--- a/src/IceTimerTree.cpp
+++ b/src/IceTimerTree.cpp
@@ -127,6 +127,8 @@ typedef std::multimap<double, IceString> DumpMapType;
// Dump the Map items in reverse order of their time contribution.
void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) {
+ if (!ALLOW_DUMP)
+ return;
// TODO(stichnot): Use llvm::make_range with LLVM 3.5.
for (auto I = Map.rbegin(), E = Map.rend(); I != E; ++I) {
char buf[80];
@@ -142,6 +144,8 @@ void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) {
// MaxVal=5 ==> "[%1lu] "
// MaxVal=9876 ==> "[%4lu] "
void makePrintfFormatString(char *Buf, size_t BufLen, size_t MaxVal) {
+ if (!ALLOW_DUMP)
+ return;
int NumDigits = 0;
do {
++NumDigits;
@@ -153,6 +157,8 @@ void makePrintfFormatString(char *Buf, size_t BufLen, size_t MaxVal) {
} // end of anonymous namespace
void TimerStack::dump(Ostream &Str, bool DumpCumulative) {
+ if (!ALLOW_DUMP)
+ return;
const bool UpdateCounts = true;
update(UpdateCounts);
double TotalTime = LastTimestamp - FirstTimestamp;

Powered by Google App Engine
This is Rietveld 408576698