Bug 1017132. Don't call printf in FramePointerStackWalk. r=dbaron
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 03 Jun 2014 15:42:10 -0400
changeset 206745 1012d031e19cd5da73d4419f90500f7a0f608d1d
parent 206744 5a7cc51340a91b56cdc2aa15632ae2ba7aed415d
child 206746 7b366010fbbcef0bc382fa6c78f5117734e012bc
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1017132
milestone32.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 1017132. Don't call printf in FramePointerStackWalk. r=dbaron This avoids hangs while profiling.
dom/datastore/tests/test_basic.html
xpcom/base/nsStackWalk.cpp
--- a/xpcom/base/nsStackWalk.cpp
+++ b/xpcom/base/nsStackWalk.cpp
@@ -1195,17 +1195,16 @@ FramePointerStackWalk(NS_WalkStackCallba
     // ppc mac or powerpc64 linux
     void* pc = *(bp + 2);
     bp += 3;
 #else // i386 or powerpc32 linux
     void* pc = *(bp + 1);
     bp += 2;
 #endif
     if (IsCriticalAddress(pc)) {
-      printf("Aborting stack trace, PC is critical\n");
       return NS_ERROR_UNEXPECTED;
     }
     if (--skip < 0) {
       // Assume that the SP points to the BP of the function
       // it called. We can't know the exact location of the SP
       // but this should be sufficient for our use the SP
       // to order elements on the stack.
       (*aCallback)(pc, bp, aClosure);
@@ -1272,17 +1271,16 @@ struct unwind_info
 
 static _Unwind_Reason_Code
 unwind_callback(struct _Unwind_Context* context, void* closure)
 {
   unwind_info* info = static_cast<unwind_info*>(closure);
   void* pc = reinterpret_cast<void*>(_Unwind_GetIP(context));
   // TODO Use something like '_Unwind_GetGR()' to get the stack pointer.
   if (IsCriticalAddress(pc)) {
-    printf("Aborting stack trace, PC is critical\n");
     info->isCriticalAbort = true;
     // We just want to stop the walk, so any error code will do.  Using
     // _URC_NORMAL_STOP would probably be the most accurate, but it is not
     // defined on Android for ARM.
     return _URC_FOREIGN_EXCEPTION_CAUGHT;
   }
   if (--info->skip < 0) {
     (*info->callback)(pc, nullptr, info->closure);