Bug 862501 - Make baseline pass more accurate stack-pointer refeference for pushed SPS profiler frames. r=jandem
☠☠ backed out by fce173d8800d ☠ ☠
authorKannan Vijayan <kvijayan@mozilla.com>
Thu, 18 Apr 2013 12:20:45 -0400
changeset 129218 36ffb85842acb54d5e2544f6eb458b6aaa10981f
parent 129217 ba928cbd5191cd1046e21323a4761156775569f2
child 129219 d061ec6e84511e6fdd0fc467b577765a0a6f9afe
push id24562
push userryanvm@gmail.com
push dateFri, 19 Apr 2013 01:24:04 +0000
treeherdermozilla-central@f8d27fe5d7c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs862501
milestone23.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 862501 - Make baseline pass more accurate stack-pointer refeference for pushed SPS profiler frames. r=jandem
js/src/ion/BaselineIC.cpp
js/src/ion/IonMacroAssembler.h
--- a/js/src/ion/BaselineIC.cpp
+++ b/js/src/ion/BaselineIC.cpp
@@ -1011,16 +1011,17 @@ ICProfiler_PushFunction::Compiler::gener
     masm.breakpoint();
     masm.bind(&spsEnabled);
 #endif
 
     // Push SPS entry.
     masm.spsPushFrame(&cx->runtime->spsProfiler,
                       Address(BaselineStubReg, ICProfiler_PushFunction::offsetOfStr()),
                       Address(BaselineStubReg, ICProfiler_PushFunction::offsetOfScript()),
+                      BaselineFrameReg,
                       scratch,
                       scratch2);
 
     // Mark frame as having profiler entry pushed.
     Address flagsOffset(BaselineFrameReg, BaselineFrame::reverseOffsetOfFlags());
     masm.or32(Imm32(BaselineFrame::HAS_PUSHED_SPS_FRAME), flagsOffset);
 
     EmitReturnFromIC(masm);
--- a/js/src/ion/IonMacroAssembler.h
+++ b/js/src/ion/IonMacroAssembler.h
@@ -774,28 +774,28 @@ class MacroAssembler : public MacroAssem
 
         /* Always increment the stack size, whether or not we actually pushed. */
         bind(&stackFull);
         movePtr(ImmWord(p->sizePointer()), temp);
         add32(Imm32(1), Address(temp, 0));
     }
 
     void spsPushFrame(SPSProfiler *p, const Address &str, const Address &script,
-                      Register temp, Register temp2)
+                      Register framePtr, Register temp, Register temp2)
     {
         Label stackFull;
         spsProfileEntryAddress(p, 0, temp, &stackFull);
 
         loadPtr(str, temp2);
         storePtr(temp2, Address(temp, ProfileEntry::offsetOfString()));
 
         loadPtr(script, temp2);
         storePtr(temp2, Address(temp, ProfileEntry::offsetOfScript()));
 
-        storePtr(ImmWord((void*) 0), Address(temp, ProfileEntry::offsetOfStackAddress()));
+        storePtr(framePtr, Address(temp, ProfileEntry::offsetOfStackAddress()));
 
         // Store 0 for PCIdx because that's what interpreter does.
         // (See Probes::enterScript, which calls spsProfiler.enter, which pushes an entry
         //  with 0 pcIdx).
         store32(Imm32(0), Address(temp, ProfileEntry::offsetOfPCIdx()));
 
         /* Always increment the stack size, whether or not we actually pushed. */
         bind(&stackFull);