Bug 1123237 - Part 5. Don't emit inline allocation when memory profiler enabled. r=terrence
authorKan-Ru Chen <kanru@kanru.info>
Fri, 08 May 2015 11:19:17 +0800
changeset 297037 99ea1dafe05f7cb5f1b7a39ce479eed269433510
parent 297036 86316ff02d2bf864340a4fc97b1c243b08a89677
child 297038 ec9d11f8bfa172c43409da56bbe9d6cddd13476d
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1123237
milestone43.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 1123237 - Part 5. Don't emit inline allocation when memory profiler enabled. r=terrence Based on patch from Ting-Yuan Huang <laszio.bugzilla@gmail.com>
js/src/jit/MacroAssembler.cpp
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -798,18 +798,19 @@ MacroAssembler::checkUnboxedArrayCapacit
     bind(&done);
 }
 
 // Inlined version of gc::CheckAllocatorState that checks the bare essentials
 // and bails for anything that cannot be handled with our jit allocators.
 void
 MacroAssembler::checkAllocatorState(Label* fail)
 {
-    // Don't execute the inline path if we are tracing allocations.
-    if (js::gc::TraceEnabled())
+    // Don't execute the inline path if we are tracing allocations,
+    // or when the memory profiler is enabled.
+    if (js::gc::TraceEnabled() || MemProfiler::enabled())
         jump(fail);
 
 # ifdef JS_GC_ZEAL
     // Don't execute the inline path if gc zeal or tracing are active.
     branch32(Assembler::NotEqual,
              AbsoluteAddress(GetJitContext()->runtime->addressOfGCZeal()), Imm32(0),
              fail);
 # endif