Bug 1480706 - Enable Frame-pointer chasing on x86. r=sewardj
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 07 Aug 2018 18:50:10 +0900
changeset 430598 946dc9d537c0ff61aece248c5139ae6d16168582
parent 430597 3e8c83bddae68cc637af82c1dbe8d792f2e287a8
child 430599 8a10fc261acb99c7e8bb4fcb4ee0975c5166990d
push id34410
push usertoros@mozilla.com
push dateThu, 09 Aug 2018 10:02:47 +0000
treeherdermozilla-central@f650c0df72f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssewardj
bugs1480706
milestone63.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 1480706 - Enable Frame-pointer chasing on x86. r=sewardj
tools/profiler/lul/LulMain.cpp
--- a/tools/profiler/lul/LulMain.cpp
+++ b/tools/profiler/lul/LulMain.cpp
@@ -1416,21 +1416,19 @@ LUL::Unwind(/*OUT*/uintptr_t* aFramePCs,
       }
       // Use the RuleSet to compute the registers for the previous
       // frame.  |regs| is modified in-place.
       UseRuleSet(&regs, aStackImg, ruleset, pfxinstrs);
       continue;
 
     }
 
-#if defined(GP_PLAT_amd64_linux)
-    // There's no RuleSet for the specified address.  On amd64_linux, see if
+#if defined(GP_PLAT_amd64_linux) || defined(GP_PLAT_x86_linux)
+    // There's no RuleSet for the specified address.  On amd64/x86_linux, see if
     // it's possible to recover the caller's frame by using the frame pointer.
-    // This would probably work for the 32-bit case too, but hasn't been
-    // tested for that case.
 
     // We seek to compute (new_IP, new_SP, new_BP) from (old_BP, stack image),
     // and assume the following layout:
     //
     //                 <--- new_SP
     //   +----------+
     //   |  new_IP  |  (return address)
     //   +----------+
@@ -1468,17 +1466,17 @@ LUL::Unwind(/*OUT*/uintptr_t* aFramePCs,
           regs.xbp = new_xbp;
           regs.xip = new_xip;
           regs.xsp = new_xsp;
           (*aFramePointerFramesAcquired)++;
           continue;
         }
       }
     }
-#endif // defined(GP_PLAT_amd64_linux)
+#endif // defined(GP_PLAT_amd64_linux) || defined(GP_PLAT_x86_linux)
 
     // We failed to recover a frame either using CFI or FP chasing, and we
     // have no other ways to recover the frame.  So we have to give up.
     break;
 
   } // top level unwind loop
 
   // END UNWIND