зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1350211 - Re-enable native stack walking on Android. r=mstange.
Bug 1339695 part 8 accidentally disabled native stack walking on Android by using GP_arm_android instead of GP_PLAT_arm_android in a #if. This patch fixes that. It also fixes a couple of compile errors that crept into the relevant code while it was disabled. --HG-- extra : rebase_source : a7a94b018b8de7a7ca3c621a2b662859a65e69c1
This commit is contained in:
Родитель
cb636a3130
Коммит
56501f9f6f
|
@ -56,7 +56,7 @@
|
|||
#endif
|
||||
|
||||
// This should also work on ARM Linux, but not tested there yet.
|
||||
#if defined(GP_arm_android)
|
||||
#if defined(GP_PLAT_arm_android)
|
||||
# define USE_EHABI_STACKWALK
|
||||
# include "EHABIStackWalk.h"
|
||||
#endif
|
||||
|
@ -782,9 +782,7 @@ DoNativeBacktrace(PS::LockRef aLock, ProfileBuffer* aBuffer,
|
|||
const mcontext_t* mcontext =
|
||||
&reinterpret_cast<ucontext_t*>(aSample->context)->uc_mcontext;
|
||||
mcontext_t savedContext;
|
||||
NotNull<PseudoStack*> pseudoStack = aInfo.Stack();
|
||||
|
||||
nativeStack.count = 0;
|
||||
NotNull<PseudoStack*> pseudoStack = aSample->threadInfo->Stack();
|
||||
|
||||
// The pseudostack contains an "EnterJIT" frame whenever we enter
|
||||
// JIT code with profiling enabled; the stack pointer value points
|
||||
|
@ -828,12 +826,12 @@ DoNativeBacktrace(PS::LockRef aLock, ProfileBuffer* aBuffer,
|
|||
// Now unwind whatever's left (starting from either the last EnterJIT frame
|
||||
// or, if no EnterJIT was found, the original registers).
|
||||
nativeStack.count += EHABIStackWalk(*mcontext,
|
||||
aInfo.StackTop(),
|
||||
aSample->threadInfo->StackTop(),
|
||||
sp_array + nativeStack.count,
|
||||
pc_array + nativeStack.count,
|
||||
nativeStack.size - nativeStack.count);
|
||||
|
||||
MergeStacksIntoProfile(aInfo, aSample, nativeStack);
|
||||
MergeStacksIntoProfile(aBuffer, aSample, nativeStack);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче