Bug 885103 - Do not display total compilation time when asm.js is successfully compiled, in a --enable-more-deterministic shell. r=luke
authorGary Kwong <gary@rumblingedge.com>
Wed, 19 Jun 2013 17:18:48 -0700
changeset 147225 661b48de7a7007c86b1b6d0befbc85ef4e1e6d7e
parent 147224 833ca9a17792d78e8f57dae5cc8e36d0042bb132
child 147226 0bd279c73d1fc81e148e44ff134400095ea47ade
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs885103
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 885103 - Do not display total compilation time when asm.js is successfully compiled, in a --enable-more-deterministic shell. r=luke
js/src/ion/AsmJS.cpp
--- a/js/src/ion/AsmJS.cpp
+++ b/js/src/ion/AsmJS.cpp
@@ -1481,35 +1481,38 @@ class MOZ_STACK_CLASS ModuleCompiler
         JS_ASSERT(currentPass_ == 3);
 #if defined(JS_CPU_ARM)
         masm_.flush();
 #endif
         module_->exportedFunction(exportIndex).initCodeOffset(masm_.size());
     }
 
     void buildCompilationTimeReport(ScopedJSFreePtr<char> *out) {
+        int msTotal = 0;
+        ScopedJSFreePtr<char> slowFuns;
+#ifndef JS_MORE_DETERMINISTIC
         int64_t usecAfter = PRMJ_Now();
-        int msTotal = (usecAfter - usecBefore_) / PRMJ_USEC_PER_MSEC;
-        ScopedJSFreePtr<char> slowFuns;
+        msTotal = (usecAfter - usecBefore_) / PRMJ_USEC_PER_MSEC;
         if (!slowFunctions_.empty()) {
             slowFuns.reset(JS_smprintf("; %d functions compiled slowly: ", slowFunctions_.length()));
             if (!slowFuns)
                 return;
             for (unsigned i = 0; i < slowFunctions_.length(); i++) {
                 SlowFunction &func = slowFunctions_[i];
                 JSAutoByteString name;
                 if (!js_AtomToPrintableString(cx_, func.name, &name))
                     return;
                 slowFuns.reset(JS_smprintf("%s%s:%u:%u (%ums)%s", slowFuns.get(),
                                            name.ptr(), func.line, func.column, func.ms,
                                            i+1 < slowFunctions_.length() ? ", " : ""));
                 if (!slowFuns)
                     return;
             }
         }
+#endif
         out->reset(JS_smprintf("total compilation time %dms%s",
                                msTotal, slowFuns ? slowFuns.get() : ""));
     }
 
     bool finish(ScopedJSDeletePtr<AsmJSModule> *module) {
         // After finishing, the only valid operation on an ModuleCompiler is
         // destruction.
         JS_ASSERT(currentPass_ == 3);